Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion pystruct/models/graph_crf.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def _set_size_joint_feature(self):
else:
self.size_joint_feature = (
self.n_states * self.n_features
+ self.n_states * (self.n_states + 1) / 2)
+ self.n_states * (self.n_states + 1) // 2)

def _get_edges(self, x):
return x[1]
Expand Down
2 changes: 1 addition & 1 deletion pystruct/models/latent_node_crf.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ def _set_size_joint_feature(self):
n_input_states = self.n_labels
self.n_input_states = n_input_states
self.size_joint_feature = (n_input_states * self.n_features +
self.n_states * (self.n_states + 1) / 2)
self.n_states * (self.n_states + 1) // 2)

def initialize(self, X, Y):
n_features = X[0][0].shape[1]
Expand Down