Introduction¶
WARNING: Python 2.7 reaches its end-of-life in 2020, you should consider using the Python 3 version of this library!
python-weka-wrapper allows you to use Weka from within Python.
The library uses the javabridge library for starting up, communicating with and shutting down the Java Virtual Machine in which the Weka processes get executed.
python-weka-wrapper provides a thin wrapper around the basic (non-GUI) functionality of Weka (some plots are available using Python functionality). You can automatically add all your Weka packages to the classpath. Additional jars can be added as well.
Links:
- Looking for code?
- Questions? You can post them in the project’s Google Group
- MLOSS project
Requirements¶
The library has the following requirements:
- Python 2.7 (does not work with Python 3)
- javabridge (>= 1.0.14, required)
- pygraphviz (optional)
- PIL (optional)
- matplotlib (optional)
- Oracle JDK 1.8+
Uses:
- Weka (3.9.3)
Contents¶
- Installation
- Troubleshooting
- Command-line
- API
- Option handling
- virtualenv
- Source code
- Examples
- Start up JVM
- Location of the datasets
- Load dataset and print it
- Create dataset manually
- Create dataset from lists
- Create dataset from matrices
- Output help from underlying OptionHandler
- Option handling
- Build classifier on dataset, output predictions
- Build classifier on dataset, print model and draw graph
- Build classifier incrementally with data and print model
- Cross-validate filtered classifier and print evaluation and display ROC
- Cross-validate regressor, display classifier errors and predictions
- Parameter optimization - GridSearch
- Parameter optimization - MultiSearch
- Experiments
- Clustering
- Associations
- Attribute selection
- Data generators
- Filters
- Partial classnames
- Packages
- Stop JVM
- Database access
- Flow
API¶
- weka package
- Subpackages
- weka.core package
- Submodules
- weka.core.capabilities module
- weka.core.classes module
- weka.core.converters module
- weka.core.database module
- weka.core.dataset module
- weka.core.jvm module
- weka.core.packages module
- weka.core.serialization module
- weka.core.stemmers module
- weka.core.stopwords module
- weka.core.tokenizers module
- weka.core.types module
- weka.core.version module
- Module contents
- weka.flow package
- weka.plot package
- weka.core package
- Submodules
- weka.associations module
- weka.attribute_selection module
- weka.classifiers module
- weka.clusterers module
- weka.datagenerators module
- weka.experiments module
- weka.filters module
- Module contents
- Subpackages