def fit(self, x, y): x1 = NewInformationPriorityAccumulation.nipago(y, self.r) z1 = ModelMethods.get_backvalue(x1) ones_array = np.diff(x).astype(np.float64) ones_array = ones_array.reshape([-1, 1]) B = ModelMethods.construct_matrix(z1, ones_array) self.x_orig = y self.params = ModelMethods.get_params(B, y) return self
def fit(self, x, y): x1 = NewInformationPriorityAccumulation.nipago(y, self.r) z1 = ModelMethods.get_backvalue(x1) arange_array = x[1:] arange_array = arange_array.reshape([-1, 1]) B = ModelMethods.construct_matrix(z1, arange_array) self.x_orig = y self.params = ModelMethods.get_params(B, y) return self
def fit(self, y): x1 = Accumulation.ago(y, None, True) z1 = ModelMethods.get_backvalue(x1) z1_square = np.power(z1, self.n) self.B = ModelMethods.construct_matrix(z1, z1_square) self.x_orig = y self.params = ModelMethods.get_params(self.B, y) self.is_fitted = True return self
def fit(self, x, y): x1 = FractionalAccumulation.fago(y, self.r) z1 = ModelMethods.based(x1) ones_array = np.diff(x).astype(np.float64) ones_array = ones_array.reshape([-1, 1]) B = ModelMethods.construct_matrix(-z1, ones_array) self.x_orig = y self.params = ModelMethods.get_params(B, x1) return self
def fit(self, x, y): lens_1 = len(y[0, 0:]) y1 = y.T x1 = np.zeros(y1.shape) for i in range(0, lens_1): x1[i, 0:] = FractionalAccumulation.fago(y1[i, 0:], self.r) x1 = x1.T ones_array = np.diff(x).astype(np.float64) ones_array = ones_array.reshape([-1, 1]) x1_0 = x1[0:-1, 0] x1_0 = x1_0.reshape([-1, 1]) x1_n = x1[1:, 1:] B_x = ModelMethods.construct_matrix(-x1_0, x1_n) B = ModelMethods.construct_matrix(-B_x, ones_array) self.x_orig = y self.params = ModelMethods.get_params(B, np.array(y)[0:, 0]) self.x1 = x1 return x1
def fit(self, x, y): x1 = Accumulation.agom(y, None, True) x1_0 = x1[0:, 0] z1 = ModelMethods.get_backvalue(x1_0) n_array = x1[1:, 1:] B = ModelMethods.construct_matrix(z1, n_array) self.x_orig = y self.params = ModelMethods.get_params(B, np.array(y)[0:, 0]) self.x1 = x1 return x1
def fit(self, x, y): x1 = Accumulation.ago(y, None, True) z1 = ModelMethods.based(x1) ones_array = np.diff(x).astype(np.float64) ones_array = ones_array.reshape([-1, 1]) self.B = ModelMethods.construct_matrix(-z1, ones_array) self.x_orig = y self.params = ModelMethods.get_params(self.B, x1) self.is_fitted = True return self
def fit(self, x, y): x1 = Accumulation.ago(y, None, True) z1 = ModelMethods.get_backvalue(x1) arange_array = x[1:] arange_array = arange_array.reshape([-1, 1]) self.B = ModelMethods.construct_matrix(z1, arange_array) self.x_orig = y self.params = ModelMethods.get_params(self.B, y) self.is_fitted = True return self
def fit(self, x, y): x_train = x[0:, 1:] t = x[0:, 0] y_conect = np.concatenate((y, x_train), axis=1) lens_1 = len(y_conect[0, 0:]) y1 = y_conect.T x1 = np.zeros(y1.shape) for i in range(0, lens_1): x1[i, 0:] = NewInformationPriorityAccumulation.nipago( y1[i, 0:], self.r) x1 = x1.T ones_array = np.diff(t).astype(np.float64) ones_array = ones_array.reshape([-1, 1]) x1_0 = x1[0:-1, 0] x1_0 = x1_0.reshape([-1, 1]) x1_n = x1[1:, 1:] B_x = ModelMethods.construct_matrix(-x1_0, x1_n) B = ModelMethods.construct_matrix(-B_x, ones_array) self.x_orig = y self.params = ModelMethods.get_params(B, np.array(y)[0:, 0]) self.x1 = x1 return x1
def fit(self, y, x): x_train = x[0:, 1:] y_conect = np.concatenate((y, x_train), axis=1) x1 = Accumulation.agom(y_conect, None, True) x1_0 = x1[0:, 0] z1 = ModelMethods.get_backvalue(x1_0) n_array = x1[1:, 1:] self.B = ModelMethods.construct_matrix(z1, n_array) self.x_orig = y self.params = ModelMethods.get_params(self.B, np.array(y_conect)[0:, 0]) self.x1 = x1 self.is_fitted = True return self
def fit(self, x, y): lens_1 = len(y[0, 0:]) y1 = y.T x1 = np.zeros(y1.shape) for i in range(0, lens_1): x1[i, 0:] = FractionalAccumulation.fago(y1[i, 0:], self.r) x1 = x1.T x1_0 = x1[0:, 0] z1 = ModelMethods.get_backvalue(x1_0) n_array = x1[1:, 1:] B = ModelMethods.construct_matrix(z1, n_array) self.x_orig = y self.params = ModelMethods.get_params(B, np.array(y)[0:, 0]) self.x1 = x1 return x1
def fit(self, y, x): x_train = x[0:, 1:] y_conect = np.concatenate((y, x_train), axis=1) lens_1 = len(y_conect[0, 0:]) y1 = y_conect.T x1 = np.zeros(y1.shape) for i in range(0, lens_1): x1[i, 0:] = FractionalAccumulation.fago(y1[i, 0:], self.r) x1 = x1.T x1_0 = x1[0:, 0] z1 = ModelMethods.get_backvalue(x1_0) n_array = x1[1:, 1:] B = ModelMethods.construct_matrix(z1, n_array) self.x_orig = y self.params = ModelMethods.get_params(B, np.array(y)[0:, 0]) self.x1 = x1 return x1