source: trunk/CrossPare/test/de/ugoe/cs/cpdp/eval/MySQLResultStorageTest.java @ 68

Last change on this file since 68 was 68, checked in by sherbold, 9 years ago
  • added the concept of result storages to the framework and implemented a very simple first prototype of a MySQLResultStorage (that currently only works with a locally running database)
  • Property svn:mime-type set to text/plain
File size: 1.3 KB
Line 
1package de.ugoe.cs.cpdp.eval;
2
3import org.junit.Test;
4
5public class MySQLResultStorageTest {
6
7    @Test
8    public void testAddResult() throws Exception {
9        String dbHost = "localhost";
10        String dbPort = "3306";
11        String dbName = "crosspare";
12        String dbUser = "crosspare";
13        String dbPass = "benchmark";
14       
15        MySQLResultStorage storage = new MySQLResultStorage(dbHost, dbPort, dbName, dbUser, dbPass);
16       
17        ExperimentResult result = new ExperimentResult("dummy", "product-1.0", "classifier");
18        result.setSizeTestData(100);
19        result.setSizeTrainingData(200);
20        result.setSuccHe(0.1);
21        result.setSuccZi(0.05);
22        result.setSuccG75(0.2);
23        result.setSuccG60(0.4);
24        result.setError(0.2);
25        result.setRecall(0.8);
26        result.setPrecision(0.7);
27        result.setFscore(0.75);
28        result.setGscore(0.85);
29        result.setMcc(0.5);
30        result.setAuc(0.7);
31        result.setAucec(0.6);
32        result.setTpr(0.8);
33        result.setFpr(0.2);
34        result.setTnr(0.7);
35        result.setFnr(0.3);
36        result.setTp(40);
37        result.setFn(10);
38        result.setTn(35);
39        result.setFp(15);
40        storage.addResult(result);
41    }
42}
Note: See TracBrowser for help on using the repository browser.