コード例 #1
0
 def predict(self, Xtest):
     probs = np.random.rand(Xtest.shape[0])
     ytest = utils.threshold_probs(probs)
     return ytest
コード例 #2
0
ファイル: classalgorithms.py プロジェクト: PawPatel/Learning
 def predict(self, Xtest):
     probs = np.random.rand(Xtest.shape[0])
     ytest = utils.threshold_probs(probs)
     return ytest
コード例 #3
0
 def predict(self, Xtest):
     probs = utils.sigmoid(Xtest.dot(self.weights))
     ytest = utils.threshold_probs(probs)
     return ytest
 def predict(self, Xtest):
     ytest = utils.sigmoid(np.dot(Xtest, self.weights))
     ytest = utils.threshold_probs(ytest)
     return ytest
 def predict(self, Xtest):
     Rbf = RBF()
     Xtest = Rbf.transform(Xtest)
     ytest = utils.sigmoid(np.dot(Xtest, self.weights))
     ytest = utils.threshold_probs(ytest)
     return ytest
コード例 #6
0
 def predict(self, Xtest):
     xw = np.dot(Xtest, self.weights)
     sqrt_one_plus_xwSquare = utils.sqrt_one_plus_xwSquare
     p = 0.5 * (1 + xw/sqrt_one_plus_xwSquare(xw))
     p = utils.threshold_probs(p)
     return p
コード例 #7
0
 def predict(self, Xtest):
     ytest = 0.5 * (
         1 + np.divide(np.dot(Xtest, self.weights),
                       np.sqrt(1 + np.square(np.dot(Xtest, self.weights)))))
     ytest = utils.threshold_probs(ytest)
     return ytest
 def predict(self, Xtest):
     probs = utils.sigmoid(Xtest.dot(self.weights))
     ytest = utils.threshold_probs(probs)
     return ytest
コード例 #9
0
 def predict(self, Xtest, weights=None):
     if weights is None:
         weights = self.weights
     p = utils.sigmoid(np.dot(Xtest, weights))
     p = utils.threshold_probs(p)
     return p
コード例 #10
0
 def predict(self, Xtest):
     probabilities = utils.custom_probs(np.dot(self.weights, Xtest.T))
     return utils.threshold_probs(probabilities)
コード例 #11
0
 def predict(self, Xtest):
     ytest = []
     for i in range(0, len(Xtest)):
         ytest.append(self.evaluate(Xtest[i]))
     ytest = np.array(ytest)
     return utils.threshold_probs(ytest)
コード例 #12
0
 def predict(self, Xtest):
     xw = np.dot(Xtest, self.weights)
     sqrt_one_plus_xwSquare = utils.sqrt_one_plus_xwSquare
     p = 0.5 * (1 + xw / sqrt_one_plus_xwSquare(xw))
     p = utils.threshold_probs(p)
     return p
コード例 #13
0
 def predict(self, Xtest, weights=None):
     if weights is None:
         weights = self.weights
     p = utils.sigmoid(np.dot(Xtest, weights))
     p = utils.threshold_probs(p)
     return p
コード例 #14
0
 def predict(self, Xtest):
     p = utils.sigmoid(np.dot(Xtest, self.weights))
     p = utils.threshold_probs(p)
     return p