athena.graph_builder.knn_graph_builder module

Summary

Classes:

KNNGraphBuilder

KNN (K-Nearest Neighbors) class for graph building.

Reference

class KNNGraphBuilder(config)[source]

Bases: athena.graph_builder.base_graph_builder.BaseGraphBuilder

KNN (K-Nearest Neighbors) class for graph building.

__init__(config)[source]

KNN-Graph Builder constructor

Parameters

config (dict) – Dictionary containing builder_params. Refer to [1] for possible parameters

Examples

config = {‘builder_params’: {‘n_neighbors’: 5, ‘mode’:’connectivity’, ‘metric’:’minkowski’, ‘p’:2, ‘n_jobs’:-1}}

Notes

1

https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.kneighbors_graph.html