You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@opennlp.apache.org by "Bruno P. Kinoshita (JIRA)" <ji...@apache.org> on 2015/09/28 11:24:04 UTC
[jira] [Comment Edited] (OPENNLP-798) Division by Zero exception in
the EvalParameters.
[ https://issues.apache.org/jira/browse/OPENNLP-798?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14924188#comment-14924188 ]
Bruno P. Kinoshita edited comment on OPENNLP-798 at 9/28/15 9:23 AM:
---------------------------------------------------------------------
When I had a look at the _EvalParameters(Context[] params, int numOutcomes)_ constructor, that calls the other constructor _EvalParameters(Context[] params, double correctionParam, double correctionConstant, int numOutcomes)_, passing correctionConstant = *0.0*. In the constructor code, you have:
{noformat}
this.constantInverse = 1.0 / correctionConstant
{noformat}
At first look I also thought it could rise a division by zero exception. However, upon a closer inspection, I realised it was a division with doubles, which results in Infinity, and not in an exception.
Joern, I think this issue can be closed as cannot reproduce, unless Gustavo has an exception trace or some sample code to reproduce it.
was (Author: kinow):
When I had a look at the _EvalParameters(Context[] params, int numOutcomes)_ constructor, and the subsequent code called in _EvalParameters(Context[] params, double correctionParam, double correctionConstant, int numOutcomes)_, where you have:
{noformat}
this.constantInverse = 1.0 / correctionConstant
{noformat}
I thought it could rise a division by zero exception. However, upon a closer look, I realised it was a double division, which will result in Infinity.
Joern, I think this issue can be closed as cannot reproduce, unless Gustavo has an exception trace or some sample code to reproduce it.
> Division by Zero exception in the EvalParameters.
> -------------------------------------------------
>
> Key: OPENNLP-798
> URL: https://issues.apache.org/jira/browse/OPENNLP-798
> Project: OpenNLP
> Issue Type: Bug
> Components: Machine Learning
> Reporter: Gustavo Knuppe
>
> The EvalParameters(Context[] params, int numOutcomes) constructor rises a division by zero exception.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)