Beispiel #1
0
    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)
Beispiel #2
0
    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)
Beispiel #3
0
    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
Beispiel #4
0
    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