Giter VIP home page Giter VIP logo

Comments (5)

fracpete avatar fracpete commented on June 27, 2024

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.

Mahima-ai avatar Mahima-ai commented on June 27, 2024

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.

fracpete avatar fracpete commented on June 27, 2024

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.

Mahima-ai avatar Mahima-ai commented on June 27, 2024

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.

Mahima-ai avatar Mahima-ai commented on June 27, 2024

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)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.