def predict(self, X): X = np.asanyarray(X)[:, :self.num_steps] X = np.asanyarray(X, dtype=np.float64, order='C') P = _trend.predict(X, self.R, self.labels, self.num_labels, self.gamma) return P.argmax(axis=1)
def predict_proba(self, X): X = np.asanyarray(X)[:, :self.num_steps] X = np.asanyarray(X, dtype=np.float64, order='C') P = _trend.predict(X, self.R, self.labels, self.num_labels, self.gamma) P = ((P.T / P.sum(axis=1)).T) return P