Search in sources :

Example 1 with RawSourceData

use of ml.shifu.shifu.container.obj.RawSourceData in project shifu by ShifuML.

the class ShifuTestProcessor method runFilterTest.

private int runFilterTest(EvalConfig evalConfig) throws IOException {
    RawSourceData dataset = evalConfig.getDataSet();
    if (StringUtils.isBlank(dataset.getFilterExpressions())) {
        LOG.warn("No filter expression set in eval-{} dataset. Skip it!", evalConfig.getName());
        return 0;
    }
    LOG.info("Start to test the filter against eval `{}` dataset.", evalConfig.getName());
    DataPurifier dataPurifier = new DataPurifier(evalConfig);
    return doFilterTest(dataPurifier, dataset.getDataPath(), dataset.getSource());
}
Also used : DataPurifier(ml.shifu.shifu.core.DataPurifier) RawSourceData(ml.shifu.shifu.container.obj.RawSourceData)

Example 2 with RawSourceData

use of ml.shifu.shifu.container.obj.RawSourceData in project shifu by ShifuML.

the class PerformanceEvaluatorTest method reviewTest.

@Test(expectedExceptions = FileNotFoundException.class)
public void reviewTest() throws IOException {
    ModelConfig model = ModelConfig.createInitModelConfig("test", ALGORITHM.NN, ".", false);
    EvalConfig eval = new EvalConfig();
    eval.setName("test");
    eval.setDataSet(new RawSourceData());
    model.getBasic().setRunMode(RunMode.LOCAL);
    PerformanceEvaluator actor = new PerformanceEvaluator(model, eval);
    actor.review();
}
Also used : EvalConfig(ml.shifu.shifu.container.obj.EvalConfig) ModelConfig(ml.shifu.shifu.container.obj.ModelConfig) PerformanceEvaluator(ml.shifu.shifu.core.PerformanceEvaluator) RawSourceData(ml.shifu.shifu.container.obj.RawSourceData) Test(org.testng.annotations.Test) AfterTest(org.testng.annotations.AfterTest)

Aggregations

RawSourceData (ml.shifu.shifu.container.obj.RawSourceData)2 EvalConfig (ml.shifu.shifu.container.obj.EvalConfig)1 ModelConfig (ml.shifu.shifu.container.obj.ModelConfig)1 DataPurifier (ml.shifu.shifu.core.DataPurifier)1 PerformanceEvaluator (ml.shifu.shifu.core.PerformanceEvaluator)1 AfterTest (org.testng.annotations.AfterTest)1 Test (org.testng.annotations.Test)1