You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
hi,there are some errors when I run the code.
First, I exact features and get the comprehensive feature set(16 features):{'Connect_After': 5, 'Connect_Normal': 4, 'Connect_Weekend': 6, 'Disconnect': 7, 'Email_In': 9, 'Email_Out': 10, 'File_doc': 15, 'File_exe': 11, 'File_jpg': 12, 'File_txt': 14, 'File_zip': 13, 'Logoff': 3, 'Website': 8,
'Weekday_Logon_After': 1, 'Weekday_Logon_Normal': 0, 'Weekend_Logon': 2}, write "r42_features_complex.h5" to the disk.
Then I run "R4 Processing", when user_id is NGF0157, the user has 15 features, when compute the probability, the error is as follows:
hi,there are some errors when I run the code.
First, I exact features and get the comprehensive feature set(16 features):{'Connect_After': 5, 'Connect_Normal': 4, 'Connect_Weekend': 6, 'Disconnect': 7, 'Email_In': 9, 'Email_Out': 10, 'File_doc': 15, 'File_exe': 11, 'File_jpg': 12, 'File_txt': 14, 'File_zip': 13, 'Logoff': 3, 'Website': 8,
'Weekday_Logon_After': 1, 'Weekday_Logon_Normal': 0, 'Weekend_Logon': 2}, write "r42_features_complex.h5" to the disk.
Then I run "R4 Processing", when user_id is NGF0157, the user has 15 features, when compute the probability, the error is as follows:
in compute_probs(user_df)
37
38 print("timesTrained:",timesTrained)
---> 39 model.learn(seq, max_iters=20, threshold=0.01, restart_threshold=0.1,max_restarts=5, inertia=0.5)
40 timesTrained+=1
41
~\InsiderThreatDetection-master\HiddenMarkovModel\HiddenMarkovModel.py in learn(self, seq, max_iters, threshold, restart_threshold, max_restarts, inertia)
118 while(not done):
119
--> 120 forward_matrix, scaling_factors, log_prob = self.forward(seq, start = starts, trans=transitions, emiss= emissions)
121
122 backward_matrix = self.backward(seq, scaling_factors, start = starts, trans=transitions, emiss= emissions)
~\InsiderThreatDetection-master\HiddenMarkovModel\HiddenMarkovModel.py in forward(self, seq, start, trans, emiss)
45 for symbol_index, symbol in enumerate(seq[1:], start=1):
46
---> 47 forward_matrix[:,symbol_index] = emissions[:,symbol] * np.dot(forward_matrix[:,symbol_index-1], transitions)
48
49 # Normalise forward matrix
IndexError: index 15 is out of bounds for axis 1 with size 15
As we know, not every user has 16 features, how tore solve the problem when training HMM model? Thanks a lot!
The text was updated successfully, but these errors were encountered: