socceraction.vaep.VAEP.fit¶
- VAEP.fit(X, y, learner='xgboost', val_size=0.25, tree_params=None, fit_params=None)¶
Fit the model according to the given training data.
- Parameters:
X (pd.DataFrame) – Feature representation of the game states.
y (pd.DataFrame) – Scoring and conceding labels for each game state.
learner (string, default='xgboost' # noqa: DAR103) – Gradient boosting implementation which should be used to learn the model. The supported learners are ‘xgboost’, ‘catboost’ and ‘lightgbm’.
val_size (float, default=0.25 # noqa: DAR103) – Percentage of the dataset that will be used as the validation set for early stopping. When zero, no validation data will be used.
tree_params (dict) – Parameters passed to the constructor of the learner.
fit_params (dict) – Parameters passed to the fit method of the learner.
- Raises:
ValueError – If one of the features is missing in the provided dataframe.
- Returns:
Fitted VAEP model.
- Return type:
self