arbitragelab.ml_approach.regressor_committee
Regressor Committee.
Module Contents
Classes
Regressor Committee implementation which basically fits N number of models |
- class RegressorCommittee(regressor_params: dict, regressor_class: str = 'MultiLayerPerceptron', num_committee: int = 10, epochs: int = 20, patience: int = 100, verbose: bool = True)
Regressor Committee implementation which basically fits N number of models and takes the mean value of their predictions.
- fit(xtrain: pandas.DataFrame, ytrain: pandas.DataFrame, xtest: pandas.DataFrame, ytest: pandas.DataFrame)
Fits the member models, then the voting object.
- Parameters:
xtrain – (pd.DataFrame) Input training data.
ytrain – (pd.DataFrame) Target training data.
xtest – (pd.DataFrame) Input test data.
ytest – (pd.DataFrame) Target test data.
- predict(xtest: pandas.DataFrame) pandas.DataFrame
Collects results from all the committee members and returns average result.
- Parameters:
xtest – (pd.DataFrame) Input test data.
- Returns:
(pd.DataFrame) Model predictions.
- plot_losses(figsize: tuple = (15, 8)) matplotlib.axes._axes.Axes
Plot all individual member loss metrics.
- Parameters:
figsize – (tuple)
- Returns:
(Axes)