Loading...
Searching...
No Matches
Hyperparameter access (Tier 2)

Classes

struct  gpr_rff_selection
 Report of the held-out random-feature selection (ABI 1.9). More...

Typedefs

typedef struct gpr_rff_selection gpr_rff_selection_t
 Report of the held-out random-feature selection (ABI 1.9).

Functions

int gpr_model_n_lengthscales (gpr_model_t model)
 Number of kernel lengthscale parameters.
int gpr_model_get_lengthscales (gpr_model_t model, double *out)
 Get lengthscale values into caller-allocated array.
int gpr_model_set_lengthscales (gpr_model_t model, const double *values, int n_values)
 Set lengthscale values.
int gpr_model_get_magn_sigma2 (gpr_model_t model, double *out)
 Get signal variance (magnSigma2).
int gpr_model_set_magn_sigma2 (gpr_model_t model, double value)
 Set signal variance.
int gpr_model_get_sigma2 (gpr_model_t model, double *out)
 Get physical output-noise variance (sigma2).
int gpr_model_set_sigma2 (gpr_model_t model, double value)
 Set a positive finite physical output-noise variance and refresh a trained model's noise-dependent posterior state.
int gpr_model_set_rff_features (gpr_model_t model, int n_features, double force_tol_fraction)
 Set the random-feature count or turn held-out selection on (ABI 1.9).
int gpr_model_get_rff_selection (gpr_model_t model, gpr_rff_selection_t *out)
 Copy the stored selection. Before a train this is the empty report.
int gpr_model_set_rigid_null_deflation (gpr_model_t model, int enabled)
 Enable or disable rigid-motion nullspace deflation on training factorizations (ABI 1.22).
int gpr_model_get_rigid_null_deflation (gpr_model_t model, int *out)
 Query whether rigid-motion nullspace deflation is enabled (ABI 1.22).
int gpr_model_get_jitter (gpr_model_t model, double *out)
 Get the initialized model's numerical diagonal jitter variance.
int gpr_model_set_hssvd_backend (gpr_model_t model, int selection)
 Select the posterior solver for the next train (ABI 1.19). The value is a gpr_hssvd_backend_t, the same encoding as gpr_model_config_t::use_hssvd_backend. DEFAULT (0) keeps the library HS-SVD selection. HSSVD (1) selects it. CHOLESKY (2) selects Cholesky. Any other value is rejected and leaves the model unchanged.
int gpr_model_get_hssvd_backend (gpr_model_t model, int *out)
 Get the selected solver, a gpr_hssvd_backend_t (ABI 1.19).
int gpr_model_n_observations (gpr_model_t model)
 Number of training observations currently stored.
int gpr_model_get_alpha (gpr_model_t model, double *out, int n)
 Get posterior mean weights (alpha vector). Size = n_obs * (1 + n_coords). Returns GPR_ERR_NOT_TRAINED if untrained. n is the output buffer capacity in doubles and must be at least Size. Extra capacity is left unchanged. An invalid buffer is not written.
int gpr_model_tp_prefactor (gpr_model_t model, double *out)
 TP-specific: get signal variance prefactor (valid after training).

Detailed Description

Typedef Documentation

◆ gpr_rff_selection_t

Report of the held-out random-feature selection (ABI 1.9).

Function Documentation

◆ gpr_model_get_alpha()

int gpr_model_get_alpha ( gpr_model_t model,
double * out,
int n )

Get posterior mean weights (alpha vector). Size = n_obs * (1 + n_coords). Returns GPR_ERR_NOT_TRAINED if untrained. n is the output buffer capacity in doubles and must be at least Size. Extra capacity is left unchanged. An invalid buffer is not written.

◆ gpr_model_get_hssvd_backend()

int gpr_model_get_hssvd_backend ( gpr_model_t model,
int * out )

Get the selected solver, a gpr_hssvd_backend_t (ABI 1.19).

◆ gpr_model_get_jitter()

int gpr_model_get_jitter ( gpr_model_t model,
double * out )

Get the initialized model's numerical diagonal jitter variance.

◆ gpr_model_get_lengthscales()

int gpr_model_get_lengthscales ( gpr_model_t model,
double * out )

Get lengthscale values into caller-allocated array.

◆ gpr_model_get_magn_sigma2()

int gpr_model_get_magn_sigma2 ( gpr_model_t model,
double * out )

Get signal variance (magnSigma2).

◆ gpr_model_get_rff_selection()

int gpr_model_get_rff_selection ( gpr_model_t model,
gpr_rff_selection_t * out )

Copy the stored selection. Before a train this is the empty report.

◆ gpr_model_get_rigid_null_deflation()

int gpr_model_get_rigid_null_deflation ( gpr_model_t model,
int * out )

Query whether rigid-motion nullspace deflation is enabled (ABI 1.22).

Writes 1 to *out if enabled, 0 otherwise. Leaves *out untouched on failure.

◆ gpr_model_get_sigma2()

int gpr_model_get_sigma2 ( gpr_model_t model,
double * out )

Get physical output-noise variance (sigma2).

◆ gpr_model_n_lengthscales()

int gpr_model_n_lengthscales ( gpr_model_t model)

Number of kernel lengthscale parameters.

◆ gpr_model_n_observations()

int gpr_model_n_observations ( gpr_model_t model)

Number of training observations currently stored.

◆ gpr_model_set_hssvd_backend()

int gpr_model_set_hssvd_backend ( gpr_model_t model,
int selection )

Select the posterior solver for the next train (ABI 1.19). The value is a gpr_hssvd_backend_t, the same encoding as gpr_model_config_t::use_hssvd_backend. DEFAULT (0) keeps the library HS-SVD selection. HSSVD (1) selects it. CHOLESKY (2) selects Cholesky. Any other value is rejected and leaves the model unchanged.

◆ gpr_model_set_lengthscales()

int gpr_model_set_lengthscales ( gpr_model_t model,
const double * values,
int n_values )

Set lengthscale values.

◆ gpr_model_set_magn_sigma2()

int gpr_model_set_magn_sigma2 ( gpr_model_t model,
double value )

Set signal variance.

◆ gpr_model_set_rff_features()

int gpr_model_set_rff_features ( gpr_model_t model,
int n_features,
double force_tol_fraction )

Set the random-feature count or turn held-out selection on (ABI 1.9).

n_features > 0 installs a fixed count and clears automatic selection. n_features == 0 turns the random-feature model off. n_features == -1 turns automatic selection on. force_tol_fraction is used only for -1: 0 derives the fraction from the gradient noise, and any other value must lie in [0, 1). The selection itself runs on the next train or update.

◆ gpr_model_set_rigid_null_deflation()

int gpr_model_set_rigid_null_deflation ( gpr_model_t model,
int enabled )

Enable or disable rigid-motion nullspace deflation on training factorizations (ABI 1.22).

enabled must be 0 (off, default) or 1 (on). Changing the flag invalidates any cached posterior factorization on the model so the next prediction requires re-training. Returns GPR_ERR_INVALID_ARG for an uninitialised model, a Student-t model with enabled != 0, or a value other than 0 or 1. Returns GPR_ERR_UNSUPPORTED on ScaLAPACK builds when enabled != 0.

◆ gpr_model_set_sigma2()

int gpr_model_set_sigma2 ( gpr_model_t model,
double value )

Set a positive finite physical output-noise variance and refresh a trained model's noise-dependent posterior state.

◆ gpr_model_tp_prefactor()

int gpr_model_tp_prefactor ( gpr_model_t model,
double * out )

TP-specific: get signal variance prefactor (valid after training).