ridge_regression#

Functions

compress_ridge_matrices(A, B, perc_rec, alpha)

Masks the matrices A and B according to the percentage of recurrent neurons to be used.

compute_ridge_matrices(loader[, ...])

Computes the matrices A and B for incremental ridge regression.

fit_and_validate_readout(train_loader, ...)

Applies the ridge regression on the training data with all the given l2 values, and returns the best configuration after evaluating the linear transformations on the validation data.

fit_readout(train_loader[, preprocess_fn, ...])

Applies the ridge regression on the training data with all the given l2 values and returns a list of matrices, one for each L2 value.

solve_ab_decomposition(A, B[, l2, device])

Computes the result of the AB decomposition for solving the linear system.

validate_readout(readout, eval_loader, score_fn)

Evaluates the linear transformations on the validation data.