ml_grid.model_classes.H2OAutoMLClassifier ========================================= .. py:module:: ml_grid.model_classes.H2OAutoMLClassifier Classes ------- .. autoapisummary:: ml_grid.model_classes.H2OAutoMLClassifier.H2OAutoMLClassifier Module Contents --------------- .. py:class:: H2OAutoMLClassifier(max_runtime_secs: int = 360, nfolds: int = 2, seed: int = 1) Bases: :py:obj:`sklearn.base.BaseEstimator`, :py:obj:`sklearn.base.ClassifierMixin` Initializes the H2OAutoMLClassifier. :param max_runtime_secs: Maximum time in seconds to run the AutoML process. :type max_runtime_secs: int :param nfolds: Number of folds for cross-validation. :type nfolds: int :param seed: Random seed for reproducibility. :type seed: int .. py:attribute:: max_runtime_secs :value: 360 .. py:attribute:: nfolds :value: 2 .. py:attribute:: seed :value: 1 .. py:attribute:: automl :type: Optional[h2o.automl.H2OAutoML] :value: None .. py:attribute:: classes_ :type: Optional[numpy.ndarray] :value: None .. py:method:: fit(X: pandas.DataFrame, y: pandas.Series) -> H2OAutoMLClassifier Fits the H2O AutoML model. This method initializes an H2O cluster, converts the pandas DataFrame and Series to H2O Frames, and then trains the AutoML model. :param X: The training input samples. :type X: pd.DataFrame :param y: The target values. :type y: pd.Series :returns: The fitted estimator. :rtype: H2OAutoMLClassifier .. py:method:: predict(X: pandas.DataFrame) -> numpy.ndarray Predicts class labels for samples in X. :param X: The input samples to predict. :type X: pd.DataFrame :returns: The predicted class labels. :rtype: np.ndarray .. py:method:: predict_proba(X: pandas.DataFrame) -> numpy.ndarray :abstractmethod: Predicts class probabilities for samples in X. .. note:: This method is not implemented for H2O AutoML. :param X: The input samples. :type X: pd.DataFrame :raises NotImplementedError: H2O AutoML does not support predict_proba. .. py:method:: get_params(deep: bool = True) -> Dict[str, Any] Gets parameters for this estimator. :param deep: If True, will return the parameters for this estimator and contained subobjects that are estimators. :type deep: bool :returns: Parameter names mapped to their values. :rtype: Dict[str, Any] .. py:method:: set_params(**params: Any) -> H2OAutoMLClassifier Sets the parameters of this estimator. :param \*\*params: Estimator parameters. :type \*\*params: Any :returns: The instance with updated parameters. :rtype: H2OAutoMLClassifier .. py:method:: get_leader_params() -> Dict[str, Any] Gets the parameters of the best model found by AutoML. :returns: A dictionary of the leader model's parameters. :rtype: Dict[str, Any]