public class MatrixStatistics extends Object
Modifier and Type | Method and Description |
---|---|
static Vec |
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> |
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 |
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> |
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 |
covarianceMatrix(Vec mean,
DataSet dataSet)
Computes the weighted covariance matrix of the data set
|
static void |
covarianceMatrix(Vec mean,
DataSet dataSet,
Matrix covariance)
Computes the weighted covariance matrix of the given data set.
|
static void |
covarianceMatrix(Vec mean,
DataSet dataSet,
Matrix covariance,
double sumOfWeights,
double sumOfSquaredWeights)
Computes the weighted covariance matrix of the given data set.
|
static void |
covarianceMatrix(Vec mean,
List<DataPoint> dataSet,
Matrix covariance)
Computes the weighted result for the covariance matrix of the given data set.
|
static void |
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> |
covarianceMatrix(Vec mean,
List<V> dataSet) |
static <V extends Vec> |
covarianceMatrix(Vec mean,
Matrix covariance,
List<V> dataSet) |
static Vec |
meanVector(DataSet dataSet)
Computes the weighted mean of the given data set.
|
static <V extends Vec> |
meanVector(List<V> dataSet)
Computes the mean of the given data set.
|
static void |
meanVector(Vec mean,
DataSet dataSet)
Computes the weighted mean of the data set
|
static <V extends Vec> |
meanVector(Vec mean,
List<V> dataSet)
Computes the mean of the given data set.
|
public static <V extends Vec> Vec meanVector(List<V> dataSet)
V
- the vector typedataSet
- the list of vectors to compute the mean ofpublic static Vec meanVector(DataSet dataSet)
dataSet
- the dataset to compute the mean frompublic static <V extends Vec> void meanVector(Vec mean, List<V> dataSet)
mean
- the zeroed out vector to store the mean in. Its contents will be altereddataSet
- the set of data points to compute the mean frompublic static void meanVector(Vec mean, DataSet dataSet)
mean
- the zeroed out vector to store the mean in. Its contents will be altereddataSet
- the set of data points to compute the mean frompublic static <V extends Vec> void covarianceMatrix(Vec mean, Matrix covariance, List<V> dataSet)
public static void covarianceMatrix(Vec mean, List<DataPoint> dataSet, Matrix covariance)
covarianceMatrix(jsat.linear.Vec, java.util.List)
mean
- the mean of the distribution.dataSet
- the set of data points that contain vectorscovariance
- the zeroed matrix to store the result in. Its values will be altered.public static void covarianceMatrix(Vec mean, List<DataPoint> dataSet, Matrix covariance, double sumOfWeights, double sumOfSquaredWeights)
covarianceMatrix(jsat.linear.Vec, java.util.List)
mean
- the mean of the distribution.dataSet
- the set of data points that contain vectorscovariance
- the zeroed matrix to store the result in. Its values will be altered.sumOfWeights
- the sum of each weight in dataSetsumOfSquaredWeights
- the sum of the squared weights in dataSetpublic static Matrix covarianceMatrix(Vec mean, DataSet dataSet)
mean
- the mean of the data setdataSet
- the dataset to compute the covariance ofpublic static void covarianceMatrix(Vec mean, DataSet dataSet, Matrix covariance)
mean
- the mean of the data setdataSet
- the dataset to compute the covariance ofcovariance
- the zeroed out matrix to store the result intopublic static void covarianceMatrix(Vec mean, DataSet dataSet, Matrix covariance, double sumOfWeights, double sumOfSquaredWeights)
mean
- the mean of the data setdataSet
- the dataset to compute the covariance ofcovariance
- the zeroed out matrix to store the result intosumOfWeights
- the sum of the weights for each data point in the datasetsumOfSquaredWeights
- the sum of the squared weights for each data point in the data setpublic static void covarianceDiag(Vec means, Vec diag, DataSet dataset)
means
- the already computed mean of the data setdiag
- the zeroed out vector to store the diagonal in. Its contents
will be altereddataset
- the data set to compute the covariance diagonal frompublic static Vec covarianceDiag(Vec means, DataSet dataset)
means
- the already computed mean of the data setdataset
- the data set to compute the covariance diagonal frompublic static <V extends Vec> void covarianceDiag(Vec means, Vec diag, List<V> dataset)
V
- the type of the vectormeans
- the already computed mean of the data setdiag
- the zeroed out vector to store the diagonal in. Its contents
will be altereddataset
- the data set to compute the covariance diagonal frompublic static <V extends Vec> Vec covarianceDiag(Vec means, List<V> dataset)
V
- means
- the already computed mean of the data setdataset
- the data set to compute the covariance diagonal fromCopyright © 2017. All rights reserved.