Modifier and Type | Field and Description |
---|---|
protected Map<Integer,SoftReference<Vec>> |
DataSet.columnVecCache
This cache is used to hold a reference to the column vectors that are
returned.
|
Modifier and Type | Method and Description |
---|---|
Vec[] |
DataSet.getColumnMeanVariance()
Computes the weighted mean and variance for each column of feature
values.
|
Vec |
DataSet.getDataWeights()
This method returns the weight of each data point in a single Vector.
|
Vec |
DataSet.getNumericColumn(int i)
The data set can be seen as a NxM matrix, were each row is a
data point, and each column the values for a particular
variable.
|
Vec[] |
DataSet.getNumericColumns()
Creates an array of column vectors for every numeric variable in this
data set.
|
Vec[] |
DataSet.getNumericColumns(Set<Integer> skipColumns)
Creates an array of column vectors for every numeric variable in this
data set.
|
Vec |
SingleWeightVectorModel.getRawWeight()
Returns the only weight vector used for the model
|
Vec |
SimpleWeightVectorModel.getRawWeight(int index)
Returns the raw weight vector associated with the given class index.
|
Modifier and Type | Method and Description |
---|---|
List<Vec> |
DataSet.getDataVectors()
Creates a list of the vectors values for each data point in the correct order.
|
Modifier and Type | Method and Description |
---|---|
void |
DataSet.replaceNumericFeatures(List<Vec> newNumericFeatures)
This method will replace every numeric feature in this dataset with a Vec
object from the given list.
|
Modifier and Type | Field and Description |
---|---|
protected Vec |
DataPoint.numericalValues |
Modifier and Type | Method and Description |
---|---|
Vec |
DataPoint.getNumericalValues()
Returns the vector containing the numerical values.
|
Vec |
ClassificationDataSet.getSampleVariableVector(int category,
int n)
This method is a counter part to
DataSet.getNumericColumn(int) . |
Vec |
DataPointPair.getVector()
The same as calling
DataPoint.getNumericalValues() on DataPointPair.getDataPoint() . |
Vec |
CategoricalResults.getVecView() |
Modifier and Type | Method and Description |
---|---|
void |
ClassificationDataSet.addDataPoint(Vec v,
int classification)
Creates a new data point with no categorical variables and adds it to
this data set.
|
void |
ClassificationDataSet.addDataPoint(Vec v,
int[] classes,
int classification)
Creates a new data point and adds it to this data set.
|
void |
ClassificationDataSet.addDataPoint(Vec v,
int[] classes,
int classification,
double weight)
Creates a new data point and add its to this data set.
|
void |
ClassificationDataSet.addDataPoint(Vec v,
int classification,
double weight)
Creates a new data point with no categorical variables and adds it to
this data set.
|
Constructor and Description |
---|
DataPoint(Vec numericalValues)
Creates a new data point that has no categorical variables and a weight of 1.0
|
DataPoint(Vec numericalValues,
double weight)
Creates a new data point that has no categorical variables
|
DataPoint(Vec numericalValues,
int[] categoricalValues,
CategoricalData[] categoricalData)
Creates a new data point with the default weight of 1.0
|
DataPoint(Vec numericalValues,
int[] categoricalValues,
CategoricalData[] categoricalData,
double weight)
Creates a new data point
|
Modifier and Type | Method and Description |
---|---|
protected abstract ContinuousDistribution |
NaiveBayes.NumericalHandeling.fit(Vec y) |
Constructor and Description |
---|
DANN(int kn,
int k,
double eps,
int maxIterations,
VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Creates a new DANN classifier
|
DANN(int kn,
int k,
double eps,
VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Creates a new DANN classifier
|
LWL(Classifier classifier,
int k,
DistanceMetric dm,
KernelFunction kf,
VectorCollectionFactory<VecPaired<Vec,Double>> vcf)
Creates a new LWL classifier
|
LWL(Regressor regressor,
int k,
DistanceMetric dm,
KernelFunction kf,
VectorCollectionFactory<VecPaired<Vec,Double>> vcf)
Creates a new LWL Regressor
|
NearestNeighbour(int k,
boolean weighted,
DistanceMetric distanceMetric,
VectorCollectionFactory<VecPaired<Vec,Double>> vcf)
Constructs a new Nearest Neighbor Classifier
|
NearestNeighbour(int k,
VectorCollectionFactory<VecPaired<Vec,Double>> vcf)
Constructs a new Nearest Neighbor Classifier
|
Modifier and Type | Field and Description |
---|---|
protected Vec |
StochasticSTLinearL1.w
The final weight vector
|
Modifier and Type | Method and Description |
---|---|
Vec |
LinearBatch.GradFunction.f(double... x) |
Vec |
LinearBatch.GradFunction.f(Vec w) |
Vec |
LinearBatch.GradFunction.f(Vec w,
Vec s) |
Vec |
LinearBatch.GradFunction.f(Vec w,
Vec s,
ExecutorService ex) |
Vec |
StochasticMultinomialLogisticRegression.getCoefficientVector(int id)
Returns the raw coefficient vector used without the bias term.
|
Vec |
StochasticSTLinearL1.getRawWeight() |
Vec |
STGD.getRawWeight() |
Vec |
SCW.getRawWeight() |
Vec |
SCD.getRawWeight() |
Vec |
ROMMA.getRawWeight() |
Vec |
PassiveAggressive.getRawWeight() |
Vec |
NHERD.getRawWeight() |
Vec |
NewGLMNET.getRawWeight() |
Vec |
LogisticRegressionDCD.getRawWeight() |
Vec |
BBR.getRawWeight() |
Vec |
AROW.getRawWeight() |
Vec |
ALMA2.getRawWeight() |
Vec |
StochasticSTLinearL1.getRawWeight(int index) |
Vec |
StochasticMultinomialLogisticRegression.getRawWeight(int index) |
Vec |
STGD.getRawWeight(int index) |
Vec |
SPA.getRawWeight(int index) |
Vec |
SCW.getRawWeight(int index) |
Vec |
SCD.getRawWeight(int index) |
Vec |
ROMMA.getRawWeight(int index) |
Vec |
PassiveAggressive.getRawWeight(int index) |
Vec |
NHERD.getRawWeight(int index) |
Vec |
NewGLMNET.getRawWeight(int index) |
Vec |
LogisticRegressionDCD.getRawWeight(int index) |
Vec |
LinearSGD.getRawWeight(int index) |
Vec |
LinearBatch.getRawWeight(int index) |
Vec |
BBR.getRawWeight(int index) |
Vec |
AROW.getRawWeight(int index) |
Vec |
ALMA2.getRawWeight(int index) |
Vec |
StochasticSTLinearL1.getW()
Returns a copy of the weight vector used to compute results via a dot
product.
|
Vec |
SCW.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
ROMMA.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
NHERD.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
LogisticRegressionDCD.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
BBR.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
AROW.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
ALMA2.getWeightVec()
Returns the weight vector used to compute results via a dot product.
|
Vec |
StochasticSTLinearL1.getWRaw()
Returns the weight vector used to compute results via a dot product.
|
Modifier and Type | Method and Description |
---|---|
double |
LinearBatch.LossFunction.f(Vec w) |
Vec |
LinearBatch.GradFunction.f(Vec w) |
double |
LinearBatch.LossMCFunction.f(Vec w) |
double |
LinearBatch.LossFunction.f(Vec w,
ExecutorService ex) |
double |
LinearBatch.LossMCFunction.f(Vec w,
ExecutorService ex) |
Vec |
LinearBatch.GradFunction.f(Vec w,
Vec s) |
Vec |
LinearBatch.GradFunction.f(Vec w,
Vec s,
ExecutorService ex) |
protected double |
StochasticSTLinearL1.wDot(Vec x)
Computes
StochasticSTLinearL1.w .dot(jsat.linear.Vec) x and does
so by rescaling x as needed automatically and efficiently, even
if x is sparse. |
Modifier and Type | Field and Description |
---|---|
protected List<Vec> |
DUOL.S
Set of support vectors
|
Modifier and Type | Field and Description |
---|---|
protected Vec[] |
LVQ.weights
Array containing the learning vectors
|
Modifier and Type | Field and Description |
---|---|
protected VectorCollection<VecPaired<Vec,Integer>> |
LVQ.vc
Contains the Learning vectors paired with their index in the weights array
|
Modifier and Type | Method and Description |
---|---|
Vec |
SGDNetworkTrainer.feedfoward(Vec x)
Feeds the given singular pattern through the network and computes its
activations
|
Vec |
Perceptron.getRawWeight() |
Vec |
Perceptron.getRawWeight(int index) |
Modifier and Type | Method and Description |
---|---|
protected abstract List<Vec> |
RBFNet.Phase1Learner.getCentroids(DataSet data,
int centroids,
DistanceMetric dm,
ExecutorService ex)
Obtains the centroids for the given data set
|
Modifier and Type | Method and Description |
---|---|
double |
BackPropagationNet.ActivationFunction.f(Vec x) |
Vec |
SGDNetworkTrainer.feedfoward(Vec x)
Feeds the given singular pattern through the network and computes its
activations
|
Modifier and Type | Method and Description |
---|---|
protected abstract double[] |
RBFNet.Phase2Learner.estimateBandwidths(double alpha,
int p,
DataSet data,
List<Vec> centroids,
List<Double> centroidDistCache,
DistanceMetric dm,
ExecutorService threadpool) |
void |
LVQ.setVecCollectionFactory(VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Sets the vector collection factory to use when storing the final learning vectors
|
double |
SGDNetworkTrainer.updateMiniBatch(List<Vec> x,
List<Vec> y)
Performs a mini-batch update of the network using the given input and
output pairs
|
double |
SGDNetworkTrainer.updateMiniBatch(List<Vec> x,
List<Vec> y)
Performs a mini-batch update of the network using the given input and
output pairs
|
double |
SGDNetworkTrainer.updateMiniBatch(List<Vec> x,
List<Vec> y,
ExecutorService ex)
Performs a mini-batch update of the network using the given input and
output pairs
|
double |
SGDNetworkTrainer.updateMiniBatch(List<Vec> x,
List<Vec> y,
ExecutorService ex)
Performs a mini-batch update of the network using the given input and
output pairs
|
Constructor and Description |
---|
SOM(DistanceMetric dm,
int somHeight,
int somWeight,
VectorCollectionFactory<VecPaired<Vec,Integer>> vcFactory)
Creates a new SOM using the given parameters
|
Modifier and Type | Method and Description |
---|---|
void |
TanhLayer.activate(Vec input,
Vec output) |
void |
SoftSignLayer.activate(Vec input,
Vec output) |
void |
SoftmaxLayer.activate(Vec input,
Vec output) |
void |
SigmoidLayer.activate(Vec input,
Vec output) |
void |
ReLU.activate(Vec input,
Vec output) |
void |
LinearLayer.activate(Vec input,
Vec output) |
void |
ActivationLayer.activate(Vec input,
Vec output)
Computes the activation function of this layer on the given input.
|
void |
TanhLayer.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout) |
void |
SoftSignLayer.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout) |
void |
SoftmaxLayer.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout) |
void |
SigmoidLayer.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout) |
void |
ReLU.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout) |
void |
LinearLayer.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout) |
void |
ActivationLayer.backprop(Vec input,
Vec output,
Vec delta_partial,
Vec errout)
This method computes the backpropagated error to a given layer.
|
Modifier and Type | Method and Description |
---|---|
void |
TanhInitializer.init(Vec b,
int fanIn,
Random rand) |
void |
GaussianNormalInit.init(Vec b,
int fanIn,
Random rand) |
void |
ConstantInit.init(Vec b,
int fanIn,
Random rand) |
void |
BiastInitializer.init(Vec b,
int fanIn,
Random rand)
Performs the initialization of the given vector of bias values
|
Modifier and Type | Method and Description |
---|---|
void |
WeightRegularizer.applyRegularization(Matrix W,
Vec b)
Applies regularization to one matrix, where the rows of the matrix
correspond tot he weights associated to one neuron's input.
|
void |
Max2NormRegularizer.applyRegularization(Matrix W,
Vec b) |
void |
WeightRegularizer.applyRegularization(Matrix W,
Vec b,
ExecutorService ex)
Applies regularization to one matrix, where the rows of the matrix
correspond tot he weights associated to one neuron's input.
|
void |
Max2NormRegularizer.applyRegularization(Matrix W,
Vec b,
ExecutorService ex) |
double |
WeightRegularizer.applyRegularizationToRow(Vec w,
double b)
Applies the regularization to one row of the weight matrix, where the row
corresponds to the weights into one neuron.
|
double |
Max2NormRegularizer.applyRegularizationToRow(Vec w,
double b) |
Modifier and Type | Field and Description |
---|---|
protected Vec |
SVMnoBias.weights
Weight values to apply to each data point
|
protected Vec |
PlattSMO.weights
Weight values to apply to each data point
|
Modifier and Type | Field and Description |
---|---|
protected List<Vec> |
SupportVectorLearner.vecs
The array of vectors.
|
Modifier and Type | Method and Description |
---|---|
Vec |
Pegasos.getRawWeight() |
Vec |
DCDs.getRawWeight() |
Vec |
DCD.getRawWeight() |
Vec |
Pegasos.getRawWeight(int index) |
Vec |
DCDs.getRawWeight(int index) |
Vec |
DCD.getRawWeight(int index) |
Modifier and Type | Method and Description |
---|---|
protected double |
SupportVectorLearner.kEval(Vec a,
Vec b)
Performs a kernel evaluation of the product between two vectors directly.
|
protected double |
SupportVectorLearner.kEvalSum(Vec y)
Performs a summation of the form
∑ αi k(xi, y) for each support vector and associated alpha value currently stored in the support vector machine. |
Modifier and Type | Field and Description |
---|---|
protected List<Map<Integer,Vec>> |
OnlineAMM.weightMatrix |
Modifier and Type | Method and Description |
---|---|
<V extends Vec> |
EMGaussianMixture.setUsingData(List<V> dataSet) |
<V extends Vec> |
EMGaussianMixture.setUsingData(List<V> dataSet,
ExecutorService threadpool) |
Modifier and Type | Method and Description |
---|---|
List<Vec> |
EMGaussianMixture.sample(int count,
Random rand) |
static List<Vec> |
SeedSelectionMethods.selectIntialPoints(DataSet d,
int k,
DistanceMetric dm,
List<Double> accelCache,
Random rand,
SeedSelectionMethods.SeedSelection selectionMethod) |
static List<Vec> |
SeedSelectionMethods.selectIntialPoints(DataSet d,
int k,
DistanceMetric dm,
List<Double> accelCache,
Random rand,
SeedSelectionMethods.SeedSelection selectionMethod,
ExecutorService threadpool)
Selects seeds from a data set to use for a clustering algorithm.
|
static List<Vec> |
SeedSelectionMethods.selectIntialPoints(DataSet d,
int k,
DistanceMetric dm,
Random rand,
SeedSelectionMethods.SeedSelection selectionMethod)
Selects seeds from a data set to use for a clustering algorithm.
|
static List<Vec> |
SeedSelectionMethods.selectIntialPoints(DataSet d,
int k,
DistanceMetric dm,
Random rand,
SeedSelectionMethods.SeedSelection selectionMethod,
ExecutorService threadpool)
Selects seeds from a data set to use for a clustering algorithm.
|
Modifier and Type | Method and Description |
---|---|
double |
EMGaussianMixture.logPdf(Vec x) |
double |
EMGaussianMixture.pdf(Vec x) |
Modifier and Type | Method and Description |
---|---|
protected double |
EMGaussianMixture.cluster(DataSet dataSet,
List<Double> accelCache,
int K,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError) |
protected double |
EMGaussianMixture.clusterCompute(int K,
DataSet dataSet,
int[] assignment,
List<Vec> means,
List<Matrix> covs,
ExecutorService execServ) |
void |
OPTICS.setVCF(VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Sets the
VectorCollectionFactory used to produce acceleration
structures for the OPTICS computation. |
void |
LSDBC.setVectorCollectionFactory(VectorCollectionFactory<VecPaired<Vec,Integer>> vectorCollectionFactory)
Sets the vector collection factory used for acceleration of neighbor searches.
|
void |
FLAME.setVectorCollectionFactory(VectorCollectionFactory<VecPaired<Vec,Integer>> vectorCollectionFactory)
Sets the vector collection factory used to accelerate the nearest
neighbor search.
|
Constructor and Description |
---|
DBSCAN(DistanceMetric dm,
VectorCollectionFactory<VecPaired<Vec,Integer>> vecFactory) |
HDBSCAN(DistanceMetric dm,
int m_pts,
int m_clSize,
VectorCollectionFactory<Vec> vcf)
Creates a new HDBSCAN using the full specification of the algorithm,
where two parameters may be altered.
|
HDBSCAN(DistanceMetric dm,
int m_pts,
VectorCollectionFactory<Vec> vcf)
Creates a new HDBSCAN using the simplified form, where the only parameter
is a single value.
|
Modifier and Type | Field and Description |
---|---|
protected Vec |
KernelKMeans.W
The weight of each data point
|
Modifier and Type | Field and Description |
---|---|
protected List<Vec> |
KMeans.means
The list of means
|
protected List<Vec> |
KernelKMeans.X
The list of data points that this was trained on
|
Modifier and Type | Method and Description |
---|---|
List<Vec> |
MiniBatchKMeans.getMeans()
Returns the raw list of means that were used for each class.
|
List<Vec> |
KMeans.getMeans()
Returns the raw list of means that were used for each class.
|
Modifier and Type | Method and Description |
---|---|
protected double |
XMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
NaiveKMeans.cluster(DataSet dataSet,
List<Double> accelCacheInit,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
KMeansPDN.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected abstract double |
KMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights)
This is a helper method where the actual cluster is performed.
|
protected double |
HamerlyKMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
GMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
ElkanKMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
double |
KernelKMeans.distance(Vec x,
int k)
Returns the distance between the given data point and the the specified cluster
|
double |
KernelKMeans.distance(Vec x,
List<Double> qi,
int k)
Returns the distance between the given data point and the the specified cluster
|
protected double |
KernelKMeans.evalSumK(Vec x,
List<Double> qi,
int clusterID,
int[] d)
Computes the kernel sum of the given data point against all the points in
cluster group
clusterID . |
int |
KernelKMeans.findClosestCluster(Vec x)
Finds the cluster ID that is closest to the given data point
|
int |
KernelKMeans.findClosestCluster(Vec x,
List<Double> qi)
Finds the cluster ID that is closest to the given data point
|
int |
ElkanKernelKMeans.findClosestCluster(Vec x,
List<Double> qi) |
protected void |
KernelKMeans.setup(int K,
int[] designations,
Vec W)
Sets up the internal structure for KenrelKMeans.
|
Modifier and Type | Method and Description |
---|---|
protected double |
XMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
NaiveKMeans.cluster(DataSet dataSet,
List<Double> accelCacheInit,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
KMeansPDN.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected abstract double |
KMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights)
This is a helper method where the actual cluster is performed.
|
protected double |
HamerlyKMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
GMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
protected double |
ElkanKMeans.cluster(DataSet dataSet,
List<Double> accelCache,
int k,
List<Vec> means,
int[] assignment,
boolean exactTotal,
ExecutorService threadpool,
boolean returnError,
Vec dataPointWeights) |
Modifier and Type | Method and Description |
---|---|
Vec |
ReliefF.getWeights()
Returns accesses to the learned weight data.
|
Constructor and Description |
---|
ReliefF(ClassificationDataSet cds,
int featureCount,
int m,
int n,
DistanceMetric dm,
VectorCollectionFactory<Vec> vcf)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
ReliefF(ClassificationDataSet cds,
int featureCount,
int m,
int n,
DistanceMetric dm,
VectorCollectionFactory<Vec> vcf,
ExecutorService threadPool)
Creates a new ReliefF object to measure the importance of the variables with
respect to a classification task.
|
ReliefF(int featureCount,
int m,
int n,
DistanceMetric dm,
VectorCollectionFactory<Vec> vcf)
Creates a new ReliefF object to measure the importance of the variables
with respect to a classification task.
|
Modifier and Type | Method and Description |
---|---|
static List<Vec> |
Nystrom.sampleBasisVectors(KernelTrick k,
DataSet dataset,
List<Vec> X,
Nystrom.SamplingMethod method,
int basisSize,
boolean sampleWithReplacment,
Random rand)
Performs sampling of a data set for a subset of the vectors that make a
good set of basis vectors for forming an approximation of a full kernel
space.
|
Modifier and Type | Method and Description |
---|---|
static List<Vec> |
Nystrom.sampleBasisVectors(KernelTrick k,
DataSet dataset,
List<Vec> X,
Nystrom.SamplingMethod method,
int basisSize,
boolean sampleWithReplacment,
Random rand)
Performs sampling of a data set for a subset of the vectors that make a
good set of basis vectors for forming an approximation of a full kernel
space.
|
Modifier and Type | Method and Description |
---|---|
static ContinuousDistribution |
DistributionSearch.getBestDistribution(Vec v)
Searches the distributions that are known for a possible fit, and returns
what appears to be the best fit.
|
static ContinuousDistribution |
DistributionSearch.getBestDistribution(Vec v,
ContinuousDistribution... possibleDistributions)
Searches the distributions that are given for a possible fit, and returns
what appears to be the best fit.
|
static ContinuousDistribution |
DistributionSearch.getBestDistribution(Vec v,
double KDECutOff)
Searches the distributions that are known for a possible fit, and returns
what appears to be the best fit.
|
static ContinuousDistribution |
DistributionSearch.getBestDistribution(Vec v,
double KDECutOff,
ContinuousDistribution... possibleDistributions)
Searches the distributions that are given for a possible fit, and returns
what appears to be the best fit.
|
void |
Weibull.setUsingData(Vec data) |
void |
Uniform.setUsingData(Vec data) |
void |
TruncatedDistribution.setUsingData(Vec data) |
void |
StudentT.setUsingData(Vec data) |
void |
Rayleigh.setUsingData(Vec data) |
void |
Pareto.setUsingData(Vec data) |
void |
Normal.setUsingData(Vec data) |
void |
MaxwellBoltzmann.setUsingData(Vec data) |
void |
LogUniform.setUsingData(Vec data) |
void |
LogNormal.setUsingData(Vec data) |
void |
Logistic.setUsingData(Vec data) |
void |
Levy.setUsingData(Vec data) |
void |
Laplace.setUsingData(Vec data) |
void |
Kolmogorov.setUsingData(Vec data) |
void |
Gamma.setUsingData(Vec data) |
void |
FisherSendor.setUsingData(Vec data) |
void |
Exponential.setUsingData(Vec data) |
abstract void |
ContinuousDistribution.setUsingData(Vec data)
Attempts to set the variables used by this distribution based on population sample data,
assuming the sample data is from this type of distribution.
|
void |
ChiSquared.setUsingData(Vec data) |
void |
Cauchy.setUsingData(Vec data) |
void |
Beta.setUsingData(Vec data) |
Modifier and Type | Method and Description |
---|---|
static KernelFunction |
KernelDensityEstimator.autoKernel(Vec dataPoints)
Automatically selects a good Kernel function for the data set that balances Execution time and accuracy
|
static double |
KernelDensityEstimator.BandwithGuassEstimate(Vec X) |
void |
KernelDensityEstimator.setUsingData(Vec data) |
Constructor and Description |
---|
KernelDensityEstimator(Vec dataPoints) |
KernelDensityEstimator(Vec dataPoints,
KernelFunction k) |
KernelDensityEstimator(Vec dataPoints,
KernelFunction k,
double h) |
KernelDensityEstimator(Vec dataPoints,
KernelFunction k,
double[] weights) |
KernelDensityEstimator(Vec dataPoints,
KernelFunction k,
double h,
double[] weights) |
Modifier and Type | Field and Description |
---|---|
protected List<Vec> |
KernelPoint.vecs |
Modifier and Type | Method and Description |
---|---|
List<Vec> |
KernelPoints.getRawBasisVecs()
Returns a list of the raw vectors being used by the kernel points.
|
List<Vec> |
KernelPoint.getRawBasisVecs()
Returns the list of the raw vectors being used by the kernel points.
|
Modifier and Type | Method and Description |
---|---|
void |
NormalizedKernel.addToCache(Vec newVec,
List<Double> cache) |
void |
KernelTrick.addToCache(Vec newVec,
List<Double> cache)
Appends the new cache values for the given vector to the list of cache
values.
|
void |
DistanceMetricBasedKernel.addToCache(Vec newVec,
List<Double> cache) |
void |
BaseL2Kernel.addToCache(Vec newVec,
List<Double> cache) |
void |
BaseKernelTrick.addToCache(Vec newVec,
List<Double> cache) |
double |
KernelPoints.dist(int k,
Vec x,
List<Double> qi)
Computes the Euclidean distance in the kernel space between the
k 'th KernelPoint and the given vector |
double |
KernelPoint.dist(Vec x)
Computes the Euclidean distance between this kernel point and the given
input in the kernel space
|
double |
KernelPoint.dist(Vec x,
List<Double> qi)
Computes the Euclidean distance between this kernel point and the given
input in the kernel space
|
double |
KernelPoints.dot(int k,
Vec x,
List<Double> qi)
Computes the dot product between the
k 'th KernelPoint and the
given vector in the kernel space. |
double |
KernelPoint.dot(Vec x)
Computes the dot product between the kernel point this object represents
and the given input vector in the kernel space.
|
double[] |
KernelPoints.dot(Vec x,
List<Double> qi)
Computes the dot product between each KernelPoint in this set and the
given vector in the kernel space.
|
double |
KernelPoint.dot(Vec x,
List<Double> qi)
Computes the dot product between the kernel point this object represents
and the given input vector in the kernel space
|
double |
RBFKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
RationalQuadraticKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PukKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelTrick.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache)
Computes the kernel product between one vector in the original list of vectors
with that of another vector not from the original list, but had
information generated by
KernelTrick.getQueryInfo(jsat.linear.Vec) . |
double |
GeneralRBFKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
abstract double |
BaseL2Kernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
BaseKernelTrick.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
SigmoidKernel.eval(Vec a,
Vec b) |
double |
RBFKernel.eval(Vec a,
Vec b) |
double |
RationalQuadraticKernel.eval(Vec a,
Vec b) |
double |
PukKernel.eval(Vec a,
Vec b) |
double |
PolynomialKernel.eval(Vec a,
Vec b) |
double |
NormalizedKernel.eval(Vec a,
Vec b) |
double |
LinearKernel.eval(Vec a,
Vec b) |
double |
KernelTrick.eval(Vec a,
Vec b)
Evaluate this kernel function for the two given vectors.
|
double |
GeneralRBFKernel.eval(Vec a,
Vec b) |
abstract double |
BaseL2Kernel.eval(Vec a,
Vec b) |
double |
NormalizedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
KernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end)
Performs an efficient summation of kernel products of the form
∑ αi k(xi, y) where x are the final set of vectors, and α the associated scalar multipliers |
double |
DistanceMetricBasedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
BaseL2Kernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
BaseKernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
NormalizedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
double |
KernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end)
Performs an efficient summation of kernel products of the form
∑ αi k(xi, y) where x are the final set of vectors, and α the associated scalar multipliers |
double |
DistanceMetricBasedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
double |
BaseL2Kernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
double |
BaseKernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
protected void |
KernelPoint.finalMergeStep(int m,
int n,
Vec n_z,
List<Double> nz_qi,
double n_alpha_z,
boolean alterVecs)
Performs the last merging step removing the old vecs and adding the new
merged one
|
List<Double> |
NormalizedKernel.getQueryInfo(Vec q) |
List<Double> |
KernelTrick.getQueryInfo(Vec q)
Pre computes query information that would have be generated if the query
was a member of the original list of vectors when calling
KernelTrick.getAccelerationCache(java.util.List) . |
List<Double> |
DistanceMetricBasedKernel.getQueryInfo(Vec q) |
List<Double> |
BaseL2Kernel.getQueryInfo(Vec q) |
List<Double> |
BaseKernelTrick.getQueryInfo(Vec q) |
protected double |
BaseL2Kernel.getSqrdNorm(int i,
Vec y,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache)
Returns the squared L2 norm between a point in the cache and one with a provided qi value
|
void |
KernelPoint.mutableAdd(double c,
Vec x_t)
Alters this point to contain the given input vector as well
|
void |
KernelPoint.mutableAdd(double c,
Vec x_t,
List<Double> qi)
Alters this point to contain the given input vector as well
|
void |
KernelPoints.mutableAdd(int k,
double c,
Vec x_t,
List<Double> qi)
Alters ones of the KernelPoint objects by adding / subtracting a vector
from it
|
void |
KernelPoint.mutableAdd(Vec x_t)
Alters this point to contain the given input vector as well
|
void |
KernelPoints.mutableAdd(Vec x_t,
Vec cs,
List<Double> qi)
Alters some of the KernelPoints by adding / subtracting a vector from it
|
Modifier and Type | Method and Description |
---|---|
double |
RBFKernel.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache) |
double |
RationalQuadraticKernel.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache) |
double |
PukKernel.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache) |
double |
NormalizedKernel.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache) |
double |
KernelTrick.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache)
Produces the correct kernel evaluation given the training set and the
cache generated by
KernelTrick.getAccelerationCache(List) . |
double |
GeneralRBFKernel.eval(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
abstract double |
BaseL2Kernel.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache) |
double |
BaseKernelTrick.eval(int a,
int b,
List<? extends Vec> trainingSet,
List<Double> cache) |
double |
RBFKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
RationalQuadraticKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PukKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelTrick.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache)
Computes the kernel product between one vector in the original list of vectors
with that of another vector not from the original list, but had
information generated by
KernelTrick.getQueryInfo(jsat.linear.Vec) . |
double |
GeneralRBFKernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
abstract double |
BaseL2Kernel.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
BaseKernelTrick.eval(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
KernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end)
Performs an efficient summation of kernel products of the form
∑ αi k(xi, y) where x are the final set of vectors, and α the associated scalar multipliers |
double |
DistanceMetricBasedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
BaseL2Kernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
BaseKernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
int start,
int end) |
double |
NormalizedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
double |
KernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end)
Performs an efficient summation of kernel products of the form
∑ αi k(xi, y) where x are the final set of vectors, and α the associated scalar multipliers |
double |
DistanceMetricBasedKernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
double |
BaseL2Kernel.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
double |
BaseKernelTrick.evalSum(List<? extends Vec> finalSet,
List<Double> cache,
double[] alpha,
Vec y,
List<Double> qi,
int start,
int end) |
List<Double> |
NormalizedKernel.getAccelerationCache(List<? extends Vec> trainingSet) |
List<Double> |
KernelTrick.getAccelerationCache(List<? extends Vec> trainingSet)
Creates a new list cache values from a given list of training set
vectors.
|
List<Double> |
DistanceMetricBasedKernel.getAccelerationCache(List<? extends Vec> trainingSet) |
List<Double> |
BaseL2Kernel.getAccelerationCache(List<? extends Vec> trainingSet) |
List<Double> |
BaseKernelTrick.getAccelerationCache(List<? extends Vec> trainingSet) |
protected double |
BaseL2Kernel.getSqrdNorm(int i,
int j,
List<? extends Vec> vecs,
List<Double> cache)
Returns the squared L2 norm between two points from the cache values.
|
protected double |
BaseL2Kernel.getSqrdNorm(int i,
List<? extends Vec> vecs,
List<Double> cache)
Returns the squared L2 norm of the given point from the cache
|
protected double |
BaseL2Kernel.getSqrdNorm(int i,
Vec y,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache)
Returns the squared L2 norm between a point in the cache and one with a provided qi value
|
Modifier and Type | Method and Description |
---|---|
<V extends Vec> |
SymmetricDirichlet.setUsingData(List<V> dataSet) |
<V extends Vec> |
ProductKDE.setUsingData(List<V> dataSet) |
<V extends Vec> |
NormalM.setUsingData(List<V> dataSet) |
<V extends Vec> |
MultivariateDistribution.setUsingData(List<V> dataSet)
Sets the parameters of the distribution to attempt to fit the given list of vectors.
|
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet) |
<V extends Vec> |
Dirichlet.setUsingData(List<V> dataSet) |
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
double bandwith)
Sets the KDE to model the density of the given data set with the specified bandwidth
|
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
double bandwith,
ExecutorService threadpool)
Sets the KDE to model the density of the given data set with the specified bandwidth
|
<V extends Vec> |
MultivariateDistributionSkeleton.setUsingData(List<V> dataSet,
ExecutorService threadpool) |
<V extends Vec> |
MultivariateDistribution.setUsingData(List<V> dataSet,
ExecutorService threadpool)
Sets the parameters of the distribution to attempt to fit the given list of vectors.
|
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
ExecutorService threadpool) |
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
int k)
Sets the KDE to model the density of the given data set by estimating the bandwidth by using
the k nearest neighbors of each data point.
|
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
int k,
double stndDevs)
Sets the KDE to model the density of the given data set by estimating the bandwidth
by using the k nearest neighbors of each data data point.
|
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
int k,
double stndDevs,
ExecutorService threadpool)
Sets the KDE to model the density of the given data set by estimating the bandwidth
by using the k nearest neighbors of each data data point.
|
<V extends Vec> |
MetricKDE.setUsingData(List<V> dataSet,
int k,
ExecutorService threadpool)
Sets the KDE to model the density of the given data set by estimating the bandwidth by using
the k nearest neighbors of each data point.
|
Modifier and Type | Method and Description |
---|---|
Vec |
Dirichlet.getAlphas()
Returns the backing vector that contains the alphas specifying the current distribution.
|
Modifier and Type | Method and Description |
---|---|
List<VecPaired<VecPaired<Vec,Integer>,Double>> |
ProductKDE.getNearby(Vec x) |
abstract List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MultivariateKDE.getNearby(Vec x)
Returns the list of vectors that have a non zero contribution to the density of the query point x.
|
List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MetricKDE.getNearby(Vec x) |
List<VecPaired<VecPaired<Vec,Integer>,Double>> |
ProductKDE.getNearbyRaw(Vec x) |
abstract List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MultivariateKDE.getNearbyRaw(Vec x)
Returns the list of vectors that have a non zero contribution to the density of the query point x.
|
List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MetricKDE.getNearbyRaw(Vec x) |
List<Vec> |
SymmetricDirichlet.sample(int count,
Random rand) |
List<Vec> |
ProductKDE.sample(int count,
Random rand) |
List<Vec> |
NormalM.sample(int count,
Random rand) |
List<Vec> |
MultivariateDistribution.sample(int count,
Random rand)
Performs sampling on the current distribution.
|
List<Vec> |
MetricKDE.sample(int count,
Random rand)
Sampling not yet supported
|
List<Vec> |
Dirichlet.sample(int count,
Random rand) |
Modifier and Type | Method and Description |
---|---|
List<VecPaired<VecPaired<Vec,Integer>,Double>> |
ProductKDE.getNearby(Vec x) |
abstract List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MultivariateKDE.getNearby(Vec x)
Returns the list of vectors that have a non zero contribution to the density of the query point x.
|
List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MetricKDE.getNearby(Vec x) |
List<VecPaired<VecPaired<Vec,Integer>,Double>> |
ProductKDE.getNearbyRaw(Vec x) |
abstract List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MultivariateKDE.getNearbyRaw(Vec x)
Returns the list of vectors that have a non zero contribution to the density of the query point x.
|
List<? extends VecPaired<VecPaired<Vec,Integer>,Double>> |
MetricKDE.getNearbyRaw(Vec x) |
double |
SymmetricDirichlet.logPdf(Vec x) |
double |
NormalM.logPdf(Vec x) |
double |
MultivariateDistributionSkeleton.logPdf(Vec x) |
double |
MultivariateDistribution.logPdf(Vec x)
Computes the log of the probability density function.
|
double |
Dirichlet.logPdf(Vec x) |
double |
SymmetricDirichlet.pdf(Vec x) |
double |
ProductKDE.pdf(Vec x) |
double |
NormalM.pdf(Vec x) |
double |
MultivariateDistribution.pdf(Vec x)
Returns the probability of a given vector from this distribution.
|
double |
MetricKDE.pdf(Vec x) |
double |
Dirichlet.pdf(Vec x) |
void |
Dirichlet.setAlphas(Vec alphas)
Sets the alphas of the distribution.
|
void |
NormalM.setMeanCovariance(Vec mean,
Matrix covariance)
Sets the mean and covariance for this distribution.
|
Constructor and Description |
---|
Dirichlet(Vec alphas)
Creates a new Dirichlet distribution.
|
NormalM(Vec mean,
Matrix covariance) |
Constructor and Description |
---|
MetricKDE(DistanceMetric distanceMetric,
VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Creates a new KDE object that still needs a data set to model the distribution of
|
MetricKDE(KernelFunction kf,
DistanceMetric distanceMetric,
VectorCollectionFactory<VecPaired<Vec,Integer>> vcf)
Creates a new KDE object that still needs a data set to model the distribution of
|
MetricKDE(KernelFunction kf,
DistanceMetric distanceMetric,
VectorCollectionFactory<VecPaired<Vec,Integer>> vcf,
int defaultK,
double defaultStndDev)
Creates a new KDE object that still needs a data set to model the distribution of
|
Modifier and Type | Class and Description |
---|---|
class |
VecPaired<V extends Vec,P>
This data structure allows to wrap a Vector so that it is
associated with some object time.
|
class |
VecPairedComparable<V extends Vec,P extends Comparable<P>>
Utility class for using
VecPaired when the paired value is comparable
, and the vectors need to be sorted based on their paired value. |
Modifier and Type | Class and Description |
---|---|
class |
ConcatenatedVec
ConcatenatedVec provides a light wrapper around a list of vectors to provide
a view of one single vector that's length is the sum of the lengths of the
inputs.
|
class |
ConstantVector
This class provides a simple utility to represent an immutable vector where
all values in the vector must have the same constant value.
|
class |
DenseVector
A vector implementation that is dense, meaning all values are allocated -
even if their values will be implicitly zero.
|
class |
Poly2Vec
This class is used to create an implicit representation of the degree 2
polynomial of an input vector, with an implicit bias term added so that the
original vector values are present in the implicit vector.
|
class |
RandomVector
Stores a Vector full of random values in constant O(1) space by re-computing
all matrix values on the fly as need.
|
class |
ScaledVector
A wrapper for a vector that represents the vector multiplied by a scalar
constant.
|
class |
ShiftedVec
A wrapper for a vector that represents the vector added with a scalar value.
|
class |
SparseVector
Provides a vector implementation that is sparse.
|
class |
SubVector
SubVector takes an already existing vector and creates a new one that is a
subset of and backed by the original one.
|
class |
VecPaired<V extends Vec,P>
This data structure allows to wrap a Vector so that it is
associated with some object time.
|
class |
VecPairedComparable<V extends Vec,P extends Comparable<P>>
Utility class for using
VecPaired when the paired value is comparable
, and the vectors need to be sorted based on their paired value. |
class |
VecWithNorm
A wrapper for a vector that allows for transparent tracking of the 2-norm of
the base vector.
|
Modifier and Type | Method and Description |
---|---|
static <V extends Vec> |
MatrixStatistics.covarianceDiag(Vec means,
List<V> dataset)
Computes the diagonal of the covariance matrix, which is the standard
deviations of the columns of all values.
|
static <V extends Vec> |
MatrixStatistics.covarianceDiag(Vec means,
Vec diag,
List<V> dataset)
Computes the diagonal of the covariance matrix, which is the standard
deviations of the columns of all values.
|
static <V extends Vec> |
MatrixStatistics.covarianceMatrix(Vec mean,
List<V> dataSet) |
static <V extends Vec> |
MatrixStatistics.covarianceMatrix(Vec mean,
Matrix covariance,
List<V> dataSet) |
static <V extends Vec> |
MatrixStatistics.meanVector(List<V> dataSet)
Computes the mean of the given data set.
|
static <V extends Vec> |
MatrixStatistics.meanVector(Vec mean,
List<V> dataSet)
Computes the mean of the given data set.
|
static <V extends Vec,P extends Comparable<P>> |
VecPaired.vecPairedComparator() |
Modifier and Type | Method and Description |
---|---|
Vec |
VecPaired.add(double c) |
Vec |
Vec.add(double c)
Returns a new vector that is the result of
this + c |
Vec |
VecPaired.add(Vec b) |
Vec |
Vec.add(Vec b)
Returns a new vector that is the result of
this + b |
static Vec |
LUPDecomposition.backSub(Matrix U,
Vec y)
Solves for the vector x such that U x = y
|
Vec |
VecPaired.clone() |
abstract Vec |
Vec.clone() |
Vec |
SubVector.clone() |
Vec |
ScaledVector.clone() |
abstract Vec |
RandomVector.clone() |
Vec |
Poly2Vec.clone() |
Vec |
DenseVector.clone() |
static Vec |
MatrixStatistics.covarianceDiag(Vec means,
DataSet dataset)
Computes the weighted diagonal of the covariance matrix, which is the
standard deviations of the columns of all values.
|
static <V extends Vec> |
MatrixStatistics.covarianceDiag(Vec means,
List<V> dataset)
Computes the diagonal of the covariance matrix, which is the standard
deviations of the columns of all values.
|
Vec |
VecPaired.divide(double c) |
Vec |
Vec.divide(double c)
Returns a new vector that is the result of
this / c |
static Vec |
VecPaired.extractTrueVec(Vec b)
This method is used assuming multiple VecPaired are used together.
|
static Vec |
LUPDecomposition.forwardSub(Matrix L,
Vec b)
Solves for the vector x such that L x = b
|
Vec |
VecWithNorm.getBase()
Return the base vector that is having its norm tracked
|
Vec |
ShiftedVec.getBase() |
Vec |
ScaledVector.getBase()
Returns the base vector that is being scaled
|
Vec |
Matrix.getColumn(int j)
Creates a vector that has a copy of the values in column j of this
matrix.
|
Vec |
TransposeView.getColumnView(int j) |
Vec |
SubMatrix.getColumnView(int j) |
Vec |
Matrix.getColumnView(int j)
Obtains a vector that is backed by this, at very little memory
cost.
|
Vec |
Matrix.getRow(int r)
Creates a vector that has a copy of the values in row i of this
matrix.
|
Vec |
TransposeView.getRowView(int r) |
Vec |
SubMatrix.getRowView(int r) |
Vec |
SparseMatrix.getRowView(int r) |
Vec |
MatrixOfVecs.getRowView(int r) |
Vec |
Matrix.getRowView(int r)
Obtains a vector that is backed by this, at very little memory
cost.
|
Vec |
DenseMatrix.getRowView(int r) |
static Vec |
MatrixStatistics.meanVector(DataSet dataSet)
Computes the weighted mean of the given data set.
|
static <V extends Vec> |
MatrixStatistics.meanVector(List<V> dataSet)
Computes the mean of the given data set.
|
Vec |
VecPaired.multiply(double c) |
Vec |
Vec.multiply(double c)
Returns a new vector that is the result of
this * c |
Vec |
Vec.multiply(Matrix A)
Returns a new vector that is the result of the vector matrix product
thisTA
|
Vec |
Matrix.multiply(Vec b)
Creates a new vector that is equal to A*b
|
Vec |
VecPaired.normalized() |
Vec |
Vec.normalized()
Returns a new vector that is the result of normalizing this vector by the
L2 norm
|
Vec |
ConstantVector.normalized() |
Vec |
VecPaired.pairwiseDivide(Vec b) |
Vec |
Vec.pairwiseDivide(Vec b)
Returns a new vector that is the result of dividing each value in
this by the value in the same index in b |
Vec |
VecPaired.pairwiseMultiply(Vec b) |
Vec |
Vec.pairwiseMultiply(Vec b)
Returns a new vector that is the result of multiplying each value in
this by its corresponding value in b |
static Vec |
Vec.random(int length)
Creates a dense vector full of random values in the range [0, 1]
|
static Vec |
Vec.random(int length,
Random rand)
Creates a dense vector full of random values in the range [0, 1]
|
Vec |
SingularValueDecomposition.solve(Vec b)
Solves the linear system of equations for A x = b by using the equation
x = A-1 b = V S-1 UT b
When A is not full rank, this results in a more numerically stable approximation that minimizes the least squares error. |
Vec |
QRDecomposition.solve(Vec b) |
Vec |
LUPDecomposition.solve(Vec b) |
Vec |
CholeskyDecomposition.solve(Vec b)
Solves the linear system of equations A x = b
|
Vec |
VecPaired.sortedCopy() |
Vec |
Vec.sortedCopy()
Returns a copy of this array with the values moved around so that they are in sorted order
|
Vec |
SparseVector.sortedCopy() |
Vec |
ScaledVector.sortedCopy() |
Vec |
RandomVector.sortedCopy() |
Vec |
Vec.subtract(double c)
Returns a new vector that is the result of
this - c |
Vec |
VecPaired.subtract(Vec b) |
Vec |
Vec.subtract(Vec b)
Returns a new vector that is the result of
this - b |
Vec |
Matrix.transposeMultiply(double c,
Vec b)
Creates a new vector equal to x = A'*b*c
|
static Vec |
Vec.zeros(int length)
Creates a dense vector full of zeros.
|
Modifier and Type | Method and Description |
---|---|
static double |
VecOps.accumulateSum(Vec w,
Vec x,
Vec y,
Function f)
Computes the result of ∑∀ i ∈ |w| wi
f(xi-yi)
|
Vec |
VecPaired.add(Vec b) |
Vec |
Vec.add(Vec b)
Returns a new vector that is the result of
this + b |
static void |
RowColumnOps.addMultCol(Matrix A,
int j,
int start,
int to,
double t,
Vec c)
Updates the values of column j in the given matrix to be A[:,j] = A[:,j]+c[:]*t.
The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range. |
static void |
RowColumnOps.addMultRow(Matrix A,
int i,
int start,
int to,
double t,
Vec c)
Updates the values of row i in the given matrix to be A[i,:] = A[i,:]+c[:]*t.
The Matrix A and array c do not need to have the same dimensions, so long as they both have indices in the given range. |
static Vec |
LUPDecomposition.backSub(Matrix U,
Vec y)
Solves for the vector x such that U x = y
|
void |
Vec.copyTo(Vec destination)
Copies the values of this Vector into another vector
|
void |
SparseVector.copyTo(Vec destination) |
static Vec |
MatrixStatistics.covarianceDiag(Vec means,
DataSet dataset)
Computes the weighted diagonal of the covariance matrix, which is the
standard deviations of the columns of all values.
|
static <V extends Vec> |
MatrixStatistics.covarianceDiag(Vec means,
List<V> dataset)
Computes the diagonal of the covariance matrix, which is the standard
deviations of the columns of all values.
|
static void |
MatrixStatistics.covarianceDiag(Vec means,
Vec diag,
DataSet dataset)
Computes the weighted diagonal of the covariance matrix, which is the
standard deviations of the columns of all values.
|
static <V extends Vec> |
MatrixStatistics.covarianceDiag(Vec means,
Vec diag,
List<V> dataset)
Computes the diagonal of the covariance matrix, which is the standard
deviations of the columns of all values.
|
static Matrix |
MatrixStatistics.covarianceMatrix(Vec mean,
DataSet dataSet)
Computes the weighted covariance matrix of the data set
|
static void |
MatrixStatistics.covarianceMatrix(Vec mean,
DataSet dataSet,
Matrix covariance)
Computes the weighted covariance matrix of the given data set.
|
static void |
MatrixStatistics.covarianceMatrix(Vec mean,
DataSet dataSet,
Matrix covariance,
double sumOfWeights,
double sumOfSquaredWeights)
Computes the weighted covariance matrix of the given data set.
|
static void |
MatrixStatistics.covarianceMatrix(Vec mean,
List<DataPoint> dataSet,
Matrix covariance)
Computes the weighted result for the covariance matrix of the given data set.
|
static void |
MatrixStatistics.covarianceMatrix(Vec mean,
List<DataPoint> dataSet,
Matrix covariance,
double sumOfWeights,
double sumOfSquaredWeights)
Computes the weighted result for the covariance matrix of the given data set.
|
static <V extends Vec> |
MatrixStatistics.covarianceMatrix(Vec mean,
List<V> dataSet) |
static <V extends Vec> |
MatrixStatistics.covarianceMatrix(Vec mean,
Matrix covariance,
List<V> dataSet) |
static Matrix |
Matrix.diag(Vec a)
Returns a new dense square matrix such that the main diagonal contains
the values given in a
|
static void |
Matrix.diagMult(Matrix A,
Vec b)
Alters the matrix A so that it contains the result of A
times a sparse matrix represented by only its diagonal values or
A = A*diag(b).
|
static void |
Matrix.diagMult(Vec b,
Matrix A)
Alters the matrix A so that it contains the result of
sparse matrix represented by only its diagonal values times A or
A = diag(b)*A.
|
static void |
RowColumnOps.divCol(Matrix A,
int j,
int start,
int to,
Vec c)
Updates the values of column j in the given matrix to be A[:,j] = A[:,j]/c[j].
The Matrix A and vector c do not need to have the same dimensions, so long as they both have indices in the given range. |
double |
VecPaired.dot(Vec v) |
double |
Vec.dot(Vec v)
Computes the dot product between two vectors, which is equivalent to
Σ thisi*vi This method should be overloaded for a serious implementation. |
double |
SparseVector.dot(Vec v) |
double |
ShiftedVec.dot(Vec v) |
double |
ScaledVector.dot(Vec v) |
double |
RandomVector.dot(Vec v) |
double |
DenseVector.dot(Vec v) |
static Vec |
VecPaired.extractTrueVec(Vec b)
This method is used assuming multiple VecPaired are used together.
|
static Vec |
LUPDecomposition.forwardSub(Matrix L,
Vec b)
Solves for the vector x such that L x = b
|
static void |
MatrixStatistics.meanVector(Vec mean,
DataSet dataSet)
Computes the weighted mean of the data set
|
static <V extends Vec> |
MatrixStatistics.meanVector(Vec mean,
List<V> dataSet)
Computes the mean of the given data set.
|
void |
VecPaired.multiply(double c,
Matrix A,
Vec b) |
void |
Vec.multiply(double c,
Matrix A,
Vec b)
If this is vector a, this this computes b = b + c aT*A
|
void |
SparseVector.multiply(double c,
Matrix A,
Vec b) |
void |
ScaledVector.multiply(double c,
Matrix A,
Vec b) |
void |
RandomVector.multiply(double c,
Matrix A,
Vec b) |
void |
DenseVector.multiply(double c,
Matrix A,
Vec b) |
void |
Vec.multiply(Matrix A,
Vec b)
If this is vector a, this this computes b = b + aT*A
|
Vec |
Matrix.multiply(Vec b)
Creates a new vector that is equal to A*b
|
void |
SparseMatrix.multiply(Vec b,
double z,
Vec c) |
void |
MatrixOfVecs.multiply(Vec b,
double z,
Vec c) |
abstract void |
Matrix.multiply(Vec b,
double z,
Vec c)
If this matrix is Am x n, and b has a length of n, and c has a length of m,
then this will mutate c to store c = c + A*b*z
|
void |
GenericMatrix.multiply(Vec b,
double z,
Vec c) |
void |
DenseMatrix.multiply(Vec b,
double z,
Vec c) |
static void |
RowColumnOps.multRow(Matrix A,
int i,
int start,
int to,
Vec c)
Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i]
The Matrix A and vector c do not need to have the same dimensions,
so long as they both have indices in the given range.
|
static void |
RowColumnOps.multRow(Matrix A,
int i,
Vec c)
Updates the values of row i in the given matrix to be A[i,:] = A[i,:] .* c[i]
The Matrix A and vector c do not need to have the same dimensions,
so long as they both have indices in the given range.
|
void |
VecWithNorm.mutableAdd(double c,
Vec b) |
void |
VecPaired.mutableAdd(double c,
Vec b) |
void |
Vec.mutableAdd(double c,
Vec b)
Alters this vector such that
this = this + c * b
This method should be overloaded for a serious implementation. |
void |
SparseVector.mutableAdd(double c,
Vec v) |
void |
ShiftedVec.mutableAdd(double c,
Vec b) |
void |
ScaledVector.mutableAdd(double c,
Vec b) |
void |
RandomVector.mutableAdd(double c,
Vec b) |
void |
DenseVector.mutableAdd(double c,
Vec b) |
void |
ConcatenatedVec.mutableAdd(double c,
Vec b) |
void |
VecPaired.mutableAdd(Vec b) |
void |
Vec.mutableAdd(Vec b)
Alters this vector such that
this = this + b
|
void |
ShiftedVec.mutableAdd(Vec b) |
void |
VecWithNorm.mutablePairwiseDivide(Vec b) |
void |
VecPaired.mutablePairwiseDivide(Vec b) |
void |
Vec.mutablePairwiseDivide(Vec b)
Mutates
this by dividing each value by the value in b
that has the same index
This method should be overloaded for a serious implementation. |
void |
SparseVector.mutablePairwiseDivide(Vec b) |
void |
ShiftedVec.mutablePairwiseDivide(Vec b) |
void |
ScaledVector.mutablePairwiseDivide(Vec b) |
void |
RandomVector.mutablePairwiseDivide(Vec b) |
void |
DenseVector.mutablePairwiseDivide(Vec b) |
void |
VecWithNorm.mutablePairwiseMultiply(Vec b) |
void |
VecPaired.mutablePairwiseMultiply(Vec b) |
void |
Vec.mutablePairwiseMultiply(Vec b)
Mutates
this by multiplying each value by the value in b
that has the same index. |
void |
SparseVector.mutablePairwiseMultiply(Vec b) |
void |
ShiftedVec.mutablePairwiseMultiply(Vec b) |
void |
ScaledVector.mutablePairwiseMultiply(Vec b) |
void |
RandomVector.mutablePairwiseMultiply(Vec b) |
void |
DenseVector.mutablePairwiseMultiply(Vec b) |
void |
Vec.mutableSubtract(double c,
Vec b)
Alters this vector such that
this = this - c * b
|
void |
VecPaired.mutableSubtract(Vec b) |
void |
Vec.mutableSubtract(Vec b)
Alters this vector such that
this = this - b
|
static void |
Matrix.OuterProductUpdate(Matrix A,
Vec x,
Vec y,
double c)
Alters the matrix A such that,
A = A + c * x * y'
|
static void |
Matrix.OuterProductUpdate(Matrix A,
Vec x,
Vec y,
double c,
ExecutorService threadpool)
Alters the matrix A such that,
A = A + c * x * y'
|
Vec |
VecPaired.pairwiseDivide(Vec b) |
Vec |
Vec.pairwiseDivide(Vec b)
Returns a new vector that is the result of dividing each value in
this by the value in the same index in b |
Vec |
VecPaired.pairwiseMultiply(Vec b) |
Vec |
Vec.pairwiseMultiply(Vec b)
Returns a new vector that is the result of multiplying each value in
this by its corresponding value in b |
double |
VecPaired.pNormDist(double p,
Vec y) |
double |
Vec.pNormDist(double p,
Vec y)
Returns the p-norm distance between this and another vector y.
|
double |
SparseVector.pNormDist(double p,
Vec y) |
double |
DenseVector.pNormDist(double p,
Vec y) |
void |
Poly2Vec.setBase(Vec base)
Creates a new vector that implicitly represents the degree 2 polynomial
of the base vector.
|
Vec |
SingularValueDecomposition.solve(Vec b)
Solves the linear system of equations for A x = b by using the equation
x = A-1 b = V S-1 UT b
When A is not full rank, this results in a more numerically stable approximation that minimizes the least squares error. |
Vec |
QRDecomposition.solve(Vec b) |
Vec |
LUPDecomposition.solve(Vec b) |
Vec |
CholeskyDecomposition.solve(Vec b)
Solves the linear system of equations A x = b
|
Vec |
VecPaired.subtract(Vec b) |
Vec |
Vec.subtract(Vec b)
Returns a new vector that is the result of
this - b |
Vec |
Matrix.transposeMultiply(double c,
Vec b)
Creates a new vector equal to x = A'*b*c
|
void |
SparseMatrix.transposeMultiply(double c,
Vec b,
Vec x) |
abstract void |
Matrix.transposeMultiply(double c,
Vec b,
Vec x)
Alters the vector x to be equal to x = x + A'*b*c
|
void |
GenericMatrix.transposeMultiply(double c,
Vec b,
Vec x) |
void |
DenseMatrix.transposeMultiply(double c,
Vec b,
Vec x) |
void |
MatrixOfVecs.updateRow(int i,
double c,
Vec b) |
void |
Matrix.updateRow(int i,
double c,
Vec b)
Alters row i of this matrix, such that
A[i,:] = A[i,:] + c*b
|
static double |
VecOps.weightedDot(Vec w,
Vec x,
Vec y)
Computes the weighted dot product of ∑∀ i ∈ |w| w_i x_i y_i
|
Constructor and Description |
---|
ConcatenatedVec(Vec... vecs)
Creates a new Vector that is the concatenation of the given vectors in
the given order.
|
DenseMatrix(Vec a,
Vec b)
Creates a new matrix based off the given vectors.
|
DenseVector(Vec toCopy)
Creates a new Dense Vector that contains a copy of the values in the
given vector
|
MatrixOfVecs(Vec... rows)
Creates a new Matrix of Vecs from the given array of Vec objects.
|
Poly2Vec(Vec base) |
ScaledVector(double scale,
Vec base)
Creates a new scaled vector
|
ScaledVector(Vec vec)
Creates a new scaled vector with a default scale of 1.
|
ShiftedVec(Vec base,
double shift)
Creates a new vector represented as
base+shift |
SparseVector(Vec toCopy)
Creates a new sparse vector by copying the values from another
|
SubVector(int startPosition,
int length,
Vec vec)
Creates a new sub vector of the input vector
|
VecWithNorm(Vec base)
Creates a wrapper around the base vector that will update the norm of the
vector
|
VecWithNorm(Vec base,
double norm)
Creates a wrapper around the base vector that will update the norm of the
vector
|
Constructor and Description |
---|
ConcatenatedVec(List<Vec> vecs)
Creates a new Vector that is the concatenation of the given vectors in
the given order.
|
MatrixOfVecs(List<Vec> rows)
Creates a new Matrix of Vecs from the given list of Vec objects.
|
Modifier and Type | Method and Description |
---|---|
abstract <V extends Vec> |
TrainableDistanceMetric.train(List<V> dataSet)
Trains this metric on the given data set
|
<V extends Vec> |
NormalizedEuclideanDistance.train(List<V> dataSet) |
<V extends Vec> |
MahalanobisDistance.train(List<V> dataSet) |
abstract <V extends Vec> |
TrainableDistanceMetric.train(List<V> dataSet,
ExecutorService threadpool)
Trains this metric on the given data set
|
<V extends Vec> |
NormalizedEuclideanDistance.train(List<V> dataSet,
ExecutorService threadpool) |
<V extends Vec> |
MahalanobisDistance.train(List<V> dataSet,
ExecutorService threadpool) |
static <V extends Vec> |
TrainableDistanceMetric.trainIfNeeded(DistanceMetric dm,
List<V> dataset)
Static helper method for training a distance metric only if it is needed.
|
static <V extends Vec> |
TrainableDistanceMetric.trainIfNeeded(DistanceMetric dm,
List<V> dataset,
ExecutorService threadpool) |
Modifier and Type | Method and Description |
---|---|
Vec |
WeightedEuclideanDistance.getWeight()
Returns the weight vector used by this object.
|
Modifier and Type | Method and Description |
---|---|
static double |
PearsonDistance.correlation(Vec a,
Vec b,
boolean bothNonZero)
Computes the Pearson correlation between two vectors.
|
double |
MinkowskiDistance.dist(double summaryConst,
Vec main,
Vec target) |
double |
ManhattanDistance.dist(double summaryConst,
Vec main,
Vec target) |
double |
EuclideanDistance.dist(double summaryConst,
Vec main,
Vec target) |
double |
DenseSparseMetric.dist(double summaryConst,
Vec main,
Vec target)
Efficiently computes the distance from one main vector that is used many
times, to some sparse target vector.
|
double |
WeightedEuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
SquaredEuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PearsonDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedEuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MinkowskiDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ManhattanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MahalanobisDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
EuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
DistanceMetric.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache)
Computes the distance between one vector in the original list of vectors
with that of another vector not from the original list.
|
double |
DistanceCounter.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistanceNormalized.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ChebyshevDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
WeightedEuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
SquaredEuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PearsonDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedEuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MinkowskiDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ManhattanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MahalanobisDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
EuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
DistanceMetric.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache)
Computes the distance between one vector in the original list of vectors
with that of another vector not from the original list, but had
information generated by
DistanceMetric.getQueryInfo(jsat.linear.Vec) . |
double |
DistanceCounter.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistanceNormalized.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ChebyshevDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
WeightedEuclideanDistance.dist(Vec a,
Vec b) |
double |
SquaredEuclideanDistance.dist(Vec a,
Vec b) |
double |
PearsonDistance.dist(Vec a,
Vec b) |
double |
NormalizedEuclideanDistance.dist(Vec a,
Vec b) |
double |
MinkowskiDistance.dist(Vec a,
Vec b) |
double |
ManhattanDistance.dist(Vec a,
Vec b) |
double |
MahalanobisDistance.dist(Vec a,
Vec b) |
double |
KernelDistance.dist(Vec a,
Vec b)
Returns the square of the distance function expanded as kernel methods.
|
double |
EuclideanDistance.dist(Vec a,
Vec b) |
double |
DistanceMetric.dist(Vec a,
Vec b)
Computes the distance between 2 vectors.
|
double |
DistanceCounter.dist(Vec a,
Vec b) |
double |
CosineDistanceNormalized.dist(Vec a,
Vec b) |
double |
CosineDistance.dist(Vec a,
Vec b) |
double |
ChebyshevDistance.dist(Vec a,
Vec b) |
List<Double> |
WeightedEuclideanDistance.getQueryInfo(Vec q) |
List<Double> |
SquaredEuclideanDistance.getQueryInfo(Vec q) |
List<Double> |
PearsonDistance.getQueryInfo(Vec q) |
List<Double> |
NormalizedEuclideanDistance.getQueryInfo(Vec q) |
List<Double> |
MinkowskiDistance.getQueryInfo(Vec q) |
List<Double> |
ManhattanDistance.getQueryInfo(Vec q) |
List<Double> |
MahalanobisDistance.getQueryInfo(Vec q) |
List<Double> |
KernelDistance.getQueryInfo(Vec q) |
List<Double> |
EuclideanDistance.getQueryInfo(Vec q) |
List<Double> |
DistanceMetric.getQueryInfo(Vec q)
Pre computes query information that would have be generated if the query
was a member of the original list of vectors when calling
DistanceMetric.getAccelerationCache(java.util.List) . |
List<Double> |
DistanceCounter.getQueryInfo(Vec q) |
List<Double> |
CosineDistanceNormalized.getQueryInfo(Vec q) |
List<Double> |
CosineDistance.getQueryInfo(Vec q) |
List<Double> |
ChebyshevDistance.getQueryInfo(Vec q) |
double |
MinkowskiDistance.getVectorConstant(Vec vec) |
double |
ManhattanDistance.getVectorConstant(Vec vec) |
double |
EuclideanDistance.getVectorConstant(Vec vec) |
double |
DenseSparseMetric.getVectorConstant(Vec vec)
Computes a summary constant value for the vector that is based on the
distance metric in use.
|
void |
WeightedEuclideanDistance.setWeight(Vec w)
Sets the weight vector to use for the distance function
|
Modifier and Type | Method and Description |
---|---|
double |
WeightedEuclideanDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
SquaredEuclideanDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PearsonDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedEuclideanDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MinkowskiDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ManhattanDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MahalanobisDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
EuclideanDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
DistanceMetric.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache)
Computes the distance between 2 vectors in the original list of vectors.
|
double |
DistanceCounter.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistanceNormalized.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ChebyshevDistance.dist(int a,
int b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
WeightedEuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
SquaredEuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PearsonDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedEuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MinkowskiDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ManhattanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MahalanobisDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
EuclideanDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
DistanceMetric.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache)
Computes the distance between one vector in the original list of vectors
with that of another vector not from the original list.
|
double |
DistanceCounter.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistanceNormalized.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ChebyshevDistance.dist(int a,
Vec b,
List<? extends Vec> vecs,
List<Double> cache) |
double |
WeightedEuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
SquaredEuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
PearsonDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
NormalizedEuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MinkowskiDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ManhattanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
MahalanobisDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
KernelDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
EuclideanDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
DistanceMetric.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache)
Computes the distance between one vector in the original list of vectors
with that of another vector not from the original list, but had
information generated by
DistanceMetric.getQueryInfo(jsat.linear.Vec) . |
double |
DistanceCounter.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistanceNormalized.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
CosineDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
double |
ChebyshevDistance.dist(int a,
Vec b,
List<Double> qi,
List<? extends Vec> vecs,
List<Double> cache) |
List<Double> |
WeightedEuclideanDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
SquaredEuclideanDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
PearsonDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
NormalizedEuclideanDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
MinkowskiDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
ManhattanDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
MahalanobisDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
KernelDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
EuclideanDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
DistanceMetric.getAccelerationCache(List<? extends Vec> vecs)
Returns a cache of double values associated with the given list of
vectors in the given order.
|
List<Double> |
DistanceCounter.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
CosineDistanceNormalized.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
CosineDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
ChebyshevDistance.getAccelerationCache(List<? extends Vec> vecs) |
List<Double> |
WeightedEuclideanDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
SquaredEuclideanDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
PearsonDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
NormalizedEuclideanDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
MinkowskiDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
ManhattanDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
MahalanobisDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
KernelDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
EuclideanDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
DistanceMetric.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool)
Returns a cache of double values associated with the given list of
vectors in the given order.
|
List<Double> |
DistanceCounter.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
CosineDistanceNormalized.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
CosineDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
List<Double> |
ChebyshevDistance.getAccelerationCache(List<? extends Vec> vecs,
ExecutorService threadpool) |
Constructor and Description |
---|
WeightedEuclideanDistance(Vec w)
Creates a new weighted Euclidean distance metric using the
given set of weights.
|
Modifier and Type | Method and Description |
---|---|
static Vec |
ConjugateGradient.solve(double eps,
Matrix A,
Vec x,
Vec b)
Uses the Conjugate Gradient method to solve a linear system of
equations involving a symmetric positive definite matrix.
A symmetric positive definite matrix is a matrix A such that: AT = A xT * A * x > 0 for all x != 0 NOTE: No checks will be performed to confirm these properties of the given matrix. |
static Vec |
ConjugateGradient.solve(double eps,
Matrix A,
Vec x,
Vec b,
Matrix Minv)
Uses the Conjugate Gradient method to solve a linear system of
equations involving a symmetric positive definite matrix.
A symmetric positive definite matrix is a matrix A such that: AT = A xT * A * x > 0 for all x != 0 NOTE: No checks will be performed to confirm these properties of the given matrix. |
static Vec |
ConjugateGradient.solve(Matrix A,
Vec b) |
static Vec |
ConjugateGradient.solveCGNR(double eps,
Matrix A,
Vec x,
Vec b)
Uses the Conjugate Gradient method to compute the least squares solution to a system
of linear equations.
Computes the least squares solution to A x = b. |
static Vec |
ConjugateGradient.solveCGNR(Matrix A,
Vec b) |
Modifier and Type | Method and Description |
---|---|
static Vec |
ConjugateGradient.solve(double eps,
Matrix A,
Vec x,
Vec b)
Uses the Conjugate Gradient method to solve a linear system of
equations involving a symmetric positive definite matrix.
A symmetric positive definite matrix is a matrix A such that: AT = A xT * A * x > 0 for all x != 0 NOTE: No checks will be performed to confirm these properties of the given matrix. |
static Vec |
ConjugateGradient.solve(double eps,
Matrix A,
Vec x,
Vec b,
Matrix Minv)
Uses the Conjugate Gradient method to solve a linear system of
equations involving a symmetric positive definite matrix.
A symmetric positive definite matrix is a matrix A such that: AT = A xT * A * x > 0 for all x != 0 NOTE: No checks will be performed to confirm these properties of the given matrix. |
static Vec |
ConjugateGradient.solve(Matrix A,
Vec b) |
static Vec |
ConjugateGradient.solveCGNR(double eps,
Matrix A,
Vec x,
Vec b)
Uses the Conjugate Gradient method to compute the least squares solution to a system
of linear equations.
Computes the least squares solution to A x = b. |
static Vec |
ConjugateGradient.solveCGNR(Matrix A,
Vec b) |
Modifier and Type | Class and Description |
---|---|
class |
CoverTree<V extends Vec>
This class implements the Cover-tree algorithm for answering nearest neighbor
queries.
|
static class |
CoverTree.CoverTreeFactory<V extends Vec> |
class |
DefaultVectorCollectionFactory<V extends Vec>
DefaultVectorCollectionFactory is a generic factory that attempts to return a
good vector collection for the given input.
|
class |
EuclideanCollection<V extends Vec>
Provides a specialized collections that only supports the
EuclideanDistance by brute force search. |
static class |
EuclideanCollection.EuclideanCollectionFactory<V extends Vec> |
interface |
IncrementalCollection<V extends Vec>
This interface is for Vector Collections that support incremental
construction.
|
class |
KDTree<V extends Vec>
Standard KDTree implementation.
|
static class |
KDTree.KDTreeFactory<V extends Vec> |
class |
RandomBallCover<V extends Vec>
An implementation of the exact search for the Random Ball Cover algorithm.
|
static class |
RandomBallCover.RandomBallCoverFactory<V extends Vec> |
class |
RandomBallCoverOneShot<V extends Vec>
An implementation of the on shot search for the Random Ball Cover algorithm.
|
static class |
RandomBallCoverOneShot.RandomBallCoverOneShotFactory<V extends Vec> |
class |
RTree<V extends Vec> |
static class |
RTree.RTreeFactory<V extends Vec> |
class |
VectorArray<V extends Vec>
This is the naive implementation of a Vector collection.
|
static class |
VectorArray.VectorArrayFactory<V extends Vec> |
interface |
VectorCollection<V extends Vec>
A Vector Collection is a collection of vectors that is meant to be used to
obtain a subset of the collection via a query vector.
|
interface |
VectorCollectionFactory<V extends Vec>
A factory interface for the creation of
VectorCollection objects. |
class |
VPTree<V extends Vec>
Provides an implementation of Vantage Point Trees, as described in
"Data Structures and Algorithms for Nearest Neighbor Search in General Metric Spaces"
by Peter N.
|
static class |
VPTree.VPTreeFactory<V extends Vec> |
class |
VPTreeMV<V extends Vec>
The VPTreeMV is an extension of the VPTree, the MV meaning "of Minimum Variance".
|
static class |
VPTreeMV.VPTreeMVFactory<V extends Vec> |
Modifier and Type | Method and Description |
---|---|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allEpsNeighbors(VectorCollection<V0> collection,
List<V1> search,
double radius,
ExecutorService threadpool)
Searches the given collection for all the neighbors within a distance of radius for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allEpsNeighbors(VectorCollection<V0> collection,
List<V1> search,
double radius,
ExecutorService threadpool)
Searches the given collection for all the neighbors within a distance of radius for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
List<V1> search,
int k)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
List<V1> search,
int k)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
List<V1> search,
int k,
ExecutorService threadpool)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
List<V1> search,
int k,
ExecutorService threadpool)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
V1[] search,
int k)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
V1[] search,
int k)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
V1[] search,
int k,
ExecutorService threadpool)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
V1[] search,
int k,
ExecutorService threadpool)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
List<V1> search,
int k)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
List<V1> search,
int k)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
List<V1> search,
int k,
ExecutorService threadpool)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
List<V1> search,
int k,
ExecutorService threadpool)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
V1[] search,
int k)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
V1[] search,
int k)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
V1[] search,
int k,
ExecutorService threadpool)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
V1[] search,
int k,
ExecutorService threadpool)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
Modifier and Type | Method and Description |
---|---|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
V1[] search,
int k)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.allNearestNeighbors(VectorCollection<V0> collection,
V1[] search,
int k,
ExecutorService threadpool)
Searches the given collection for the k nearest neighbors for every data point in the given search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
V1[] search,
int k)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
static <V0 extends Vec,V1 extends Vec> |
VectorCollectionUtils.getKthNeighborStats(VectorCollection<V0> collection,
V1[] search,
int k,
ExecutorService threadpool)
Computes statistics about the distance of the k'th nearest neighbor for each data point in the search list.
|
List<? extends VecPaired<V,Double>> |
VPTree.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
VectorCollection.search(Vec query,
double range)
Searches the space for all vectors that are within a given range of the query vector.
|
List<? extends VecPaired<V,Double>> |
VectorArray.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
RTree.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
RandomBallCoverOneShot.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
RandomBallCover.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
KDTree.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
EuclideanCollection.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
CoverTree.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
VPTree.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
VectorCollection.search(Vec query,
int neighbors)
Searches the space for the k neighbors that are closest to the given query vector
|
List<? extends VecPaired<V,Double>> |
VectorArray.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
RTree.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
RandomBallCoverOneShot.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
RandomBallCover.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
KDTree.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
EuclideanCollection.search(Vec query,
int neighbors) |
List<? extends VecPaired<V,Double>> |
CoverTree.search(Vec query,
int neighbors) |
Modifier and Type | Class and Description |
---|---|
class |
E2LSH<V extends Vec>
|
class |
RandomProjectionLSH<V extends Vec>
An implementation of Locality Sensitive Hashing for the
CosineDistance using random projections. |
static class |
RandomProjectionLSH.RandomProjectionLSHFactory<V extends Vec> |
Modifier and Type | Method and Description |
---|---|
List<? extends VecPaired<Vec,Double>> |
E2LSH.searchR(Vec q)
Performs a search for points within the set
radius
of the query point. |
List<? extends VecPaired<Vec,Double>> |
E2LSH.searchR(Vec q,
boolean approx)
Performs a search for points within the set
radius
of the query point. |
Modifier and Type | Method and Description |
---|---|
List<? extends VecPaired<V,Double>> |
RandomProjectionLSH.search(Vec query,
double range) |
List<? extends VecPaired<V,Double>> |
RandomProjectionLSH.search(Vec query,
int neighbors) |
List<? extends VecPaired<Vec,Double>> |
E2LSH.searchR(Vec q)
Performs a search for points within the set
radius
of the query point. |
List<? extends VecPaired<Vec,Double>> |
E2LSH.searchR(Vec q,
boolean approx)
Performs a search for points within the set
radius
of the query point. |
Modifier and Type | Method and Description |
---|---|
void |
SoftmaxLoss.deriv(Vec processed,
Vec derivs,
int y) |
void |
LossMC.deriv(Vec processed,
Vec derivs,
int y)
Computes the derivatives with respect to each output
processed and derivs may be the same object, and will
simply have all its values altered if so. |
void |
HingeLoss.deriv(Vec processed,
Vec derivs,
int y) |
CategoricalResults |
SoftmaxLoss.getClassification(Vec processed) |
CategoricalResults |
LossMC.getClassification(Vec processed)
Given the
processed
predictions, returns the classification results for said predictions. |
CategoricalResults |
HingeLoss.getClassification(Vec processed) |
double |
SoftmaxLoss.getLoss(Vec processed,
int y) |
double |
LossMC.getLoss(Vec processed,
int y)
Computes the scalar loss for on the given example
|
double |
HingeLoss.getLoss(Vec processed,
int y) |
void |
SoftmaxLoss.process(Vec pred,
Vec processed) |
void |
LossMC.process(Vec pred,
Vec processed)
Given the vector of raw outputs for each class, transform it into a new
vector.
|
void |
HingeLoss.process(Vec pred,
Vec processed) |
Modifier and Type | Method and Description |
---|---|
Vec |
FunctionVec.f(double... x)
Computes the function value given the input
x |
Vec |
FunctionVec.f(Vec x)
Computes the function value given the input
x |
Vec |
FunctionVec.f(Vec x,
Vec s)
Computes the function value given the input
x |
Vec |
FunctionVec.f(Vec x,
Vec s,
ExecutorService ex)
Computes the function value given the input
x |
Modifier and Type | Method and Description |
---|---|
double |
IndexFunction.f(Vec x) |
Vec |
FunctionVec.f(Vec x)
Computes the function value given the input
x |
Matrix |
FunctionMat.f(Vec x)
Computes a matrix based on multivariate input
|
double |
Function.f(Vec x) |
double |
FunctionP.f(Vec x,
ExecutorService ex)
Computes the result of a single variate function
|
Matrix |
FunctionMat.f(Vec x,
Matrix s)
Computes a matrix based on multivariate input
|
Matrix |
FunctionMat.f(Vec x,
Matrix s,
ExecutorService ex)
Computes a matrix based on multivariate input
|
Vec |
FunctionVec.f(Vec x,
Vec s)
Computes the function value given the input
x |
Vec |
FunctionVec.f(Vec x,
Vec s,
ExecutorService ex)
Computes the function value given the input
x |
static double |
MathTricks.logSumExp(Vec vals,
double maxValue)
Provides a numerically table way to perform the log of a sum of
exponentiations.
|
static double[] |
SimpleLinearRegression.regres(Vec xData,
Vec yData)
Performs a Simple Linear Regression on the data set, calculating the best fit a and b such that y = a + b * x
|
static double |
DescriptiveStatistics.sampleCorCoeff(Vec xData,
Vec yData)
Computes the sample correlation coefficient for two data sets X and Y.
|
static void |
MathTricks.softmax(Vec x,
boolean implicitExtra)
Applies the softmax function to the given array of values, normalizing
them so that each value is equal to
exp(xj) / Σ∀ i exp(xi) Note: If the input is sparse, this will end up destroying sparsity |
static double[] |
DescriptiveStatistics.summaryStats(Vec xData,
Vec yData)
Computes several summary statistics from the two data sets.
|
Modifier and Type | Method and Description |
---|---|
Vec |
ModifiedOWLQN.getLambdaMultipler() |
Vec |
Optimizer.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs)
Performs optimization on the given inputs to find the minima of the function.
|
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs) |
Vec |
IterativelyReweightedLeastSquares.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs) |
Vec |
Optimizer.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool)
Performs optimization on the given inputs to find the minima of the function.
|
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool) |
Vec |
IterativelyReweightedLeastSquares.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool) |
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
List<Vec> initalPoints)
Attempts to find the minimal value of the given function.
|
Modifier and Type | Method and Description |
---|---|
double |
RosenbrockFunction.f(Vec x) |
double |
WolfeNWLineSearch.lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk) |
double |
LineSearch.lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk)
Attempts to find the value of α that minimizes
f(x+α p)
|
double |
BacktrackingArmijoLineSearch.lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk) |
double |
WolfeNWLineSearch.lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk,
ExecutorService ex) |
double |
LineSearch.lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk,
ExecutorService ex)
Attempts to find the value of α that minimizes
f(x+α p)
|
double |
BacktrackingArmijoLineSearch.lineSearch(double alpha_max,
Vec x_k,
Vec x_grad,
Vec p_k,
Function f,
FunctionVec fp,
double f_x,
double gradP,
Vec x_alpha_pk,
double[] fxApRet,
Vec grad_x_alpha_pk,
ExecutorService ex) |
Vec |
Optimizer.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs)
Performs optimization on the given inputs to find the minima of the function.
|
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs) |
Vec |
IterativelyReweightedLeastSquares.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs) |
Vec |
Optimizer.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool)
Performs optimization on the given inputs to find the minima of the function.
|
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool) |
Vec |
IterativelyReweightedLeastSquares.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool) |
void |
Optimizer2.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp)
Attempts to optimize the given function by finding the value of
w
that will minimize the value returned by f(w) , using
w = x0 as an initial starting point. |
void |
ModifiedOWLQN.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp) |
void |
LBFGS.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp) |
void |
BFGS.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp) |
void |
Optimizer2.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp,
ExecutorService ex)
Attempts to optimize the given function by finding the value of
w
that will minimize the value returned by f(w) , using
w = x0 as an initial starting point. |
void |
ModifiedOWLQN.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp,
ExecutorService ex) |
void |
LBFGS.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp,
ExecutorService ex) |
void |
BFGS.optimize(double tolerance,
Vec w,
Vec x0,
Function f,
FunctionVec fp,
FunctionVec fpp,
ExecutorService ex) |
void |
ModifiedOWLQN.setLambdaMultipler(Vec lambdaMultipler)
This method sets a vector that will contain a separate multiplier for
lambda for each dimension of the problem. |
static void |
LBFGS.twoLoopHp(Vec x_grad,
List<Double> rho,
List<Vec> s,
List<Vec> y,
Vec q,
double[] alphas)
See Algorithm 7.4 (L-BFGS two-loop recursion).
|
Modifier and Type | Method and Description |
---|---|
Vec |
Optimizer.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs)
Performs optimization on the given inputs to find the minima of the function.
|
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs) |
Vec |
IterativelyReweightedLeastSquares.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs) |
Vec |
Optimizer.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool)
Performs optimization on the given inputs to find the minima of the function.
|
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool) |
Vec |
IterativelyReweightedLeastSquares.optimize(double eps,
int iterationLimit,
Function f,
Function fd,
Vec vars,
List<Vec> inputs,
Vec outputs,
ExecutorService threadpool) |
Vec |
NelderMead.optimize(double eps,
int iterationLimit,
Function f,
List<Vec> initalPoints)
Attempts to find the minimal value of the given function.
|
static void |
LBFGS.twoLoopHp(Vec x_grad,
List<Double> rho,
List<Vec> s,
List<Vec> y,
Vec q,
double[] alphas)
See Algorithm 7.4 (L-BFGS two-loop recursion).
|
static void |
LBFGS.twoLoopHp(Vec x_grad,
List<Double> rho,
List<Vec> s,
List<Vec> y,
Vec q,
double[] alphas)
See Algorithm 7.4 (L-BFGS two-loop recursion).
|
Modifier and Type | Method and Description |
---|---|
void |
SimpleSGD.update(Vec x,
Vec grad,
double eta) |
void |
SGDMomentum.update(Vec x,
Vec grad,
double eta) |
void |
Rprop.update(Vec w,
Vec grad,
double eta) |
void |
RMSProp.update(Vec x,
Vec grad,
double eta) |
void |
NAdaGrad.update(Vec w,
Vec grad,
double eta) |
void |
GradientUpdater.update(Vec w,
Vec grad,
double eta)
Updates the weight vector
x such that x = x-ηf(grad),
where f(grad) is some function on the gradient that effectively returns a
new vector. |
void |
Adam.update(Vec x,
Vec grad,
double eta) |
void |
AdaGrad.update(Vec x,
Vec grad,
double eta) |
void |
AdaDelta.update(Vec x,
Vec grad,
double eta) |
double |
SimpleSGD.update(Vec x,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
SGDMomentum.update(Vec x,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
Rprop.update(Vec w,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
RMSProp.update(Vec x,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
NAdaGrad.update(Vec w,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
GradientUpdater.update(Vec w,
Vec grad,
double eta,
double bias,
double biasGrad)
Updates the weight vector
x such that x = x-ηf(grad),
where f(grad) is some function on the gradient that effectively returns a
new vector. |
double |
Adam.update(Vec x,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
AdaGrad.update(Vec x,
Vec grad,
double eta,
double bias,
double biasGrad) |
double |
AdaDelta.update(Vec x,
Vec grad,
double eta,
double bias,
double biasGrad) |
Modifier and Type | Method and Description |
---|---|
double |
Zeroin.root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
Vec args) |
double |
Secant.root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
Vec args) |
double |
RootFinder.root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
Vec args)
Attempts to numerical compute the root of a given function, such that f(args) = 0.
|
double |
RiddersMethod.root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
Vec args) |
double |
Bisection.root(double eps,
int maxIterations,
double[] initialGuesses,
Function f,
int pos,
Vec args) |
Modifier and Type | Method and Description |
---|---|
Vec |
LogisticRegression.getCoefficents()
Returns the backing vector that containing the learned coefficients for the logistic regression.
|
Vec |
StochasticRidgeRegression.getRawWeight() |
Vec |
MultipleLinearRegression.getRawWeight() |
Vec |
LogisticRegression.getRawWeight() |
Vec |
StochasticRidgeRegression.getRawWeight(int index) |
Vec |
MultipleLinearRegression.getRawWeight(int index) |
Vec |
LogisticRegression.getRawWeight(int index) |
Vec |
RegressionDataSet.getTargetValues()
Returns a vector containing the target regression values for each
data point.
|
Modifier and Type | Method and Description |
---|---|
void |
RegressionDataSet.addDataPoint(Vec numerical,
double val)
Creates a new data point with no categorical variables to be added to the
data set.
|
void |
RegressionDataSet.addDataPoint(Vec numerical,
int[] categories,
double val)
Creates a new data point to be added to the data set.
|
Modifier and Type | Method and Description |
---|---|
protected double |
KSTest.dCaldO(Vec o)
Calculates the D statistic for comparison against another data set
|
void |
KSTest.setBaseData(Vec v)
Change the original sample to v
|
double |
KSTest.testData(Vec data)
Returns the p-value for the 2 sample KS Test against the given data set data.
|
Constructor and Description |
---|
KSTest(Vec v)
Creates a new statistical test for testing.
|
Modifier and Type | Method and Description |
---|---|
void |
ZTest.setTestUsingData(Vec data) |
void |
TTest.setTestUsingData(Vec data) |
void |
OneSampleTest.setTestUsingData(Vec data)
Sets the statistics that will be tested against an alternate hypothesis.
|
Constructor and Description |
---|
TTest(StatisticTest.H1 h1,
double hypothMean,
Vec data) |
ZTest(StatisticTest.H1 h1,
Vec data) |
ZTest(Vec data) |
Modifier and Type | Method and Description |
---|---|
Vec |
TextVectorCreator.newText(String input)
Converts the given input text into a vector representation.
|
Vec |
TextDataLoader.newText(String text)
To be called after all original texts have been loaded.
|
Vec |
HashedTextVectorCreator.newText(String input) |
Vec |
HashedTextDataLoader.newText(String input) |
Vec |
BasicTextVectorCreator.newText(String text) |
Vec |
TextVectorCreator.newText(String input,
StringBuilder workSpace,
List<String> storageSpace)
Converts the given input text into a vector representation
|
Vec |
TextDataLoader.newText(String input,
StringBuilder workSpace,
List<String> storageSpace) |
Vec |
HashedTextVectorCreator.newText(String input,
StringBuilder workSpace,
List<String> storageSpace) |
Vec |
HashedTextDataLoader.newText(String input,
StringBuilder workSpace,
List<String> storageSpace) |
Vec |
BasicTextVectorCreator.newText(String input,
StringBuilder workSpace,
List<String> storageSpace) |
Modifier and Type | Method and Description |
---|---|
Vec |
OnlineLDAsvi.getTopics(Vec doc)
Computes the topic distribution for the given document.
Note that the returned vector will be dense, but many of the values may be very nearly zero. |
Vec |
OnlineLDAsvi.getTopicVec(int k)
Returns the topic vector for a given topic.
|
Modifier and Type | Method and Description |
---|---|
Vec |
OnlineLDAsvi.getTopics(Vec doc)
Computes the topic distribution for the given document.
Note that the returned vector will be dense, but many of the values may be very nearly zero. |
Modifier and Type | Method and Description |
---|---|
void |
OnlineLDAsvi.update(List<Vec> docs)
Performs an update of the LDA topic distributions based on the given
mini-batch of documents.
|
void |
OnlineLDAsvi.update(List<Vec> docs,
ExecutorService ex)
Performs an update of the LDA topic distribution based on the given
mini-batch of documents.
|
Modifier and Type | Method and Description |
---|---|
abstract void |
WordWeighting.applyTo(Vec vec)
The implementation may want to pre compute come values based on the
vector it is about to be applied to.
|
void |
WordCount.applyTo(Vec vec) |
void |
TfIdf.applyTo(Vec vec) |
void |
OkapiBM25.applyTo(Vec vec) |
void |
BinaryWordPresent.applyTo(Vec vec) |
Modifier and Type | Method and Description |
---|---|
abstract void |
WordWeighting.setWeight(List<? extends Vec> allDocuments,
List<Integer> df)
Prepares the word weighting to be performed on a data set.
|
void |
WordCount.setWeight(List<? extends Vec> allDocuments,
List<Integer> df) |
void |
TfIdf.setWeight(List<? extends Vec> allDocuments,
List<Integer> df) |
void |
OkapiBM25.setWeight(List<? extends Vec> allDocuments,
List<Integer> df) |
void |
BinaryWordPresent.setWeight(List<? extends Vec> allDocuments,
List<Integer> df) |
Modifier and Type | Method and Description |
---|---|
Vec |
DoubleList.getVecView()
Obtains a view of this double list as a dense vector with equal length.
|
Copyright © 2017. All rights reserved.