Giter Club home page Giter Club logo

awojna / rseslib Goto Github PK

View Code? Open in Web Editor NEW
15.0 15.0 5.0 1.86 MB

Rough set and machine learning data structures, algorithms and tools, including algorithms for discernibility matrix, reducts, decision rules, classification (RoughSet, KNN, RIONIDA, AQ15, C4.5, SVM, NeuralNetwork and many others), discretization (1R, Entropy Minimization, ChiMerge, MD), and tool for interactive and explainable machine learning.

Home Page: http://rseslib.mimuw.edu.pl

License: GNU General Public License v3.0

Java 99.92% Shell 0.07% Batchfile 0.01%
decision-reducts discernibility-matrix explainable-ml imbalanced-data interactive-machine-learning knn machine-learning rough-sets

rseslib's People

Contributors

awojna avatar grzegorzgora avatar rlatkows avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

rseslib's Issues

Extracting rules from a trained model

Hello,

I have a simple question, and I have probably overlooked something obvious: is there a way to extract the rules generated by a trained model?

weka.classifiers.rules.JRip has the useful method getRuleset(). Is there an equivalent for weka.classifiers.rules.RoughSet?

I know the rules can be visualised with Qmak, but I would like to extract the list of rules into a text based format for further analysis and optimisation.

Thanks,
Ben

Unhandled exception while creating AQ15 model

Hello!

Currently, I am trying to generate rule-based models using the AQ15 algorithm. For some datasets, I encounter a NullPointerException. After some debugging, I have identified the issue.

I am using the rseslib library by importing the Java package. I create my model using the following function:

DoubleDataTable trainTable = new ArrayListDoubleDataTable(new File(trainPath), new EmptyProgress());
...
AQ15Classifier aq15 = new AQ15Classifier((Properties) null, trainTable, prog);

When running AQ15Classifier() I got the error. This creator runs generate(DoubleDataTable tab, Progress prog) from class CoveringRuleGenerator. In this generate function, the generate function from AQ15OneRuleGenerator is started.
In the function generate from AQ15OneRuleGenerator there is a code:

Rule rule = null;
if (candidates.size() > 0) {
   rule = new BooleanFunctionRule((BooleanFunction)candidates.get(0), e_pos.getDecision(), examples.attributes().nominalDecisionAttribute());
}

return rule;

For some dataset the candidates.size() is equal 0 and this function returns null. This value goes back to generate function from CoveringRuleGenerator, where there is a code:

for(int prooningObjts = uncovered.size(); (double)uncovered.size() > this.m_prooning * (double)prooningObjts; uncovered = this.removeCovered(uncovered, rules)) {
  rules.add(this.m_oneRuleGenerator.generate(tab, uncovered, this.m_k, dec));
}

For example, after some iterations I got rules object that looks like this:

AQ15_reguly

We can see that the last added rule is null. Then, the function uncovered = this.removeCovered(uncovered, rules) is started (this execution is inside the above for loop). The removeCovered function is called with the rules object, which has a null value, resulting in a NullPointerException.

Can I do something that will eliminate the NullPointerException error?

I add simple code and dataset for which the problem occurs.

AQ15ErrorExample.zip

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.