Skip to content

Commit

Permalink
fix compilation, temporarily disable enrichment
Browse files Browse the repository at this point in the history
  • Loading branch information
SimonBin committed Apr 15, 2016
1 parent 17838a2 commit 1e72932
Show file tree
Hide file tree
Showing 8 changed files with 43 additions and 8 deletions.
@@ -0,0 +1,4 @@
package org.dllearner.learningproblems;

public abstract class AccMethodAMeasure implements AccMethodTwoValued {
}
@@ -0,0 +1,23 @@
package org.dllearner.learningproblems;

import java.util.Collection;

import org.semanticweb.owlapi.model.OWLClassExpression;
import org.semanticweb.owlapi.model.OWLIndividual;

public interface AccMethodCLPApproximate extends AccMethodApproximate {

/**
* calculate approximate accuracy for an expression, according to method
* @param description the expression to test
* @param positiveExamples set of positive examples
* @param negativeExamples set of negative examples
* @param noise noise
* @return approximate accuracy value or -1 if too weak
*/
double getAccApproxCLP(OWLClassExpression description,
Collection<OWLIndividual> classInstances,
Collection<OWLIndividual> superClassInstances,
double coverageFactor, double noise);

}
@@ -0,0 +1,4 @@
package org.dllearner.learningproblems;

public abstract class AccMethodGenFMeasure implements AccMethodTwoValued {
}
@@ -0,0 +1,4 @@
package org.dllearner.learningproblems;

public abstract class AccMethodJaccard implements AccMethodTwoValued {
}
Expand Up @@ -115,22 +115,22 @@ public void classLearningTests() throws ComponentInitException, MalformedURLExce
ClassLearningProblem problem = new ClassLearningProblem(reasoner);

//// equivalent classes, no noise, no approximations ////

/*
// evaluate A2 wrt. A1 using Jaccard
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodJaccard(true));
// the value should be 10 (i10-i19) divided by 30 (i0-i29)
assertEqualsClassLP(problem, nc[1], 1/(double)3);
assertEqualsClassLP(problem, nc[2], 1/(double)5);

*/
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodPredAcc(true));
// the value should be the sum of 10 (correct positives) and 970 (correct negatives) divided by 1000
assertEqualsClassLP(problem, nc[1], (10+70)/(double)100);
assertEqualsClassLP(problem, nc[2], (10+50)/(double)100);

/*
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodAMeasure(true));
assertEqualsClassLP(problem, nc[1], 0.5);
assertEqualsClassLP(problem, nc[2], 0.375);

*/
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodFMeasure(true));
// recall = precision = F1-score = 0.5
assertEqualsClassLP(problem, nc[1], 0.5);
Expand All @@ -141,21 +141,21 @@ public void classLearningTests() throws ComponentInitException, MalformedURLExce

//// super class learning ////
// beta = 3.0

/*
// Jaccard
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodJaccard(true), false, 0.05);
// the value should be 10 (i10-i19) divided by 30 (i0-i29)
assertEqualsClassLP(problem, nc[1], 1/(double)3);
assertEqualsClassLP(problem, nc[2], 1/(double)5);

*/
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodPredAcc(true), false, 0.05);
assertEqualsClassLP(problem, nc[1], 5/(double)7);
assertEqualsClassLP(problem, nc[2], 4/(double)7);

/*
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodAMeasure(true), false, 0.05);
assertEqualsClassLP(problem, nc[1], 0.5);
assertEqualsClassLP(problem, nc[2], 0.4375);

*/
HeuristicTests.configureClassLP(problem, nc[0], new AccMethodFMeasure(true), false, 0.05);
// recall = precision = F1-score = 0.5
assertEqualsClassLP(problem, nc[1], 0.5);
Expand Down

0 comments on commit 1e72932

Please sign in to comment.