class brainpy.algorithms.offline.RidgeRegression(alpha=1e-07, beta=None, name=None, max_iter=1000, learning_rate=0.001, gradient_descent=False)[source]#

Training algorithm of ridge regression.

  • alpha (float) –

    The regularization coefficient.

    New in version 2.2.0.

  • beta (float) –

    The regularization coefficient.

    Deprecated since version 2.2.0: Please use alpha to set regularization factor.

  • name (str) – The name of the algorithm.

__init__(alpha=1e-07, beta=None, name=None, max_iter=1000, learning_rate=0.001, gradient_descent=False)[source]#


__init__([alpha, beta, name, max_iter, ...])

call(identifier, targets, inputs[, outputs])

The training procedure.

gradient_descent_solve(targets, inputs[, ...])

init_weights(n_features, n_out)

Initialize weights randomly [-1/N, 1/N]

initialize(identifier, *args, **kwargs)

load_states(filename[, verbose])

Load the model states.

nodes([method, level, include_self])

Collect all children nodes.

predict(W, X)

register_implicit_nodes(*nodes, **named_nodes)

register_implicit_vars(*variables, ...)

save_states(filename[, variables])

Save the model states.

train_vars([method, level, include_self])

The shortcut for retrieving all trainable variables.

unique_name([name, type_])

Get the unique name for this object.

vars([method, level, include_self])

Collect all variables in this node and the children nodes.



Name of the model.