sgdml.solvers package

sgdml.solvers.analytic module

class sgdml.solvers.analytic.Analytic(gdml_train, desc, callback=None)[source]

Bases: object

static est_memory_requirement(n_train, n_atoms)[source]
solve(task, R_desc, R_d_desc, tril_perms_lin, y)[source]

sgdml.solvers.iterative module

exception sgdml.solvers.iterative.CGRestartException[source]

Bases: Exception

class sgdml.solvers.iterative.Iterative(gdml_train, desc, max_memory, max_processes, use_torch, callback=None)[source]

Bases: object

_cho_factor_stable(M, pre_reg=False, eps_mag_max=1)[source]

Performs a Cholesky decompostion of a matrix, but regularizes as needed until its positive definite.

Parameters
  • M (numpy.ndarray) – Matrix to factorize.

  • pre_reg (boolean, optional) – Regularize M right away (machine precision), before trying to factorize it (default: False).

Returns

  • numpy.ndarray – Matrix whose upper or lower triangle contains the Cholesky factor of a. Other parts of the matrix contain random data.

  • boolean – Flag indicating whether the factor is in the lower or upper triangle

static est_memory_requirement(n_train, n_inducing_pts, n_atoms)[source]
inducing_pts_from_lev_scores(lev_scores, N)[source]
static max_n_inducing_pts(n_train, n_atoms, max_memory_bytes)[source]
solve(task, R_desc, R_d_desc, tril_perms_lin, y, y_std, tol=0.0001, save_progr_callback=None)[source]