Package edu.cmu.tetrad.data
Class DataUtils
java.lang.Object
edu.cmu.tetrad.data.DataUtils
Some static utility methods for dealing with data sets.
- Author:
- Various folks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataSet
static boolean
containsMissingValue
(DataSet data) static boolean
containsMissingValue
(Matrix data) static Matrix
createContinuousVariables
(String[] varNames) static String
defaultCategory
(int index) static DataSet
A discrete data set used to construct some other serializable instances.static double
getEss
(ICovarianceMatrix covariances) Returns the equivalent sample size, assuming all units are equally correlated and all unit variances are equal.getExampleNonsingular
(ICovarianceMatrix covarianceMatrix, int depth) static boolean
States whether the given column of the given data set is binary.static Vector
static Vector
means
(double[][] data) Column major data.static Vector
static double[]
ranks
(double[] x) static Matrix
static Matrix
static Matrix
static Matrix
-
Method Details
-
isBinary
States whether the given column of the given data set is binary.- Parameters:
data
- Ibid.column
- Ibid.- Returns:
- true iff the column is binary.
-
defaultCategory
- Parameters:
index
- Ond plus the given index.- Returns:
- the default category for index i. (The default category should ALWAYS be obtained by calling this method.)
-
discreteSerializableInstance
A discrete data set used to construct some other serializable instances. -
containsMissingValue
- Returns:
- true iff the data sets contains a missing value.
-
containsMissingValue
-
createContinuousVariables
-
subMatrix
- Returns:
- the submatrix of m with variables in the order of the x variables.
-
subMatrix
- Returns:
- the submatrix of m with variables in the order of the x variables.
-
subMatrix
- Returns:
- the submatrix of m with variables in the order of the x variables.
-
subMatrix
public static Matrix subMatrix(ICovarianceMatrix m, Map<Node, Integer> indexMap, Node x, Node y, List<Node> z) - Returns:
- the submatrix of m with variables in the order of the x variables.
-
means
-
means
Column major data. -
cov
-
mean
-
choleskySimulation
- Parameters:
cov
- The variables and covariance matrix over the variables.- Returns:
- The simulated data.
-
ranks
public static double[] ranks(double[] x) -
getExampleNonsingular
-
getEss
Returns the equivalent sample size, assuming all units are equally correlated and all unit variances are equal.
-