public class KNN extends AbstractOptionHandler implements StatisticalTest
Modifier and Type | Field and Description |
---|---|
IntOption |
kValueOption |
config
Constructor and Description |
---|
KNN() |
Modifier and Type | Method and Description |
---|---|
Double |
call() |
void |
getDescription(StringBuilder sb,
int indent)
Returns a string representation of this object.
|
static void |
main(String[] args) |
double[] |
mtsknn(List<Instance> x,
List<Instance> y) |
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.
|
copy, getCLICreationString, getOptions, getPreparedClassOption, getPurposeString, prepareClassOptions, prepareForUse, prepareForUse
copy, measureByteSize, measureByteSize, toString
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
copy, getCLICreationString, getOptions, getPurposeString, prepareForUse, prepareForUse
measureByteSize
public IntOption kValueOption
public double[] mtsknn(List<Instance> x, List<Instance> y) throws InterruptedException
InterruptedException
public double test(List<Instance> x, List<Instance> y)
StatisticalTest
test
in interface StatisticalTest
x
- List of instancesy
- List of instancespublic void getDescription(StringBuilder sb, int indent)
MOAObject
AbstractMOAObject.toString
to give a string representation of the object.getDescription
in interface MOAObject
sb
- the stringbuilder to add the descriptionindent
- the number of characters to indentprotected void prepareForUseImpl(TaskMonitor monitor, ObjectRepository repository)
AbstractOptionHandler
prepareForUseImpl
and not prepareForUse
since
prepareForUse
calls prepareForUseImpl
.prepareForUseImpl
in class AbstractOptionHandler
monitor
- the TaskMonitor to userepository
- the ObjectRepository to usepublic void set(List<Instance> x, List<Instance> y)
StatisticalTest
set
in interface StatisticalTest
x
- List of instancesy
- List of instancesCopyright © 2019 University of Waikato, Hamilton, NZ. All Rights Reserved.