Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Experimenter: how to set class attribute?

  1. #1
    Join Date
    May 2008

    Default Experimenter: how to set class attribute?


    I have some data sets which I need in CSV format for analysis with other tools. I would rather not make ARFF copies of them to save space.

    So, I want to set the class attribute in Experimenter. I set a FilteredClassifier with a ClassAssigner filter, but I still get an error "Class attribute is not nominal", so apparently it is not set. When I type the classIndex paramter to ClassAssigner, it outputs error messages on the command line:
    Error parsing 'fi'!
    Error parsing 'fi'!
    Error parsing 'firs'!

    Still, it seems to accept the string "first", like other Weka index parameters do. When I use "1" instead, it automatically reverts to "2". This looks like a bug, but maybe it is not.

    Is it possible to assign the class in experimenter? I could not find anything on the web about this.

    Philip Ganchev

  2. #2
    Join Date
    Aug 2006


    Unfortunately, the Experimenter requires the class attribute to be in the last column. At some stage it ought to be modified to operate on the class index in the data (if set). There is a hack to make it use the first column, but this involves saving your experiment configuration as an XML file, editing this file and changing the tag with the name attribute "classFirst" to true, and then running the experiment from the command line using weka.experiment.Experiment.

    I'd suggest creating new CVS or ARFF files with your first column moved to be the last column.


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.