index

package
v0.0.0-...-3c9b827 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 20, 2022 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildJoinabilityIndex

func BuildJoinabilityIndex(db *database.DB) (*lshensemble.LshEnsemble, error)

BuildJoinabilityIndex builds an LSH Ensemble index on the dataset columns.

Types

type CategoryIndex

type CategoryIndex struct {
	// contains filtered or unexported fields
}

CategoryIndex is an index over the category embedding vectors.

func BuildCategoryEmbeddingIndex

func BuildCategoryEmbeddingIndex(db *database.DB, ft *fasttext.FastText) (*CategoryIndex, error)

BuildCategoryEmbeddingIndex builds a CategoryIndex.

func (*CategoryIndex) Delete

func (idx *CategoryIndex) Delete()

Delete frees the memory associated with the index.

func (*CategoryIndex) Query

func (idx *CategoryIndex) Query(vec []float32, k int64) ([]string, []float32, error)

Query queries the index with vec.

Returns the category names of the (up to) k nearest neighbors and the corresponding cosine similarity, sorted by similarity.

type MetadataIndex

type MetadataIndex struct {
	// contains filtered or unexported fields
}

MetadataIndex is an index over the metadata embedding vectors.

func BuildMetadataEmbeddingIndex

func BuildMetadataEmbeddingIndex(db *database.DB) (*MetadataIndex, error)

BuildMetadataEmbeddingIndex builds a MetadataIndex.

func (*MetadataIndex) Delete

func (idx *MetadataIndex) Delete()

Delete frees the memory associated with the index.

func (*MetadataIndex) Query

func (idx *MetadataIndex) Query(vec []float32, k int64) ([]string, []float32, error)

Query queries the index with vec.

Returns the dataset IDs of the (up to) k nearest neighbors and the corresponding cosine similarity, sorted by similarity.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL