pyntbci.stimulus.optimize_subset_clustering

pyntbci.stimulus.optimize_subset_clustering(X: ndarray[Any, dtype[_ScalarType_co]], n_subset: int) ndarray[Any, dtype[_ScalarType_co]][source]

Optimize the subset by first clustering similar codes and subsequently selecting the best candidates from each cluster. The best candidate from each cluster is defined by the minimum maximum correlation with any code outside the cluster. This method was developed and evaluated as part of [17].

Parameters:
  • X (NDArray) – Data matrix of shape (n_codes, n_samples).

  • n_subset (int) – Number of codes in the optimized subset.

Returns:

subset – A vector of indices of shape (n_subset) for the optimal subset.

Return type:

NDArray

References