Class Cramer
- java.lang.Object
-
- moa.AbstractMOAObject
-
- moa.options.AbstractOptionHandler
-
- moa.classifiers.core.statisticaltests.Cramer
-
- All Implemented Interfaces:
Configurable
,Serializable
,Callable<Double>
,StatisticalTest
,MOAObject
,OptionHandler
public class Cramer extends AbstractOptionHandler implements StatisticalTest
Implements the Multivariate Non-parametric Cramer Von Mises Statistical Test.- Author:
- Paulo Gonçalves
- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description class
Cramer.CramerTest
-
Field Summary
Fields Modifier and Type Field Description static int
BAHR
FloatOption
confidenceLevelOption
static int
CRAMER
static int
FRACA
static int
FRACB
MultiChoiceOption
kernelOption
IntOption
kOption
static int
LOG
FloatOption
maxMOption
IntOption
replicatesOption
-
Fields inherited from class moa.options.AbstractOptionHandler
config
-
-
Constructor Summary
Constructors Constructor Description Cramer()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description Double
call()
Cramer.CramerTest
cramerTest(List<Instance> x, List<Instance> y)
Cramer.CramerTest
cramerTest(List<Instance> x, List<Instance> y, double confLevel, int replicates, String sim, boolean justStatistic, int kernel, double maxM, int k)
Cramer.CramerTest
cramerTest1(List<List<Double>> x, List<List<Double>> y)
Cramer.CramerTest
cramerTest1(List<List<Double>> x, List<List<Double>> y, double confLevel, int replicates, String sim, boolean justStatistic, int kernel, double maxM, int k)
static List<Instance>
fileToInstances(String path)
static List<List<Double>>
fileToMatrix(String path)
void
getDescription(StringBuilder sb, int indent)
Returns a string representation of this object.static void
main(String[] args)
protected void
prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
This method describes the implementation of how to prepare this object for use.void
set(List<Instance> x, List<Instance> y)
This method sets the instances for later use in concurrent scenarios.double
test(List<Instance> x, List<Instance> y)
This method performs a test and returns the correspoding p-value.-
Methods inherited from class moa.options.AbstractOptionHandler
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
-
Methods inherited from class moa.AbstractMOAObject
copy, measureByteSize, measureByteSize, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface moa.MOAObject
measureByteSize
-
Methods inherited from interface moa.options.OptionHandler
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
-
-
-
-
Field Detail
-
confidenceLevelOption
public FloatOption confidenceLevelOption
-
replicatesOption
public IntOption replicatesOption
-
kernelOption
public MultiChoiceOption kernelOption
-
maxMOption
public FloatOption maxMOption
-
kOption
public IntOption kOption
-
CRAMER
public static final int CRAMER
- See Also:
- Constant Field Values
-
BAHR
public static final int BAHR
- See Also:
- Constant Field Values
-
LOG
public static final int LOG
- See Also:
- Constant Field Values
-
FRACA
public static final int FRACA
- See Also:
- Constant Field Values
-
FRACB
public static final int FRACB
- See Also:
- Constant Field Values
-
-
Method Detail
-
cramerTest
public Cramer.CramerTest cramerTest(List<Instance> x, List<Instance> y)
-
cramerTest1
public Cramer.CramerTest cramerTest1(List<List<Double>> x, List<List<Double>> y, double confLevel, int replicates, String sim, boolean justStatistic, int kernel, double maxM, int k)
-
cramerTest
public Cramer.CramerTest cramerTest(List<Instance> x, List<Instance> y, double confLevel, int replicates, String sim, boolean justStatistic, int kernel, double maxM, int k)
-
getDescription
public void getDescription(StringBuilder sb, int indent)
Description copied from interface:MOAObject
Returns a string representation of this object. Used inAbstractMOAObject.toString
to give a string representation of the object.- Specified by:
getDescription
in interfaceMOAObject
- Parameters:
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indent
-
test
public double test(List<Instance> x, List<Instance> y)
Description copied from interface:StatisticalTest
This method performs a test and returns the correspoding p-value.- Specified by:
test
in interfaceStatisticalTest
- Parameters:
x
- List of instancesy
- List of instances- Returns:
- p-value
-
prepareForUseImpl
protected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
Description copied from class:AbstractOptionHandler
This method describes the implementation of how to prepare this object for use. All classes that extends this class have to implementprepareForUseImpl
and notprepareForUse
sinceprepareForUse
callsprepareForUseImpl
.- Specified by:
prepareForUseImpl
in classAbstractOptionHandler
- Parameters:
monitor
- the TaskMonitor to userepository
- the ObjectRepository to use
-
set
public void set(List<Instance> x, List<Instance> y)
Description copied from interface:StatisticalTest
This method sets the instances for later use in concurrent scenarios. The test is performed by using the call() method.- Specified by:
set
in interfaceStatisticalTest
- Parameters:
x
- List of instancesy
- List of instances
-
-