solve_least_squares_regression

pyapprox.optimization.solve_least_squares_regression(samples, values, eval_basis_matrix, lamda=0.0, normalize_vals=True)[source]

Solve the safety margins least squares regression problem.

Parameters:
samplesnp.ndarary (nvars, nsamples)

The training samples

valuesnp.ndarary (nsamples, 1)

The function values at the training samples

eval_basis_matrixcallable

A function returning the basis evaluated at the set of samples with signature eval_basis_matrix(samples) -> np.ndarray (nsamples, nbasis)

lambdafloat

The number [0, infty) of standard deviations used to determine risk averse shift

normalize_valsboolean

True - normalize the training values False - use the raw training values