Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with use weight #179

Closed
cz279708573 opened this issue Jul 21, 2018 · 1 comment
Closed

Problem with use weight #179

cz279708573 opened this issue Jul 21, 2018 · 1 comment

Comments

@cz279708573
Copy link

cz279708573 commented Jul 21, 2018

Hello:
I used the LIMES-core version 1.4.0
when i used

ADD(0.3 * Levenshtein(x.BirthYM, y.BirthYM) |0.3, 0.7 * Levenshtein(x.LeaderName, y.LeaderName)|0.7 )

as metric, it doesn't work.
my acceptance threshold is 0.9 and my review threshold is 0.1.
I debug find in LinkSpecification.class's Method readSpec, it has next code:

else if (p.getOperator().equalsIgnoreCase("ADD")) {
    this.setOperator(LogicOperator.AND);
    leftSpec.readSpec(p.getLeftTerm(), Math.abs(theta - p.getRightCoefficient()) / p.getLeftCoefficient());
    rightSpec.readSpec(p.getRightTerm(), Math.abs(theta - p.getLeftCoefficient()) / p.getRightCoefficient());
    this.filterExpression = null;
    this.setThreshold(theta);
    this.fullExpression = "AND(" + leftSpec.fullExpression + "|" + Math.abs(theta - p.getRightCoefficient()) / p.getLeftCoefficient() + "," + rightSpec.fullExpression + "|" + Math.abs(theta - p.getLeftCoefficient()) / p.getRightCoefficient() + ")";
}
leftSpec.readSpec(p.getLeftTerm(), Math.abs(theta - p.getRightCoefficient()) / p.getLeftCoefficient());

this code will set the leftSpec's threshold to 2.0 (abc(0.1-0.7)/0.3 = 2 )

and it,s wrong when execute in EDJoinMapper.class because next code:

threshold = (1.0D - threshold) / threshold;
this.comparisons = 0;
mapping = MappingFactory.createDefaultMapping();
if (threshold < 0.0D) {
    logger.info("Wrong threshold setting. Returning empty mapping.");
    return mapping;
} 
@kvndrsslr-zz
Copy link

Thanks for reporting this. We will be looking into it shortly!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants