RandomBinaryProjectionSearcher class abstract

Random Binary Projection is a an algorithm that randomly partitions all reference data points into different bins, which makes it possible to perform efficient K Nearest Neighbours search, since there is no need to search for the neighbours through the entire data: it's needed to visit just a few bins to look for the neighbours.

Internally, the bins are represented by a Hash Map, where the key is an integer index, and the value is a list of corresponding points. A record of the map is a bin. Usually, points in the same bin are quite similar.

Constructors

RandomBinaryProjectionSearcher(DataFrame data, int digitCapacity, {int? seed, DType dtype = DType.float32})
Takes data, trains the model on it and returns RandomBinaryProjectionSearcher instance.
factory
RandomBinaryProjectionSearcher.fromJson(String jsonSource)
Creates a RandomBinaryProjectionSearcher instance from a JSON-serializable object. The constructor works in conjunction with saveAsJson method. The latter serializes the instance and save the output to a JSON-file.
factory

Properties

columns Iterable<String>
Column names of a dataset that was used to train the model
no setter
digitCapacity int
A number of bits of a bin index. Examples:
no setter
hashCode int
The hash code for this object.
no setterinherited
points → Matrix
Matrix representation of a dataset that was used to train the model
no setter
runtimeType Type
A representation of the runtime type of the object.
no setterinherited
schemaVersion int?
Contains a version of the current json schema
no setterinherited
seed int?
A seed value for the random generator which was used to calculate bin indices
no setter

Methods

noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
query(Vector point, int k, int searchRadius, {Distance distance = Distance.euclidean}) Iterable<Neighbour>
Accepts a point and finds it's k nearest neighbours using distance type. The search is performed along all bins in searchRadius (in bits) from the point's bin index.
saveAsJson(String fileName) Future<File>
Saves a json-serializable map into a newly created file with the path filePath
inherited
toJson() Map<String, dynamic>
Returns a json-serializable map
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited