LSSTM

# Import statement

from hottbox.algorithms.classification import LSSTM
class LSSTM(C=1, tol=0.001, max_iter=100, probability=False, verbose=False)[source]

Least Squares Support Tensor Machine (LS-STM) for binary classification.

Parameters
Cfloat

Penalty parameter of the error term.

tolfloat

Tolerance for stopping criterion.

max_iterint

Hard limit on iterations within solver.

probabilitybool

Whether to enable probability estimates. This must be enabled prior to calling fit, and will slow down that method.

verbosebool

Enable verbose output.

Attributes

weights_

(list[np.ndarray]) List of weights for each mode of the training data.

bias_

(np.float64)

eta_history_

(np.ndarray)

bias_history_

(np.ndarray)

References

  • Cichocki, Andrzej, et al. “Tensor networks for dimensionality reduction and large-scale optimization: Part 2 applications and future perspectives.” Foundations and Trends in Machine Learning 9.6 (2017): 431-673.

Methods

fit(self, X, y)

Fit the LS-STM model according to the given data.

get_params(self)

Get parameters for this estimator.

predict(self, X)

Predict the class labels for the provided data.

predict_proba(self, X)

Compute probabilities of possible outcomes for samples in the provided data.

score(self, X, y)

Returns the mean accuracy on the given test data and labels.

set_params(self, \*\*params)

Set the parameters of this estimator.

fit(self, X, y)[source]

Fit the LS-STM model according to the given data.

Parameters
Xlist[Tensor]

List of training samples of the same order and size.

ynp.ndarray

Target values relative to X for classification.

Returns
self
get_params(self)[source]

Get parameters for this estimator.

Returns
paramsdict

Dictionary of parameter names mapped to their values.

predict(self, X)[source]

Predict the class labels for the provided data.

Parameters
Xlist[Tensor]

List of test samples.

Returns
y_prednp.ndarray

Class labels for samples in X.

predict_proba(self, X)[source]

Compute probabilities of possible outcomes for samples in the provided data.

score(self, X, y)[source]

Returns the mean accuracy on the given test data and labels.

Parameters
Xlist[Tensor]

List of test samples.

ynp.ndarray

True labels for test samples.

Returns
accnp.float64

Mean accuracy of self.predict(X) with respect to y.

set_params(self, **params)[source]

Set the parameters of this estimator.

Returns
self