DashAI.back.models.KNeighborsClassifier
- class KNeighborsClassifier(**kwargs)[source]
Scikit-learn’s K-Nearest Neighbors (KNN) classifier wrapper for DashAI.
Methods
__init__(**kwargs)fit(x_train, y_train)Fit the estimator.
get_metadata_routing()Get metadata routing of this object.
get_params([deep])Get parameters for this estimator.
get_schema()Generates the component related Json Schema.
kneighbors([X, n_neighbors, return_distance])Find the K-neighbors of a point.
kneighbors_graph([X, n_neighbors, mode])Compute the (weighted) graph of k-Neighbors for points in X.
load(filename)Load the model of the specified path.
predict(x_pred)Make a prediction with the model.
predict_proba(X)Return probability estimates for the test data X.
save(filename)Save the model in the specified path.
score(X, y[, sample_weight])Return the mean accuracy on the given test data and labels.
set_fit_request(*[, x_train, y_train])Configure whether metadata should be requested to be passed to the
fitmethod.set_params(**params)Set the parameters of this estimator.
set_predict_request(*[, x_pred])Configure whether metadata should be requested to be passed to the
predictmethod.set_score_request(*[, sample_weight])Configure whether metadata should be requested to be passed to the
scoremethod.validate_and_transform(raw_data)It takes the data given by the user to initialize the model and returns it with all the objects that the model needs to work.
Attributes
COLORCOMPATIBLE_COMPONENTSDISPLAY_NAMETYPE