Package edu.cmu.tetrad.search.utils
Class KernelUtils
java.lang.Object
edu.cmu.tetrad.search.utils.KernelUtils
Provides various kernel utilities.
- Version:
- $Id: $Id
- Author:
- Robert Tillman
-
Method Summary
Modifier and TypeMethodDescriptionstatic MatrixConstructs the centralized Gram matrix for a given vector valued sample.static MatrixConstructs Gram matrix for a given vector valued sample.static MatrixconstructH(int m) Constructs the projection matrix on 1/mstatic MatrixincompleteCholeskyGramMatrix(List<Kernel> kernels, DataSet dataset, List<Node> nodes, double precision) Approximates Gram matrix using incomplete Cholesky factorization
-
Method Details
-
constructGramMatrix
Constructs Gram matrix for a given vector valued sample. The set of kernels corresponds to the variables in the set. The output matrix is the tensor product of Gram matrices for each variable.- Parameters:
kernels- the kernels for each variabledataset- the dataset containing each variablenodes- the variables to construct the Gram matrix for- Returns:
- a
Matrixobject
-
constructCentralizedGramMatrix
public static Matrix constructCentralizedGramMatrix(List<Kernel> kernels, DataSet dataset, List<Node> nodes) Constructs the centralized Gram matrix for a given vector valued sample. The set of kernels corresponds to the variables in the set. The output matrix is the tensor product of Gram matrices for each variable.- Parameters:
kernels- the kernels for each variabledataset- the dataset containing each variablenodes- the variables to construct the Gram matrix for- Returns:
- a
Matrixobject
-
constructH
Constructs the projection matrix on 1/m- Parameters:
m- the sample size- Returns:
- a
Matrixobject
-
incompleteCholeskyGramMatrix
public static Matrix incompleteCholeskyGramMatrix(List<Kernel> kernels, DataSet dataset, List<Node> nodes, double precision) Approximates Gram matrix using incomplete Cholesky factorization- Parameters:
kernels- the kernels for each variabledataset- the dataset containing each variablenodes- the variables to construct the Gram matrix forprecision- a double- Returns:
- a
Matrixobject
-