public class F3Optimizer extends java.lang.Object implements IHeterogenousSimilarityMeasureComputer
| Constructor and Description |
|---|
F3Optimizer(double mu) |
| Modifier and Type | Method and Description |
|---|---|
void |
build(org.nd4j.linalg.api.ndarray.INDArray X,
org.nd4j.linalg.api.ndarray.INDArray W,
org.nd4j.linalg.api.ndarray.INDArray R)
Learns a matrix U that minimizes F1 (W is ignored here)
|
double |
computeSimilarity(org.nd4j.linalg.api.ndarray.INDArray x,
org.nd4j.linalg.api.ndarray.INDArray w)
Compute the 'quality of the match' of given feature values for a new problem
instance based on the training.
|
double |
getCost(org.nd4j.linalg.api.ndarray.INDArray U,
org.nd4j.linalg.api.ndarray.INDArray V)
This evaluates F1
|
float |
getFirstDerivative(org.nd4j.linalg.api.ndarray.INDArray U,
org.nd4j.linalg.api.ndarray.INDArray V,
int s,
int t,
boolean deriveForU)
This compute the derivative of F1 for the (k,l)-th element of the U matrix
|
org.nd4j.linalg.api.ndarray.INDArray |
getGradientAsMatrix(org.nd4j.linalg.api.ndarray.INDArray U,
org.nd4j.linalg.api.ndarray.INDArray V,
boolean computeDerivationsOfU)
This computes the gradient of F1 in matrix form
|
double |
getSquaredFrobeniusNorm(org.nd4j.linalg.api.ndarray.INDArray matrix) |
de.jungblut.math.DoubleVector |
matrices2vector(org.nd4j.linalg.api.ndarray.INDArray... matrices) |
de.jungblut.math.DoubleVector |
matrix2vector(org.nd4j.linalg.api.ndarray.INDArray matrix)
collapses a matrix of the Nd4j framework into a double vector of Thomas
Jungblut's framework
|
ai.libs.jaicore.basic.sets.SetUtil.Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> |
vector2matrices(de.jungblut.math.DoubleVector vector,
int n,
int d,
int m,
int l) |
org.nd4j.linalg.api.ndarray.INDArray |
vector2matrix(de.jungblut.math.DoubleVector vector,
int m,
int n)
creates a matrix of the Nd4j framework from a vector of Thomas Jungblut's
math framework
|
public void build(org.nd4j.linalg.api.ndarray.INDArray X,
org.nd4j.linalg.api.ndarray.INDArray W,
org.nd4j.linalg.api.ndarray.INDArray R)
build in interface IHeterogenousSimilarityMeasureComputerX - Feature values for instances of the first measure (One row =
features of one instance, e.g. meta features of a data set)W - Feature values for instances of the second measure (One row =
features of one instance, e.g. a characterization of a machine
learning pipeline)R - A matrix giving an indication of how good of a match a specific
instance of the first measure is to a specific instance of the
second measure, i.e. how well a pipeline performs on a data setpublic org.nd4j.linalg.api.ndarray.INDArray vector2matrix(de.jungblut.math.DoubleVector vector,
int m,
int n)
vector - m - n - public ai.libs.jaicore.basic.sets.SetUtil.Pair<org.nd4j.linalg.api.ndarray.INDArray,org.nd4j.linalg.api.ndarray.INDArray> vector2matrices(de.jungblut.math.DoubleVector vector,
int n,
int d,
int m,
int l)
public de.jungblut.math.DoubleVector matrix2vector(org.nd4j.linalg.api.ndarray.INDArray matrix)
matrix - public de.jungblut.math.DoubleVector matrices2vector(org.nd4j.linalg.api.ndarray.INDArray... matrices)
public double getCost(org.nd4j.linalg.api.ndarray.INDArray U,
org.nd4j.linalg.api.ndarray.INDArray V)
RRT - U - X - public double getSquaredFrobeniusNorm(org.nd4j.linalg.api.ndarray.INDArray matrix)
public org.nd4j.linalg.api.ndarray.INDArray getGradientAsMatrix(org.nd4j.linalg.api.ndarray.INDArray U,
org.nd4j.linalg.api.ndarray.INDArray V,
boolean computeDerivationsOfU)
R - U - X - public float getFirstDerivative(org.nd4j.linalg.api.ndarray.INDArray U,
org.nd4j.linalg.api.ndarray.INDArray V,
int s,
int t,
boolean deriveForU)
RRT - U - X - k - l - public double computeSimilarity(org.nd4j.linalg.api.ndarray.INDArray x,
org.nd4j.linalg.api.ndarray.INDArray w)
IHeterogenousSimilarityMeasureComputercomputeSimilarity in interface IHeterogenousSimilarityMeasureComputerx - Feature values for the instance for the first measure (e.g. meta
data of a new data set)w - Feature values for the instance for the second measure (e.g. a
characterization of machine learning pipeline)