INNER CODE UNIT · Python
fit
aimclub/FEDOT · fedot/core/pipelines/prediction_intervals/main.py:123
def fit(self, train_input: InputData):
"""This method creates several np.arrays that will be used in method 'forecast' to build prediction intervals.
Fitting process rans by self.solver initialized in method '__init__'. According to the solver several pipelines
are generated and their forecasts are transfered then in method 'forecast'.
Args:
train_input: train data used for training the model.
"""
x = self.solver(train_input)
if self.method == 'last_generation_ql':
self.up_predictions = x['up_predictions']
self.low_predictions = x['low_predictions']
else:
self.all_predictions = x
self.is_fitted = True