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(arr[, return_val]) Elbow using linear projection method - moderate
getelbow_cons(arr[, return_val]) Elbow using mean/variance method - conservative
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(arr, return_val=False)[source]

Elbow using linear projection method - moderate

Parameters:
  • arr ((C,) array_like) – Metric (e.g., Kappa or Rho) values.
  • return_val (bool, optional) – Return the value of the elbow instead of the index. Default: False
Returns:

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

Return type:

int or float

getelbow_cons(arr, return_val=False)[source]

Elbow using mean/variance method - conservative

Parameters:
  • arr ((C,) array_like) – Metric (e.g., Kappa or Rho) values.
  • return_val (bool, optional) – Return the value of the elbow instead of the index. Default: False
Returns:

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

Return type:

int or float