lale.lib.autogen.logistic_regression_cv module

class lale.lib.autogen.logistic_regression_cv.LogisticRegressionCV(*, Cs=10, fit_intercept=True, cv, dual=False, penalty='l2', scoring=None, solver='lbfgs', tol=0.0001, max_iter=100, class_weight='balanced', n_jobs=1, verbose=0, refit=True, intercept_scaling=1.0, multi_class='ovr', random_state=None)

Bases: PlannedIndividualOp

Combined schema for expected data and hyperparameters.

This documentation is auto-generated from JSON schemas.

Parameters
  • Cs (integer, >=10 for optimizer, <=11 for optimizer, uniform distribution, default 10) – Each of the values in Cs describes the inverse of regularization strength

  • fit_intercept (boolean, default True) – Specifies if a constant (a.k.a

  • cv (union type) –

    Cross-validation as integer or as object that has a split function.

    The fit method performs cross validation on the input dataset for per trial, and uses the mean cross validation performance for optimization. This behavior is also impacted by handle_cv_failure flag. If integer: number of folds in sklearn.model_selection.StratifiedKFold. If object with split function: generator yielding (train, test) splits as arrays of indices. Can use any of the iterators from https://scikit-learn.org/stable/modules/cross_validation.html#cross-validation-iterators.

    • integer, >=1, >=3 for optimizer, <=4 for optimizer, uniform distribution, default 5

    • or Any, not for optimizer

  • dual (boolean, default False) – Dual or primal formulation

  • penalty (‘l1’ or ‘l2’, default ‘l2’) – Used to specify the norm used in the penalization

  • scoring (union type, default None) –

    A string (see model evaluation documentation) or a scorer callable object / function with signature scorer(estimator, X, y)

    • callable, not for optimizer

    • or ‘accuracy’ or None

  • solver (‘newton-cg’, ‘lbfgs’, ‘liblinear’, ‘sag’, or ‘saga’, default ‘lbfgs’) – Algorithm to use in the optimization problem

  • tol (float, >=1e-08 for optimizer, <=0.01 for optimizer, default 0.0001) – Tolerance for stopping criteria.

  • max_iter (integer, >=10 for optimizer, <=1000 for optimizer, uniform distribution, default 100) – Maximum number of iterations of the optimization algorithm.

  • class_weight ('balanced', not for optimizer, default 'balanced') – Weights associated with classes in the form {class_label: weight}

  • n_jobs (union type, not for optimizer, default 1) –

    Number of CPU cores used during the cross-validation loop

    • integer

    • or None

  • verbose (integer, not for optimizer, default 0) – For the ‘liblinear’, ‘sag’ and ‘lbfgs’ solvers set verbose to any positive number for verbosity.

  • refit (boolean, not for optimizer, default True) – If set to True, the scores are averaged across all folds, and the coefs and the C that corresponds to the best score is taken, and a final refit is done using these parameters

  • intercept_scaling (float, not for optimizer, default 1.0) – Useful only when the solver ‘liblinear’ is used and self.fit_intercept is set to True

  • multi_class (‘ovr’, ‘multinomial’, or ‘auto’, default ‘ovr’) – If the option chosen is ‘ovr’, then a binary problem is fit for each label

  • random_state (union type, not for optimizer, default None) –

    If int, random_state is the seed used by the random number generator; If RandomState instance, random_state is the random number generator; If None, the random number generator is the RandomState instance used by np.random.

    • integer

    • or numpy.random.RandomState

    • or None

Notes

constraint-1 : any type

constraint-2 : any type

constraint-3 : any type

constraint-4 : any type

decision_function(X)

Confidence scores for all classes.

Note: The decision_function method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (union type) –

Samples.

  • array of items : Any

  • or array of items : array of items : float

Returns

result – Confidence scores per (sample, class) combination

Return type

Any

fit(X, y=None, **fit_params)

Train the operator.

Note: The fit method is not available until this operator is trainable.

Once this method is available, it will have the following signature:

Parameters
  • X (array of items : array of items : float) – Training vector, where n_samples is the number of samples and n_features is the number of features.

  • y (array of items : float) – Target vector relative to X.

  • sample_weight (Any, optional) – Array of weights that are assigned to individual samples

predict(X, **predict_params)

Make predictions.

Note: The predict method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (union type) –

Samples.

  • array of items : Any

  • or array of items : array of items : float

Returns

result – Predicted class label per sample.

Return type

array of items : float

predict_proba(X)

Probability estimates for all classes.

Note: The predict_proba method is not available until this operator is trained.

Once this method is available, it will have the following signature:

Parameters

X (array of items : array of items : float) –

Returns

result – Returns the probability of the sample for each class in the model, where classes are ordered as they are in self.classes_.

Return type

array of items : array of items : float