shannonca.connectors.MetricConnector

class shannonca.connectors.MetricConnector(n_neighbors=15, metric='euclidean', include_self=True)

Make neighborhoods of observations using a metric on the input data.

__init__(n_neighbors=15, metric='euclidean', include_self=True)

Constructor

Parameters:
  • n_neighbors (int) – number of neighbors of each observation to compute

  • metric (str) – Metric to use. See DistanceMetric for available metrics. Default ‘euclidean’.

  • include_self (bool) – whether observations should be classified as their own neighbors. Default True.

Methods

__init__([n_neighbors, metric, include_self])

Constructor

connect(X, **kwargs)

Make neighborhoods of the input