gemseo.mlearning.classification.algos.svm_settings module#

Settings of the SVM classification algorithm.

Settings SVMClassifier_Settings(*, transformer=None, parameters=None, input_names=(), output_names=(), C=1.0, kernel='rbf', probability=False, random_state=0)[source]#

Bases: BaseClassifierSettings

The settings of the SV classification algorithm.

Create a new model by parsing and validating input data from keyword arguments.

Raises [ValidationError][pydantic_core.ValidationError] if the input data cannot be validated to form a valid model.

self is explicitly positional-only to allow self as a field name.

Parameters:
Return type:

None

C: PositiveFloat = 1.0#

The inverse L2 regularization parameter.

Constraints:
  • gt = 0

kernel: str | Annotated[Callable, WithJsonSchema({})] = 'rbf'#

The name of the kernel or a callable for the SVM.

Examples of names: "linear", "poly", "rbf", "sigmoid", "precomputed".

probability: bool = False#

Whether to enable the probability estimates.

random_state: NonNegativeInt | None = 0#

The random state parameter.

If None, use the global random state instance from numpy.random. Creating the model multiple times will produce different results. If int, use a new random number generator seeded by this integer. This will produce the same results.