| Did you know ... | Search Documentation: |
| Pack logtalk -- logtalk-3.100.1/docs/handbook/_sources/libraries/gaussian_process_regression.rst.txt |
.. _library_gaussian_process_regression:
gaussian_process_regressionGaussian process regression regressor supporting continuous and mixed-feature datasets. Uses exact Gaussian process regression with a mixed covariance kernel: an automatic-relevance-determination squared-exponential component over continuous encoded features and a field-wise categorical overlap component over categorical attributes. Hyperparameters are selected by maximizing the log marginal likelihood using a deterministic coordinate search in log space.
The library implements the regressor_protocol defined in the
regression_protocols library and learns an exact mixed gaussian
process using an automatic-relevance-determination squared-exponential
kernel for continuous encoded features together with a categorical
overlap kernel for categorical attributes. Hyperparameters are selected
by maximizing the log marginal likelihood using a deterministic
coordinate search in log space.
Open the `../../apis/library_index.html#gaussian_process_regression <../../apis/library_index.html#gaussian_process_regression>`__ link in a web browser.
To load this library, load the loader.lgt file:
::
| ?- logtalk_load(gaussian_process_regression(loader)).
To test this library predicates, load the tester.lgt file:
::
| ?- logtalk_load(gaussian_process_regression(tester)).
To run the performance benchmark suite, load the
tester_performance.lgt file:
::
| ?- logtalk_load(gaussian_process_regression(tester_performance)).
auto when optimization is
disabled.The learned regressor is represented by default as:
gaussian_process_regressor(Encoders, TrainingFeatures, TargetMean, Alpha, CholeskyFactor, Kernel, Diagnostics)
The exported predicate clauses therefore use the shape:Functor(Encoders, TrainingFeatures, TargetMean, Alpha, CholeskyFactor, Kernel, Diagnostics)
In this representation, Encoders stores feature encoding metadata,
TrainingFeatures stores the encoded training rows, TargetMean
stores the centered-mean offset, Alpha stores the cached dual
coefficients, CholeskyFactor stores the lower-triangular covariance
factor, Kernel stores the learned mixed-kernel hyperparameters
including one continuous length scale per encoded continuous feature and
one categorical penalty per categorical attribute, and Diagnostics
stores training metadata including the effective options and learned
hyperparameters.The standard predict/3 predicate returns the posterior predictive mean.
The predict_distribution/3 predicate returns a term with the form:
gaussian(Mean, Variance)
where Variance is the posterior predictive variance for observed
targets, including the learned observation noise variance. Tiny negative
values caused by floating-point roundoff are clipped to zero; larger
negative values raise a domain error.The diagnostics/2 predicate returns a list of metadata terms with the form:
::
[
model(gaussian_process_regression),
target(Target),
training_example_count(TrainingExampleCount),
options(Options),
kernel(squared_exponential),
length_scales(LengthScales),
categorical_penalties(CategoricalPenalties),
signal_variance(SignalVariance),
noise_variance(NoiseVariance),
jitter(Jitter),
continuous_feature_count(ContinuousFeatureCount),
categorical_feature_count(CategoricalFeatureCount),
jitter_attempts(JitterAttempts),
log_marginal_likelihood(LogMarginalLikelihood),
convergence(Convergence),
iterations(Iterations),
final_delta(FinalDelta),
encoded_feature_count(FeatureCount)
]
Where:
model(gaussian_process_regression) identifies the learning
algorithm that produced the regressor.target(Target) stores the target attribute name declared by the
training dataset.training_example_count(TrainingExampleCount) stores the number of
examples used during training.options(Options) stores the effective learning options after
merging the user options with the library defaults.kernel(squared_exponential) records the covariance-kernel family
used by the learned model.length_scales(LengthScales) stores the learned per-feature
squared-exponential length scales for the continuous encoded feature
dimensions.categorical_penalties(CategoricalPenalties) stores the learned
mismatch penalties for the categorical attributes.signal_variance(SignalVariance) stores the learned latent-process
marginal variance.noise_variance(NoiseVariance) stores the learned observation noise
variance.jitter(Jitter) stores the effective diagonal jitter used to
stabilize the covariance factorization.continuous_feature_count(ContinuousFeatureCount) stores the number
of continuous encoded feature dimensions used by the
squared-exponential kernel.categorical_feature_count(CategoricalFeatureCount) stores the
number of categorical attributes handled by the overlap-kernel
component.jitter_attempts(JitterAttempts) stores the number of adaptive
jitter retries required by the final covariance factorization.log_marginal_likelihood(LogMarginalLikelihood) stores the final
training log marginal likelihood.convergence(Convergence) records the hyperparameter-search stop
reason.iterations(Iterations) stores the number of hyperparameter-search
sweeps performed.final_delta(FinalDelta) stores the last log-marginal-likelihood
improvement magnitude.encoded_feature_count(FeatureCount) stores the number of numeric
features induced by the encoder list, including missing-value
indicator features.
Use the regression_protocols diagnostic/2 and
regressor_options/2 helper predicates when you only need a single
metadata term or the effective options.
The learn/3 predicate accepts the following options:
squared_exponential. The default is squared_exponential.true and false. The default is true.true and false. The default is true.auto, a positive float that is broadcast to every
continuous encoded feature, or a list of positive floats with one
value per continuous encoded feature. The default is auto.auto, a
positive float that is broadcast to every categorical attribute, or a
list of positive floats with one value per categorical attribute. The
default is auto.auto or a positive float. The default is
auto.auto or a non-negative float. The default is
auto.1.0e-8.12.1.0e-6.1.0e-4.1.0e-6.32.0.32.0.32.2.0.