tensorly.regression.tucker_regression.TuckerRegressor

class TuckerRegressor(weight_ranks, tol=1e-06, reg_W=1, n_iter_max=100, random_state=None, verbose=1)[source]

Tucker tensor regression

Learns a low rank Tucker weight for the regression
Parameters:

weight_ranks : int list

dimension of each mode of the core Tucker weight

tol : float

convergence value

reg_W : int, optional, default is 1

regularisation on the weights

n_iter_max : int, optional, default is 100

maximum number of iteration

random_state : None, int or RandomState, optional, default is None

verbose : int, default is 1

level of verbosity

fit(X, y)[source]

Fits the model to the data (X, y)

Parameters:

X : ndarray of shape (n_samples, N1, …, NS)

tensor data

y : array of shape (n_samples)

labels associated with each sample

Returns:

self

get_params(**kwargs)[source]

Returns a dictionary of parameters

predict(X)[source]

Returns the predicted labels for a new data tensor

Parameters:

X : ndarray

tensor data of shape (n_samples, N1, …, NS)

set_params(**parameters)[source]

Sets the value of the provided parameters