Hitachi Vantara Pentaho Community Forums
Results 1 to 4 of 4

Thread: Weka Scoring Issue - Can't print classification tree

  1. #1
    Join Date
    Oct 2011
    Posts
    4

    Default Weka Scoring Issue - Can't print classification tree

    I am trying to follow the tutorial on using Weka and PDI in Chapter 16 of the Pentaho Solutions book from Wiley.

    I am using:
    PDI 4.4.2 - GA
    WEKA 3.6.10
    Java 1.6.0_65
    OSX 10.9.1

    The problem is when I created the model in WEKA and use it in the Weka Scoring step I don't get anything for the "Fields mapping" tab and get the following message in the Model tab:

    "J48 pruned tree------------------
    Can't print classification tree."

    I followed the steps precisely over and over again but got the same results. I can't find anything on this forum or on Google with anyone with the same problem and was hoping that one of you super intelligent people can lead me to exactly what I am doing wrong or some Documentation to read more about troubleshooting these types of problems. The only thing I really found on this issue was the source code for WEKA.

    Any help would be appreciated.

    Thanks,

    Brian

    Edit:
    Noticed some interesting things from the Console:

    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    ERROR 25-02 11:45:30,314 - org.pentaho.di.scoring.WekaScoringMeta@1ba8d7d2 - Problem loading model file
    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    ERROR 25-02 11:53:13,444 - org.pentaho.di.scoring.WekaScoringMeta@1ba8d7d2 - Problem loading model file
    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    ERROR 25-02 11:53:20,989 - org.pentaho.di.scoring.WekaScoringMeta@1ba8d7d2 - Problem deep copying model
    ERROR 25-02 11:53:29,883 - org.pentaho.di.scoring.WekaScoringMeta@1ba8d7d2 - Problem deep copying model
    Model will be sourced from file /Users/bbowler/Desktop/adult/J48.model
    ERROR 25-02 11:53:29,885 - org.pentaho.di.scoring.WekaScoringMeta@1ba8d7d2 - Problem deep copying model
    java.lang.IndexOutOfBoundsException: Index: 14, Size: 0
    at java.util.ArrayList.RangeCheck(ArrayList.java:547)
    at java.util.ArrayList.get(ArrayList.java:322)
    at weka.core.Instances.attribute(Instances.java:341)
    at weka.core.Instances.classAttribute(Instances.java:434)
    at org.pentaho.di.scoring.WekaScoringDialog.checkAbilityToProduceProbabilities(WekaScoringDialog.java:1075)
    at org.pentaho.di.scoring.WekaScoringDialog.getData(WekaScoringDialog.java:1001)
    at org.pentaho.di.scoring.WekaScoringDialog.open(WekaScoringDialog.java:789)
    at org.pentaho.di.ui.spoon.delegates.SpoonStepsDelegate.editStep(SpoonStepsDelegate.java:136)
    at org.pentaho.di.ui.spoon.Spoon.editStep(Spoon.java:7840)
    at org.pentaho.di.ui.spoon.trans.TransGraph.editStep(TransGraph.java:2753)
    at org.pentaho.di.ui.spoon.trans.TransGraph.mouseDoubleClick(TransGraph.java:705)
    at org.eclipse.swt.widgets.TypedListener.handleEvent(TypedListener.java:195)
    at org.eclipse.swt.widgets.EventTable.sendEvent(EventTable.java:84)
    at org.eclipse.swt.widgets.Display.sendEvent(Display.java:4128)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1457)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1480)
    at org.eclipse.swt.widgets.Widget.sendEvent(Widget.java:1465)
    at org.eclipse.swt.widgets.Widget.notifyListeners(Widget.java:1270)
    at org.eclipse.swt.widgets.Display.runDeferredEvents(Display.java:3974)
    at org.eclipse.swt.widgets.Display.readAndDispatch(Display.java:3613)
    at org.pentaho.di.ui.spoon.Spoon.readAndDispatch(Spoon.java:1219)
    at org.pentaho.di.ui.spoon.Spoon.waitForDispose(Spoon.java:7049)
    at org.pentaho.di.ui.spoon.Spoon.start(Spoon.java:8309)
    at org.pentaho.di.ui.spoon.Spoon.main(Spoon.java:578)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:597)
    at org.pentaho.commons.launcher.Launcher.main(Launcher.java:134)
    Last edited by bbowler86; 02-25-2014 at 12:56 PM. Reason: logging output

  2. #2
    Join Date
    Aug 2006
    Posts
    1,741

    Default

    Does the J48 model print correctly in Weka's Explorer when you load it back in (right click over history list in the Classify panel and choose "load model")? Have you installed the correct version of the WekaScoring plugin for PDI? There is one version for Weka 3.6 or 3.7.0, another for Weka 3.7.2 - 3.7.4, and another for Weka >= 3.7.5.

    Cheers,
    Mark.

  3. #3
    Join Date
    Oct 2011
    Posts
    4

    Default

    Ah, thanks Mark. That is in fact what it was. I was building model's with an older version of Weka (3.6.10) and the Plugin was expecting version 3.7.5. Just downloading a newer version of Weka and building the model over again resolved it for me. Thanks again.

  4. #4

    Default

    Dear All,
    Can anyone kindly suggest me where to get the weka-scoring-plugin for kettle 6.1 from? I have googled and I got links which offer weka scoring plugins for Weka 3.6 or 3.7.0, another for Weka 3.7.2 to 3.7.4, and another for Weka >= 3.7.5 and Kettle 3.x and 4.x. I need it for kettle 6.1 as early as possible. Any kind of help is appreciated.
    Many thanks in advance.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Privacy Policy | Legal Notices | Safe Harbor Privacy Policy

Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.