The standard way using nearest neighbors for regression using AOCL-DA is as follows.
Initialize a
aoclda.neighbors.nearest_neighbors()object with options set in the class constructor.Fit your training data set using
aoclda.neighbors.nearest_neighbors.fit().If only the target values of the test data are required, use
aoclda.neighbors.nearest_neighbors.regressor_predict()with search method set to knn or radius_neighbors. Note that previous calls toaoclda.neighbors.nearest_neighbors.kneighbors()oraoclda.neighbors.nearest_neighbors.radius_neighbors()are not required.
Initialize a
da_handlewithda_handle_typeda_handle_nn.Pass data to the handle using da_nn_set_data_?.
Set the number of neighbors, the radius, the metric or weights used in nearest neighbors using da_options_set_? (see below).
Set the targets corresponding to the training data using da_nn_set_targets_?. This is only required for predicting target values.
If only the target values of the test data are required, use da_nn_regressor_predict_? with search method set to knn_search_mode or radius_search_mode. Note that previous calls to da_nn_kneighbors_? or da_nn_radius_neighbors_? are not required.