The available Python options are detailed in the aoclda.neighbors.approximate_neighbors() class constructor.
The following options can be set using da_options_set_?:
Option name |
Type |
Default |
Description |
Constraints |
|---|---|---|---|---|
number of neighbors |
integer |
\(i=5\) |
Number of neighbors considered for k-nearest neighbors. |
\(1 \le i\) |
n_list |
integer |
\(i=1\) |
Number of lists to construct for inverted file indices |
\(1 \le i\) |
n_probe |
integer |
\(i=1\) |
Number of lists to probe at search time for inverted file indices |
\(1 \le i\) |
k-means_iter |
integer |
\(i=10\) |
Maximum number of k-means iterations to perform at train time |
\(1 \le i\) |
seed |
integer |
\(i=0\) |
Seed for random number generation; set to -1 for non-deterministic results. |
\(-1 \le i\) |
train fraction |
real |
\(r=1\) |
Fraction of training data to use for k-means clustering. |
\(0 < r \le 1\) |
algorithm |
string |
\(s=\) ivfflat |
Algorithm used to compute the approximate nearest neighbors. |
\(s=\) auto, or ivfflat. |
metric |
string |
\(s=\) sqeuclidean |
Metric used to compute distances. |
\(s=\) cosine, euclidean, inner product, or sqeuclidean. |
storage order |
string |
\(s=\) column-major |
Whether data is supplied and returned in row- or column-major order. |
\(s=\) c, column-major, f, fortran, or row-major. |
check data |
string |
\(s=\) no |
Check input data for NaNs prior to performing computation. |
\(s=\) no, or yes. |
If algorithm is set to auto, it defaults to ivfflat, the only currently available algorithm.