public class ContinuousData
extends java.lang.Object
Modifier and Type | Field and Description |
---|---|
java.util.ArrayList<double[]> |
DataList
List of data of each attribute
|
int |
testSize
The number of shuffled samples
|
Constructor and Description |
---|
ContinuousData()
Constructs the empty continuous data.
|
ContinuousData(java.lang.String dataFileName1,
java.lang.String dataFileName2)
Constructs continuous data from two observation files.
|
Modifier and Type | Method and Description |
---|---|
void |
fixedMeans(double[] Data1,
double[] Data2)
Adds a fixed values to the Times2 so that
their mean matches that of the Times1.
|
void |
fixedMedians(double[] Data1,
double[] Data2)
Adds a fixed values to the Times2 so that
their median matches that of the Times1.
|
double[] |
loadData(java.lang.String fileName)
Reads an observation (-o2 format) file.
|
void |
printData()
Print contents of cdata for debug.
|
java.util.ArrayList<double[]> |
selectShuffled(double[] inputDist)
Chooses half of observation data randomly,
shuffles them and return them as an array.
|
void |
setVerbose(int v)
Sets a verbose.
|
public java.util.ArrayList<double[]> DataList
public int testSize
public ContinuousData()
public ContinuousData(java.lang.String dataFileName1, java.lang.String dataFileName2)
dataFileName1
- observation file namedataFileName2
- observation file namepublic void fixedMeans(double[] Data1, double[] Data2)
Data1
- array of data 1 (e.g. Times 1)Data2
- array of data 1 (e.g. Times 2)public void fixedMedians(double[] Data1, double[] Data2)
Data1
- array of data 1 (e.g. Times 1)Data2
- array of data 1 (e.g. Times 2)public double[] loadData(java.lang.String fileName) throws java.io.IOException
fileName
- observation file namejava.io.IOException
- Exception occurred when reading
input from the observation filepublic void printData()
public java.util.ArrayList<double[]> selectShuffled(double[] inputDist)
inputDist
- array of input distributionpublic void setVerbose(int v)
v
- verbose