Pathway Machine Learning

⚠️ For a more complete suite of Machine Learning tools and capabilities, please explore our Enterprise version

Functions

pw.ml.classifiers.knn_lsh_classifier_train(data, L, type='euclidean', **kwargs)

Build the LSH index over data. L the number of repetitions of the LSH scheme. Returns a LSH projector of type (queries: Table, k:Any) -> Table

pw.ml.classifiers.knn_lsh_classify(knn_model, data_labels, queries, k)

Classify the queries. Use the knn_model to extract the k closest datapoints. The queries are then labeled using a majority vote between the labels of the retrieved datapoints, using the labels provided in data_labels.

pw.ml.classifiers.knn_lsh_euclidean_classifier_train(data, d, M, L, A)

Build the LSH index over data using the Euclidean distances. d is the dimension of the data, L the number of repetition of the LSH scheme, M and A are specific to LSH with Euclidean distance, M is the number of random projections done to create each bucket and A is the width of each bucket on each projection.

pw.ml.classifiers.knn_lsh_generic_classifier_train(data, lsh_projection, distance_function, L)

Build the LSH index over data using the a generic lsh_projector and its associated distance. L the number of repetitions of the LSH scheme. Returns a LSH projector of type (queries: Table, k:Any) -> Table

pw.ml.classifiers.knn_lsh_train(data, L, type='euclidean', **kwargs)

Build the LSH index over data. L the number of repetitions of the LSH scheme. Returns a LSH projector of type (queries: Table, k:Any) -> Table