Package com.polytechnik.utils
Class RegularizedVectorXF
java.lang.Object
com.polytechnik.utils.RegularizedVectorXF
- All Implemented Interfaces:
AttributesProductsMultiIndexed
,FtoChristoffelFunctionTransformable
,RNPointEvaluatable
public class RegularizedVectorXF
extends Object
implements AttributesProductsMultiIndexed, RNPointEvaluatable, FtoChristoffelFunctionTransformable
A class to store regularized data.
-
Nested Class Summary
Nested classes/interfaces inherited from interface com.polytechnik.utils.AttributesProductsMultiIndexed
AttributesProductsMultiIndexed.BasisFunction1D, AttributesProductsMultiIndexed.MIScanner
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate final double
final int
The index of const in basis.(package private) final int[]
final int
(package private) final double
final int
final double
(package private) final String[]
(package private) final double[]
(package private) final double[]
(package private) final double[]
(package private) final double[]
(package private) final double[]
-
Constructor Summary
ConstructorsConstructorDescriptionRegularizedVectorXF
(int nX, int noriginal, double[] XfX, double[] XX, String[] Xdescription, double[] xorig_average, double[] xorig_norm, int[] inds_xorig, double[] xorig_basisfunctions, double totalweight, double eps) -
Method Summary
Modifier and TypeMethodDescriptiongetAttribsProductsMultiIndexed
(int d, DataReadObservationVectorXF orig_sample) Create attributes products of a multi--index not greater than d.(package private) double[]
(package private) XXMatrs
Calculate Christoffel function (.XX) from original sample.(package private) RegularizedVectorX
A compaitibility layer to use to new vector-to vector code; skipf
from the basis.Create Radon--Nikodym model from the data.Create a model with sampled f is replaced by the Christoffel function value, the x are left intact.getRadonNikodymSpectralModelWithFassumedDiagonalInChristoffelFunctionBasis
(DataReadObservationVectorXF orig_sample) Create a model with f-matrix assumed diagonal in the Christoffel function basis.Regularized basis function description.double[]
getRegularizedBasisXFromOriginalX
(double[] xorig) A transform from original x to regularized X basis.getRNatXoriginal
(double[] xorig) Calculates a RN point at given xorig, for a localized point we do not need a spectral modelRadonNikodymSpectralModel
.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
Methods inherited from interface com.polytechnik.utils.RNPointEvaluatable
evaluateRNatSequence
-
Field Details
-
nX
public final int nX -
noriginal
public final int noriginal -
indexConst
public final int indexConstThe index of const in basis. -
inds_xorig
final int[] inds_xorig -
XfX
final double[] XfX -
XX
final double[] XX -
xorig_average
final double[] xorig_average -
xorig_norm
final double[] xorig_norm -
xorig_basisfunctions
final double[] xorig_basisfunctions -
totalweight
public final double totalweight -
Xdescription
-
normalizedconstbasisfunction
final double normalizedconstbasisfunction -
eps
private final double eps
-
-
Constructor Details
-
RegularizedVectorXF
RegularizedVectorXF(int nX, int noriginal, double[] XfX, double[] XX, String[] Xdescription, double[] xorig_average, double[] xorig_norm, int[] inds_xorig, double[] xorig_basisfunctions, double totalweight, double eps)
-
-
Method Details
-
getRegularizedBasisXFromOriginalX
public double[] getRegularizedBasisXFromOriginalX(double[] xorig) A transform from original x to regularized X basis. -
getBasisFunctionEqual1
double[] getBasisFunctionEqual1() -
getChristoffelFunctionDensityMatrixInXBasis
Calculate Christoffel function (.XX) from original sample. The second pass, Christoffel matrix (in X basis). -
getDataWithoutF
RegularizedVectorX getDataWithoutF()A compaitibility layer to use to new vector-to vector code; skipf
from the basis. Used in unit tests. -
getRegulaizedBasisXDescription
Regularized basis function description.- Parameters:
i
- Basis function index.- Returns:
- The description.
-
getRadonNikodymSpectralModel
Create Radon--Nikodym model from the data. -
getRadonNikodymSpectralModelWithChristoffelFunctionAsF
public RadonNikodymSpectralModel getRadonNikodymSpectralModelWithChristoffelFunctionAsF(DataReadObservationVectorXF orig_sample) Description copied from interface:FtoChristoffelFunctionTransformable
Create a model with sampled f is replaced by the Christoffel function value, the x are left intact. Useful for unsupervised learning and clustering a vector--valued f.- Specified by:
getRadonNikodymSpectralModelWithChristoffelFunctionAsF
in interfaceFtoChristoffelFunctionTransformable
- Parameters:
orig_sample
- Original data the model is built from.- Returns:
- The
RadonNikodymSpectralModel
with the Christoffel function instead of f.
-
getRadonNikodymSpectralModelWithFassumedDiagonalInChristoffelFunctionBasis
public RadonNikodymSpectralModel getRadonNikodymSpectralModelWithFassumedDiagonalInChristoffelFunctionBasis(DataReadObservationVectorXF orig_sample) Description copied from interface:FtoChristoffelFunctionTransformable
Create a model with f-matrix assumed diagonal in the Christoffel function basis. Useful for a vector--valued f.- Specified by:
getRadonNikodymSpectralModelWithFassumedDiagonalInChristoffelFunctionBasis
in interfaceFtoChristoffelFunctionTransformable
-
getAttribsProductsMultiIndexed
public DataReadObservationVectorXF getAttribsProductsMultiIndexed(int d, DataReadObservationVectorXF orig_sample) Create attributes products of a multi--index not greater than d. This model attributes are "producted" and new data model ofDataReadObservationVectorXF
type is created.- Specified by:
getAttribsProductsMultiIndexed
in interfaceAttributesProductsMultiIndexed
- Parameters:
d
- max product index, d=1 make the model unchanged.orig_sample
- Original data the model is built from.- Returns:
- The data as it were read from a sample.
-
getRNatXoriginal
Calculates a RN point at given xorig, for a localized point we do not need a spectral modelRadonNikodymSpectralModel
.- Specified by:
getRNatXoriginal
in interfaceRNPointEvaluatable
- Parameters:
xorig
- Original x.- Returns:
- RN point evaluated.
-