Hitachi Vantara Pentaho Community Forums
Results 1 to 2 of 2

Thread: Weka and MySQL

  1. #1
    Join Date
    Oct 2014

    Question Weka and MySQL

    I am trying to have weka read unlabeled data in from mysql. I set the Class attribute to have '?' for all the values but I cant set the types of classes to chose from, such as yes and no. I even tried to use the arff to mysql, used the arff that i had tested on and it loaded everything with null for the class values and has not types. Has anyone done this and I have just missed something in the wiki and docs?


    data to the arff to mysql method-> @attribute Class {yes,no}

    data that gets put into mysql -> @atribute Class{}

    is there something wrong with the method, if not, how do i using the weka library add the yes and no back
    Last edited by intech; 10-15-2014 at 01:27 PM.

  2. #2
    Join Date
    Aug 2006


    The database doesn't store the legal labels for nominal attributes unfortunately, so Weka has to infer these from the values that it reads from the database table. In this case, your class attribute has all missing values so there is nothing to infer. However, you should be able to use weka.filters.unsupervised.attribute.AddValues to add the legal values back as a post-processing step after reading the data. Just make sure that the list of labels you supply to AddValues has the label values in the same order that they are declared in your training data.


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.