How to use data from Python for Weka?

Gerenuk

I've installed weka and the python-weka-wrapper.

I got as far as

from weka.classifiers import Classifier
clf=Classifier(classname="weka.classifiers.rules.JRip")

from random import randint
X = [[randint(1,10) for _ in range(5)] for _ in range(100)]
y = [randint(0,1) for _ in range(100)]

but now I don't know how to load my data which is available as a Python data structure.

How can I load my data matrices, output the rules (in some parsable format) and test the classifier on new data?

fracpete

You can create data on the fly, by defining the structure (ie attributes) and then adding the data rows. Also, I added a convenience method to instantiate Instances to the weka.core.dataset module called create_Instances_from_lists, which is scheduled for the next release. This question has been answered on the project's mailing list as well, including examples and pointers.

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

From Dev

How to use data from Python for Weka?

From Dev

How to import and export data from Matlab to Weka to predict class?

From Dev

Weka - How to use classifier in Java

From Dev

How to use liblinear with weka gui?

From Dev

How to use Weka Packages in R?

From Dev

Python 3, How To Use Python To Save Data From This Page?

From Dev

How to use Naive Bayes of Weka in a Java program

From Dev

How to use Naive Bayes of Weka in a Java program

From Dev

How to use Weka JSONLoader in Java IDE?

From Dev

How to create an `Instances` in Weka from a `List<Instance>`?

From Dev

How to create an `Instances` in Weka from a `List<Instance>`?

From Dev

How to use a for loop to append the data frame generated from a function in python

From Dev

How to use Python (preferably pandas) to scrape data from Javascript table?

From Dev

Cannot use libsvm in weka 3.7.10 after install it from weka package manager, on Windows

From Dev

Cannot use libsvm in weka 3.7.10 after install it from weka package manager, on Windows

From Dev

Perform Linear Regression on data (from .arff file) - JAVA, Weka

From Dev

Perform Linear Regression on data (from .arff file) - JAVA, Weka

From Dev

How to use class Imbalance technique (SMOTE) with Java Weka API?

From Dev

How do I use custom stopwords and stemmer file in WEKA (Java)?

From Dev

How can i use string of data showing times (scraped from a table from a website) in python?

From Dev

Weka - semi supervised learning - how to label data and get back the result?

From Dev

How to set parameters in WEKA to balance data with SMOTE filter?

From Dev

How to handle the Nominal Data by Weka J48

From Dev

.names and .data in Weka

From Dev

Weka ArffSaver Not Writing Data

From Dev

Weka ArffSaver Not Writing Data

From Dev

Data wrangling with Weka

From Dev

How to reuse saved classifier created from explorer(in weka) in eclipse java

From Dev

How to calculate the nearest neighbors using weka from the command line?

Related Related

  1. 1

    How to use data from Python for Weka?

  2. 2

    How to import and export data from Matlab to Weka to predict class?

  3. 3

    Weka - How to use classifier in Java

  4. 4

    How to use liblinear with weka gui?

  5. 5

    How to use Weka Packages in R?

  6. 6

    Python 3, How To Use Python To Save Data From This Page?

  7. 7

    How to use Naive Bayes of Weka in a Java program

  8. 8

    How to use Naive Bayes of Weka in a Java program

  9. 9

    How to use Weka JSONLoader in Java IDE?

  10. 10

    How to create an `Instances` in Weka from a `List<Instance>`?

  11. 11

    How to create an `Instances` in Weka from a `List<Instance>`?

  12. 12

    How to use a for loop to append the data frame generated from a function in python

  13. 13

    How to use Python (preferably pandas) to scrape data from Javascript table?

  14. 14

    Cannot use libsvm in weka 3.7.10 after install it from weka package manager, on Windows

  15. 15

    Cannot use libsvm in weka 3.7.10 after install it from weka package manager, on Windows

  16. 16

    Perform Linear Regression on data (from .arff file) - JAVA, Weka

  17. 17

    Perform Linear Regression on data (from .arff file) - JAVA, Weka

  18. 18

    How to use class Imbalance technique (SMOTE) with Java Weka API?

  19. 19

    How do I use custom stopwords and stemmer file in WEKA (Java)?

  20. 20

    How can i use string of data showing times (scraped from a table from a website) in python?

  21. 21

    Weka - semi supervised learning - how to label data and get back the result?

  22. 22

    How to set parameters in WEKA to balance data with SMOTE filter?

  23. 23

    How to handle the Nominal Data by Weka J48

  24. 24

    .names and .data in Weka

  25. 25

    Weka ArffSaver Not Writing Data

  26. 26

    Weka ArffSaver Not Writing Data

  27. 27

    Data wrangling with Weka

  28. 28

    How to reuse saved classifier created from explorer(in weka) in eclipse java

  29. 29

    How to calculate the nearest neighbors using weka from the command line?

HotTag

Archive