MCPcopy Create free account
hub / github.com/rushter/MLAlgorithms / FMClassifier

Class FMClassifier

mla/fm.py:82–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

80
81
82class FMClassifier(BaseFM):
83 def fit(self, X, y=None):
84 super(FMClassifier, self).fit(X, y)
85 self.loss = binary_crossentropy
86 self.loss_grad = elementwise_grad(binary_crossentropy)
87
88 def predict(self, X=None):
89 predictions = self._predict(X)
90 return np.sign(predictions)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected