tedana.selection._utils

Utility functions for tedana.selection

Functions

do_svm(X_train, y_train, X_test[, svmtype]) Implements Support Vector Classification on provided data
getelbow_aggr(ks[, val]) Elbow using curvature - aggressive
getelbow_cons(ks[, val]) Elbow using mean/variance method - conservative
getelbow_mod(ks[, val]) Elbow using linear projection method - moderate
do_svm(X_train, y_train, X_test, svmtype=0)[source]

Implements Support Vector Classification on provided data

Parameters:
  • X_train ((N1 x F) array_like) – Training vectors, where n_samples is the number of samples in the training dataset and n_features is the number of features.
  • y_train ((N1,) array_like) – Target values (class labels in classification, real numbers in regression)
  • X_test ((N2 x F) array_like) – Test vectors, where n_samples is the number of samples in the test dataset and n_features is the number of features.
  • svmtype (int, optional) – Desired support vector machine type. Must be in [0, 1, 2]. Default: 0
Returns:

getelbow_aggr(ks, val=False)[source]

Elbow using curvature - aggressive

Parameters:
  • ks (array_like) –
  • val (bool, optional) – Default is False
Returns:

Either the elbow index (if val is True) or the values at the elbow index (if val is False)

Return type:

int or float

getelbow_cons(ks, val=False)[source]

Elbow using mean/variance method - conservative

Parameters:
  • ks (array_like) –
  • val (bool, optional) – Return the value of the elbow instead of the index. Default: False
Returns:

Either the elbow index (if val is True) or the values at the elbow index (if val is False)

Return type:

int or float

getelbow_mod(ks, val=False)[source]

Elbow using linear projection method - moderate

Parameters:
  • ks (array_like) –
  • val (bool, optional) – Return the value of the elbow instead of the index. Default: False
Returns:

Either the elbow index (if val is True) or the values at the elbow index (if val is False)

Return type:

int or float