Comments (5)
Due to historic reasons, most classifiers implement their own, independent data structures. The RuleStats class is only used by JRip. Parsing the string representation of rules and then turning them back into Java data structures (from within Python using pww) seems an arduous process.
If you still want to pursue the rule parsing, I'd recommend to use Weka's classes in a more direct way, either through Java, Groovy or Jython (the latter two are scripting languages that run directly in the JVM).
from python-weka-wrapper3.
Due to historic reasons, most classifiers implement their own, independent data structures. The RuleStats class is only used by JRip. Parsing the string representation of rules and then turning them back into Java data structures (from within Python using pww) seems an arduous process.
If you still want to pursue the rule parsing, I'd recommend to use Weka's classes in a more direct way, either through Java, Groovy or Jython (the latter two are scripting languages that run directly in the JVM).
@fracpete , thanks for the instant reply.
Yes, I am able to get the ruleset for JRIP. For other methods, the rules are as a weka.classifier.Classifier object, so can you tell me which Weka classes should I use to get the ruleset from this classifier object. I need to provide the ruleset as a parameter to the RuleStats class for getting the statistics.
from python-weka-wrapper3.
These other classes do not provide an interface for accessing the rules, as far as I know (maybe there are protected
methods, but you'd have to dig in the source code for that).
weka.classifiers.Classifier
is the general interface that all classification and regression algorithms share. It does not give you any access to rule sets.
from python-weka-wrapper3.
These other classes do not provide an interface for accessing the rules, as far as I know (maybe there are
protected
methods, but you'd have to dig in the source code for that).
weka.classifiers.Classifier
is the general interface that all classification and regression algorithms share. It does not give you any access to rule sets.
Thanks a lot for your help. I will try to find out a way for this.
BTW, the python-weka-wrapper3 is of great help to me. It saved the development time for me.
from python-weka-wrapper3.
Hey,
I solved the issue by parsing the classifier outputs and creating methods for computing the statistics in Python. This is working fine.
I agree to close this issue.
from python-weka-wrapper3.
Related Issues (20)
- Add convenience methods to make subset generation of datasets easier HOT 1
- Add AttributeSelectedClassifier meta-classifier HOT 1
- Problems deserialising model trained in Fiji HOT 6
- Syntax Error HOT 2
- Example from documentation "Create dataset from matrices" raises an exception HOT 1
- classify_instance - Null Exception HOT 5
- using image filter in python HOT 1
- AttributeError: 'NoneType' object has no attribute 'find_class' HOT 3
- Logging level configuration of jvm module HOT 2
- add entry_point for package manager HOT 1
- Access protected attribute of Java class HOT 6
- Bayes net visualize tree HOT 4
- Plot multiple graphs HOT 1
- How to use pyinstaller with weka? HOT 3
- sklweka JavaException: no/uib/cipr/matrix/Matrix HOT 2
- java exception HOT 9
- python-javabridge does not work with Java 17 HOT 1
- Error installing Weka packages on Docker HOT 3
- Remove easy_install from Troubleshooting HOT 1
- Error while installing python-javabridge HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from python-weka-wrapper3.