samoa-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (SAMOA-73) Exception in VHT method terminates stream processing
Date Wed, 22 Nov 2017 12:06:00 GMT

    [ https://issues.apache.org/jira/browse/SAMOA-73?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16262413#comment-16262413
] 

ASF GitHub Bot commented on SAMOA-73:
-------------------------------------

GitHub user mgrzenda opened a pull request:

    https://github.com/apache/incubator-samoa/pull/73

    SAMOA-73: fixes NullPointerException in VerticalHoeffdingTree

    java.lang.NullPointerException is in some cases thrown in  org.apache.samoa.learners.classifiers.trees.ModelAggregatorProcessor.process(ModelAggregatorProcessor.java:142)
    The problem occurs because FoundNode objects in some cases contain null node property.
 Such FoundNode objects can be created and are considered valid, which directly follows from
filterInstanceToLeaf(Instance inst, SplitNode parent, int parentBranch)  method of SplitNode
class.
    However, once a categorical feature is selected for the splits, the following situation
can happen:
    1)  first FoundNode object with null node object inside is created
    2)  Next, the tree structure is grown by establishing new LearningNode, which is done
in ModelAggregatorProcessor.java/trainOnInstanceImpl(FoundNode foundNode, Instance inst) 
    3) The problem is the LearningNode is not added to FoundNode helper object already existing
at this stage, which causes NullPointerException exception when trying to use it.
    
    Solution: In such cases, the FoundNode object should reflect the newly created tree extension.
This can be done by injecting into the FoundNode the newly created Node object. This is to
keep FoundNode in sync with the most recent tree structure. This is what this fix makes: it
replaces null node object with the newly created one.


You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/mgrzenda/incubator-samoa SAMOA-73

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/incubator-samoa/pull/73.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #73
    
----
commit 5d6733dda3f572fc0f14c15f2dbd306300a9a274
Author: Maciej Grzenda <maciej.grzenda@gmail.com>
Date:   2017-11-20T14:56:24Z

    SAMOA-73: fixes NullPointerException in VerticalHoeffdingTree

----


> Exception in VHT method terminates stream processing
> ----------------------------------------------------
>
>                 Key: SAMOA-73
>                 URL: https://issues.apache.org/jira/browse/SAMOA-73
>             Project: SAMOA
>          Issue Type: Bug
>          Components: SAMOA-API
>            Reporter: Maciej Grzenda
>            Priority: Minor
>         Attachments: vht_error_stderr.txt
>
>
> VHT method when executed on some data streams throws java.lang.NullPointerException.
This happens after processing some instances, which seems to be related to problems with creating
a split.  The problem can be observed on airlines.arff from MOA.
> Sample command to replicate the problem:
> java -cp target/SAMOA-Local-0.5.0-incubating-SNAPSHOT.jar org.apache.samoa.LocalDoTask
"org.apache.samoa.tasks.PrequentialEvaluation -l org.apache.samoa.learners.classifiers.trees.VerticalHoeffdingTree
-s (ArffFileStream -f airlines.arff) -f 10" 
> Under such settings ca. 400 instances are processed correctly. The last output of evaluator
is:
> classified instances = 390
> classifications correct (percent) = 77,436
> Kappa Statistic (percent) = 13,07
> Kappa Temporal Statistic (percent) = 29,6
> Next the exception is thrown, which terminates the processing (see attached stack trace)



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Mime
View raw message