gemseo.mlearning.classification.algos.svm_settings module#
Settings of the SVM classification algorithm.
- Settings SVMClassifier_Settings(*, transformer=<factory>, parameters=<factory>, input_names=(), output_names=(), C=1.0, kernel='rbf', probability=False, random_state=0)[source]#
Bases:
BaseClassifierSettingsThe 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:
transformer (Mapping[str, Any]) --
By default it is set to <factory>.
parameters (Mapping[str, Any]) --
By default it is set to <factory>.
input_names (Sequence[str]) --
By default it is set to ().
output_names (Sequence[str]) --
By default it is set to ().
C (Annotated[float, Gt(gt=0)]) --
By default it is set to 1.0.
kernel (str | Annotated[Callable, WithJsonSchema(json_schema={}, mode=None)]) --
By default it is set to "rbf".
probability (bool) --
By default it is set to False.
random_state (Annotated[int, Ge(ge=0)] | None) --
By default it is set to 0.
- 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".
- random_state: NonNegativeInt | None = 0#
The random state parameter.
If
None, use the global random state instance fromnumpy.random. Creating the model multiple times will produce different results. Ifint, use a new random number generator seeded by this integer. This will produce the same results.
- model_post_init(context, /)#
This function is meant to behave like a BaseModel method to initialise private attributes.
It takes context as an argument since that's what pydantic-core passes when calling it.
- Parameters:
self (BaseModel) -- The BaseModel instance.
context (Any) -- The context.
- Return type:
None