public class CrossValidation extends Object
| Modifier and Type | Class and Description |
|---|---|
static class |
CrossValidation.Score |
| Modifier and Type | Field and Description |
|---|---|
com.google.common.collect.Table<Integer,String,CrossValidation.Score> |
scores |
| Constructor and Description |
|---|
CrossValidation(int nfold,
IClassifier classifier,
boolean shuffleData)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
CrossValidation.Score |
getResult() |
static void |
main(String[] args) |
void |
run(List<Tuple> data)
Cross validation.
|
public com.google.common.collect.Table<Integer,String,CrossValidation.Score> scores
public CrossValidation(int nfold,
IClassifier classifier,
boolean shuffleData)
nfold - nfold for the cross validation. (Recommend: 10-fold)classifier - the actual classifier need to test.shuffleData - whether the data needs to be shuffled at the begining of the whole
process.public void run(List<Tuple> data)
data - whole testing data collectionpublic CrossValidation.Score getResult()
public static void main(String[] args) throws IOException
IOExceptionCopyright © 2016. All rights reserved.