# Import statement
from hottbox.algorithms.classification import TelVI
TelVI
(base_clf, probability=False, verbose=False)[source]¶Tensor Ensemble Learning: Vectors Independently (TelVI)
List of classifiers that will be used for the corresponding collection of the factor vectors of the tensor decomposition. This list does not have to be heterogeneous. However, all classifiers should support sklearn API. Length of this list should be equal to the number of collection of the factor vectors, otherwise an exception will be thrown. This is checked after the data have been splitted inside decomp_to_array method (called from fit, predict, predict_proba, grid_search_base_clf)
Whether to enable probability estimates. This must be enabled prior to calling fit, and will slow down that method.
Enable verbose output.
References
Ilia Kisil, Ahmad Moniri, Danilo P. Mandic. “Tensor Ensemble Learning for Multidimensional Data.” In 2018 IEEE Global Conference on Signal and Information Processing (GlobalSIP), pp. 1358-1362. IEEE, 2018.
Methods
|
Fit specified classification models according to the given training data. |
|
Get parameters of employed base classifier |
|
Perform hyper parameter search with cross-validation for all base classifiers. |
|
Perform classification on samples in X. |
|
Compute probabilities of possible outcomes for samples in X. |
|
Returns the mean accuracy on the given test data and labels. |
|
Set parameters for the specified base classifier |
decomp_to_array |
fit
(self, X, y)[source]¶Fit specified classification models according to the given training data.
List of training samples each of which is represented through a tensor factorisation
Target relative to X for classification
get_params_base_clf
(self, i=-1)[source]¶Get parameters of employed base classifier
Positional number of the base classifier. By default outputs parameters for all base classifiers
grid_search
(self, X, y, search_params, cv_params=None, inplace=True, n_jobs=-1)[source]¶Perform hyper parameter search with cross-validation for all base classifiers. Parameter setting that gave the best results on the hold out data are assigned to the base classifiers
List of training samples each of which is represented through a tensor factorisation
Target relative to X for classification
List of dictionaries with parameters names (string) as keys and lists of parameter settings to try as values
Dictionary with kwargs that determine the cross-validation splitting strategy.
If True, assign parameter setting that gave the best results on the hold out data to the base classifier
Number of jobs to run in parallel
List of parameter setting that gave the best results on the hold out data for the corresponding classifier
If the searching parameters are not provided as a list
If the searching parameters are not provided for each of the base classifier (lists length comparison) Note: All elements of search_params must contain only valid parameters for the respective base classifiers
predict
(self, X)[source]¶Perform classification on samples in X.
List of training samples each of which is represented through a tensor factorisation
Class labels for samples in X.
predict_proba
(self, X)[source]¶Compute probabilities of possible outcomes for samples in X.
List of training samples each of which is represented through a tensor factorisation
Returns the probability of the sample for each class in the model. The columns correspond to the classes in sorted order, as they appear in the attribute base_clf[i].classes_.