Navigation

  • index
  • modules |
  • next |
  • previous |
  • Scikit-physlearn 0.1.8 documentation »
  • Developer Tools »
  • Model Search
Scikit-physlearn

Table Of Contents

  • Setting Up
  • Quick Start
  • Base Boosting
  • Python API
  • Datasets API
  • Definitions
  • Developer Tools
    • Base
    • Data Checks
    • Estimator Checks
    • Model Search
  • License
  1. Docs
  2. Developer Tools
  3. Model Search

Model Search¶

The physlearn.supervised.model_selection.search module provides basic utilities for automated (hyper)parameter search.

physlearn.supervised.utils._search._search_method(search_method, pipeline, search_params, scoring, refit=True, n_jobs=-1, cv=None, verbose=0, pre_dispatch='2*n_jobs', error_score=nan, return_train_score=None, randomizedcv_n_iter=None, X=None, y=None, random_state=None, init_points=None, bayesoptcv_n_iter=None)[source]¶

Helper (hyper)parameter search function.

Parameters
  • search_method (str) – Specifies the search method. If 'gridsearchcv', 'randomizedsearchcv', or 'bayesoptcv' then the search method is GridSearchCV, RandomizedSearchCV, or Bayesian Optimization.

  • pipeline (ModifiedPipeline) – A ModifiedPipeline object.

  • search_params (dict) – Dictionary with (hyper)parameter names as keys, and either lists of (hyper)parameter settings to try as values or tuples of (hyper)parameter lower and upper bounds to try as values.

  • scoring (str, callable, list/tuple, or dict, optional (default='neg_mean_absolute_error')) – Determines scoring in the k-fold cross-validation methods.

  • refit (bool, optional (default=True)) – Determines whether to return the refit ModifiedPipeline object.

  • n_jobs (int or None, optional (default=-1)) – The number of jobs to run in parallel in GridSearchCV and RandomizedSearchCV.

  • cv (int, cross-validation generator, an iterable, or None, optional (default=None)) – Determines the cross-validation strategy. If None, then the default is 5-fold cross-validation.

  • verbose (int, optional (default=0)) – Determines verbosity.

  • pre_dispatch (int or str, optional (default='2*n_jobs')) – Controls the number of jobs that get dispatched during parallel execution in GridSearchCV and RandomizedSearchCV.

  • error_score ('raise' or numeric, optional (default=np.nan)) – The assigned value if an error occurs while inducing a regressor. If set to ‘raise’, then the specific error is raised. Else if set to a numeric value, then FitFailedWarning is raised in GridSearchCV and RandomizedSearchCV.

  • return_train_score (bool or None, optional (default=None)) – Determines whether to return the training scores from the k-fold cross-validation methods in GridSearchCV and RandomizedSearchCV.

  • randomizedcv_n_iter (int or None, optional (default=None)) – Determines the number of (hyper)parameter settings that are sampled in RandomizedSearchCV.

  • X (array-like of shape = [n_samples, n_features] or None, optional (default=None)) – The design matrix, where each row corresponds to an example and the column(s) correspond to the feature(s). Used in Bayesian Optimization.

  • y (array-like of shape = [n_samples] or shape = [n_samples, n_targets] or None, optional (default=None)) – The target matrix, where each row corresponds to an example and the column(s) correspond to the single-target(s). Used in Bayesian Optimization.

  • random_state (int, RandomState instance, or None, optional (default=0)) – Determines the random number generation in Bayesian Optimization.

  • init_points (int or None, optional (default=None)) – Determines the number of random exploration steps in Bayesian Optimization. Increasing the number corresponds to diversifying the exploration space.

  • bayesoptcv_n_iter (int or None, optional (default=None)) – Determines the number of optimization steps in in Bayesian Optimization.

Estimator Checks
License

Navigation

  • index
  • modules |
  • next |
  • previous |
  • Scikit-physlearn 0.1.8 documentation »
  • Developer Tools »
  • Model Search
© Copyright 2022, Alex Wozniakowski (MIT License). Created using Sphinx.