Options
All
  • Public
  • Public/Protected
  • All
Menu

Accumulator interface.

Hierarchy

  • Accumulator

Callable

  • If provided a data point vector, the accumulator function returns updated cluster results. If not provided a data point vector, the accumulator function returns the current cluster results.

    throws

    must provide a 1-dimensional ndarray

    throws

    vector length must match centroid dimensions

    Parameters

    • Optional vector: ndarray

      data vector

    Returns Results | null

    cluster results or null

Index

Methods

Methods

predict

  • Computes data point distances to centroids and returns centroid assignment predictions.

    throws

    vector length must match number of data points

    throws

    number of matrix columns must match centroid dimensions

    Parameters

    • out: ndarray

      output vector for storing centroid assignment predictions

    • X: ndarray

      matrix containing data points (n x d, where n is the number of data points and d is the number of dimensions)

    Returns ndarray | null

    vector containing centroid (index) predictions or null

  • Computes data point distances to centroids and returns centroid assignment predictions.

    throws

    vector length must match number of data points

    throws

    number of matrix columns must match centroid dimensions

    Parameters

    • X: ndarray

      matrix containing data points (n x d, where n is the number of data points and d is the number of dimensions)

    Returns ndarray | null

    vector containing centroid (index) predictions or null