gemseo.mlearning.classification.algos.knn_settings module#
Settings of the k-nearest neighbors classification algorithm.
- Settings KNNClassifier_Settings(*, transformer=None, parameters=None, input_names=(), output_names=(), n_neighbors=5)[source]#
Bases:
BaseClassifierSettingsThe settings of the k-nearest neighbors 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
- n_neighbors: PositiveInt = 5#
The number of neighbors.
- Constraints:
gt = 0