def f(params_dict, k, X):
     X_affine = data_helper.affine_X(X)
     k_eq_0_out = stable_func.sigmoid(
         np.dot(X_affine, params_dict["theta"]))
     return k_eq_0_out if k == 0 else 1 - k_eq_0_out
 def __s(self, X, k):
     s0 = stable_func.sigmoid(X)
     return s0 if k == 0 else 1 - s0
 def f(params_dict, k, X):
     t_X = t(params_dict, X)
     k_0_out = stable_func.sigmoid(np.dot(t_X, params_dict["theta"]))
     return k_0_out if k == 0 else 1 - k_0_out
Exemplo n.º 4
0
 def predict(self, X):
     X_affine = data_helper.affine_X(X)
     p0 = stable_func.sigmoid(
         self._kernel(X_affine, self._theta, self.__bias, self.__degree))
     return np.column_stack([p0, 1 - p0])
 def predict(self, X):
     X_affine = data_helper.affine_X(X)
     p0 = stable_func.sigmoid(np.dot(X_affine, self._get_params()[0]))
     return np.column_stack([p0, 1 - p0])
Exemplo n.º 6
0
 def act(self, X):
     return stable_func.sigmoid(X)
Exemplo n.º 7
0
 def predict(self, X):
     transforms = self._transform(X)
     transforms_prep = self.__dot_prepare_transform(transforms)
     p0 = stable_func.sigmoid(np.dot(transforms_prep, self._get_params()[0]))
     return np.column_stack([p0, 1-p0])
 def f(params, X):
     k_eq_0_out = stable_func.sigmoid(np.dot(X, params[0]))
     return np.asarray([k_eq_0_out, 1 - k_eq_0_out])