API Reference#

The API reference contains:

  • Linear Model: classes to create linear model, covariance, and Gaussian process objects.

  • Kernels: classes to create kernel functions for the covariance model.

  • Priors: Classes to create prior distributions for hyperparameters of covariance model.

  • Sample Data: Functions to generate sample points and data for test purposes.

  • Device Inquiry: Functions and classes to inquiry hardware device information.

Linear Model#

Define a customized linear model by creating modular objects representing correlation, covariance, mean, and a Gaussian process prior.

glearn.LinearModel(x[, polynomial_degree, ...])

Linear model for the mean function of regression.

glearn.Covariance(x[, sigma, sigma0, scale, ...])

Create mixed covariance model.

glearn.GaussianProcess(mean, cov)

Gaussian process prior for regression.

Kernels#

Defines various kernel functions for the covariance model.

glearn.kernels.Kernel

Base class of kernel functions.

glearn.kernels.Exponential

Exponential kernel.

glearn.kernels.SquareExponential

Square exponential kernel.

glearn.kernels.Linear

Linear kernel.

glearn.kernels.RationalQuadratic

Rational quadratic kernel.

glearn.kernels.Matern

Matern kernel.

Prior Distributions#

Define various prior distributions for the hyperparameters of the covariance model.

glearn.priors.Prior([half])

Base class for prior distributions.

glearn.priors.Uniform([a, b])

Uniform distribution.

glearn.priors.Normal([mean, std, half])

Normal distribution.

glearn.priors.Cauchy([median, scale, half])

Cauchy distribution.

glearn.priors.StudentT([dof, half])

Student's t-distribution.

glearn.priors.Erlang([shape, rate])

Erlang distribution.

glearn.priors.Gamma([shape, rate])

Gamma distribution.

glearn.priors.InverseGamma([shape, scale])

Inverse Gamma distribution.

glearn.priors.BetaPrime([alpha, beta])

Beta Prime distribution.

Sample Data#

Generate sample data for test purposes, such as multi-dimensional points and stochastic data on the points.

glearn.sample_data.generate_points(num_points)

Generate a set of points in the unit hypercube.

glearn.sample_data.generate_data(x, ...[, ...])

Generate noisy sinusoidal data on a set of points.

Device Inquiry#

Measure the process time and consumed memory of the Python process during computation with the following classes.

glearn.Timer([hold])

A timer to measure elapsed wall time and CPU process time of Python process.

glearn.Memory()

Measures resident memory size or its change for the Python process.

Inquiry hardware information, including CPU and GPU devices employed during computation and get information about the CUDA Toolkit installation with the following functions.

glearn.info([print_only])

Provides general information about hardware device, package version, and memory usage.

glearn.device.get_processor_name()

Gets the model name of CPU processor.

glearn.device.get_gpu_name()

Gets the model name of GPU device.

glearn.device.get_num_cpu_threads()

Returns the number of available CPU processor threads.

glearn.device.get_num_gpu_devices()

Returns the number of available GPU devices in multi-GPU platforms.

glearn.device.get_nvidia_driver_version()

Gets the NVIDIA graphic driver version.

glearn.device.locate_cuda()

Returns the directory paths and version of CUDA Toolkit installation.

glearn.device.restrict_to_single_processor()

Restricts the computations to only one CPU thread.