Example #1
0
 def fit(self, y):
     x1 = Accumulation.ago(y, None, True)
     z1 = ModelMethods.get_backvalue(x1)
     z1_square = np.power(z1, self.n)
     B = ModelMethods.construct_matrix(z1, z1_square)
     self.x_orig = y
     self.params = ModelMethods.get_params(B, y)
     return self
Example #2
0
 def fit(self, y):
     x1 = NewInformationPriorityAccumulation.nipago(y, self.r)
     z1 = ModelMethods.get_backvalue(x1)
     z1_square = np.power(z1, self.n)
     B = ModelMethods.construct_matrix(z1, z1_square)
     self.x_orig = y
     self.params = ModelMethods.get_params(B, y)
     return self
Example #3
0
 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
Example #4
0
 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])
     B = ModelMethods.construct_matrix(z1, arange_array)
     self.x_orig = y
     self.params = ModelMethods.get_params(B, y)
     return self
Example #5
0
 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
Example #6
0
 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])
     B = ModelMethods.construct_matrix(-z1, ones_array)
     self.x_orig = y
     self.params = ModelMethods.get_params(B, x1)
     return self
Example #7
0
 def fit(self, x, y):
     x1 = Accumulation.ago(y, None, True)
     z1 = ModelMethods.get_backvalue(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, y)
     self.is_fitted = True
     return self
Example #8
0
 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
Example #9
0
 def fit(self, x, y):
     x1 = NewInformationPriorityAccumulation.nipago(y, self.r)
     z1 = ModelMethods.based(x1)
     ones_array = np.diff(x).astype(np.float64)
     ones_array = ones_array.reshape([-1, 1])
     range_array = np.arange(len(x) - 1)
     range_array = range_array.reshape([-1, 1])
     B1 = ModelMethods.construct_matrix(-z1, range_array)
     B = ModelMethods.construct_matrix(-B1, ones_array)
     self.x_orig = y
     self.params = ModelMethods.get_params(B, x1)
     self.x1 = x1
     return self
Example #10
0
 def fit(self, x, y):
     x1 = Accumulation.agom(y, None, True)
     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
Example #11
0
 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])
     range_array = np.arange(len(x) - 1)
     range_array = range_array.reshape([-1, 1])
     B1 = ModelMethods.construct_matrix(-z1, range_array)
     self.B = ModelMethods.construct_matrix(-B1, ones_array)
     self.x_orig = y
     self.params = ModelMethods.get_params(self.B, x1)
     self.x1 = x1
     self.is_fitted = True
     return self
Example #12
0
 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
Example #13
0
 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
Example #14
0
 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
Example #15
0
 def fit(self, y, x):
     x_train = x[0:, 1:]
     t = x[0:, 0]
     y_conect = np.concatenate((y, x_train), axis=1)
     x1 = Accumulation.agom(y_conect, None, True)
     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)
     self.B = ModelMethods.construct_matrix(-B_x, ones_array)
     self.x_orig = y
     self.params = ModelMethods.get_params(self.B, np.array(y)[0:, 0])
     self.x1 = x1
     self.is_fitted = True
     return self
Example #16
0
 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
Example #17
0
 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