public class KNNEvaluator extends Object
Constructor and Description |
---|
KNNEvaluator(Env env,
LanguageSet languages) |
Modifier and Type | Method and Description |
---|---|
void |
evaluate(Iterable<Integer> originId,
Integer k,
Integer limitPerLevel,
Integer limitBranch,
Integer maxDist,
String outputPath) |
void |
evaluateForOne(Integer originId,
com.vividsolutions.jts.geom.Geometry originGeom,
Integer k,
Integer limitPerLevel,
Integer maxDist) |
static <T> T |
getRandomElement(List<T> input) |
static <T> List<T> |
getRandomSubList(List<T> input,
int subsetSize) |
static void |
main(String[] args) |
public KNNEvaluator(Env env, LanguageSet languages) throws org.wikibrain.conf.ConfigurationException
org.wikibrain.conf.ConfigurationException
public static <T> T getRandomElement(List<T> input)
public void evaluate(Iterable<Integer> originId, Integer k, Integer limitPerLevel, Integer limitBranch, Integer maxDist, String outputPath) throws DaoException, IOException
originId
- Origins to startk
- K as in "K-nearest neighbors"limitPerLevel
- Number of samples to pick from each "K-nearest neighbors" to evaluatelimitBranch
- not usedmaxDist
- Max distance (depth of search)outputPath
- The path for the output CSV fileDaoException
IOException
public void evaluateForOne(Integer originId, com.vividsolutions.jts.geom.Geometry originGeom, Integer k, Integer limitPerLevel, Integer maxDist) throws DaoException
DaoException
Copyright © 2015. All rights reserved.