ml_grid.model_classes.H2OGLMClassifier
Classes
Initializes the H2OGLMClassifier, handling the 'lambda' parameter. |
Module Contents
- class ml_grid.model_classes.H2OGLMClassifier.H2OGLMClassifier(**kwargs)[source]
Bases:
ml_grid.model_classes.H2OBaseClassifier.H2OBaseClassifierInitializes the H2OGLMClassifier, handling the ‘lambda’ parameter.
This wrapper ensures compatibility with scikit-learn’s parameter naming by accepting lambda_ and internally mapping it for the H2O backend.
- Parameters:
**kwargs – Keyword arguments passed directly to the H2OGeneralizedLinearEstimator. Common arguments include family=’binomial’, alpha=0.5, and lambda_ (for regularization).
- fit(X: pandas.DataFrame, y: pandas.Series, **kwargs) H2OGLMClassifier[source]
Fits the H2O GLM model and corrects the ‘lambda_’ parameter name.
This method first calls the parent fit method to train the model. After fitting, it ensures the internal H2O model object has the regularization parameter named ‘lambda’ (not ‘lambda_’) to prevent errors during prediction.
- Returns:
The fitted classifier instance.
- Return type: