Package edu.cmu.tetrad.data
Class DataUtils
java.lang.Object
edu.cmu.tetrad.data.DataUtils
Some static utility methods for dealing with data sets.
- Version:
- $Id: $Id
- Author:
- Various folks.
-
Method Summary
Modifier and TypeMethodDescriptionstatic DataSet
choleskySimulation.static boolean
containsMissingValue
(DataSet data) containsMissingValue.static boolean
containsMissingValue
(Matrix data) containsMissingValue.static Matrix
cov.createContinuousVariables
(String[] varNames) createContinuousVariables.static String
defaultCategory
(int index) defaultCategory.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) getExampleNonsingular.static boolean
States whether the given column of the given data set is binary.static Vector
mean.static Vector
means
(double[][] data) Column major data.static Vector
means.static double[]
ranks
(double[] x) ranks.static Matrix
subMatrix.static Matrix
subMatrix.static Matrix
subMatrix.static Matrix
subMatrix.
-
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
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
-
containsMissingValue
-
containsMissingValue
-
createContinuousVariables
-
subMatrix
subMatrix.
- Parameters:
m
- aICovarianceMatrix
objectx
- aNode
objecty
- aNode
objectz
- aList
object- Returns:
- the submatrix of m with variables in the order of the x variables.
-
subMatrix
-
subMatrix
-
subMatrix
public static Matrix subMatrix(ICovarianceMatrix m, Map<Node, Integer> indexMap, Node x, Node y, List<Node> z) subMatrix.
- Parameters:
m
- aICovarianceMatrix
objectindexMap
- aMap
objectx
- aNode
objecty
- aNode
objectz
- aList
object- Returns:
- the submatrix of m with variables in the order of the x variables.
-
means
-
means
-
cov
-
mean
-
choleskySimulation
choleskySimulation.
- Parameters:
cov
- The variables and covariance matrix over the variables.- Returns:
- The simulated data.
-
ranks
public static double[] ranks(double[] x) ranks.
- Parameters:
x
- an array of objects- Returns:
- an array of objects
-
getExampleNonsingular
getExampleNonsingular.
- Parameters:
covarianceMatrix
- aICovarianceMatrix
objectdepth
- a int- Returns:
- a
List
object
-
getEss
Returns the equivalent sample size, assuming all units are equally correlated and all unit variances are equal.- Parameters:
covariances
- aICovarianceMatrix
object- Returns:
- a double
-