lale.lib.autogen.radius_neighbors_classifier module¶
- class lale.lib.autogen.radius_neighbors_classifier.RadiusNeighborsClassifier(*, radius=1.0, weights='uniform', algorithm='auto', leaf_size=30, p=2, metric='minkowski', outlier_label=None, metric_params=None, n_jobs=None)¶
Bases:
PlannedIndividualOp
Combined schema for expected data and hyperparameters.
This documentation is auto-generated from JSON schemas.
- Parameters
radius (float, not for optimizer, default 1.0) – Range of parameter space to use by default for
radius_neighbors()
queries.weights (union type, default 'uniform') –
weight function used in prediction
callable, not for optimizer
or ‘distance’ or ‘uniform’
algorithm (‘auto’, ‘ball_tree’, ‘kd_tree’, or ‘brute’, default ‘auto’) – Algorithm used to compute the nearest neighbors: - ‘ball_tree’ will use
BallTree
- ‘kd_tree’ will useKDTree
- ‘brute’ will use a brute-force searchleaf_size (integer, >=30 for optimizer, <=31 for optimizer, uniform distribution, default 30) – Leaf size passed to BallTree or KDTree
p (integer, >=1 for optimizer, <=3 for optimizer, uniform distribution, default 2) – Power parameter for the Minkowski metric
metric (union type, default 'minkowski') –
the distance metric to use for the tree
callable, not for optimizer
or ‘euclidean’, ‘manhattan’, ‘minkowski’, or ‘precomputed’
outlier_label (union type, default None) –
Label, which is given for outlier samples (samples with no neighbors on given radius)
integer, not for optimizer
or ‘most_frequent’
or None
metric_params (union type, not for optimizer, default None) –
Additional keyword arguments for the metric function.
dict
or None
n_jobs (union type, not for optimizer, default None) –
The number of parallel jobs to run for neighbors search
integer
or None
- 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 : Any) – Training data
y (array of items : Any) – Target values of shape = [n_samples] or [n_samples, n_outputs]
- 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 (Any) – Test samples.
- Returns
result – Class labels for each data sample.
array of items : float
or array of items : array of items : float
- Return type
union type