Giter VIP home page Giter VIP logo

awojna / rseslib Goto Github PK

View Code? Open in Web Editor NEW
15.0 3.0 5.0 1.94 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%
rough-sets decision-reducts discernibility-matrix knn interactive-machine-learning explainable-ml imbalanced-data machine-learning

rseslib's Introduction

Rseslib

Rough set and machine learning data structures, algorithms and tools in Java. The project includes algorithms for lower and upper approximation, discernibility matrix, reducts, decision rules and wide range of discretization and classification algorithms, including KNN classifier optimizing automatically the distance measure and the number of voting neighbors, and dedicated to imbalanced data RIONIDA with multidimensional self-optimization. The project includes also QMAK - a tool for interacting with machine learning models and visualizing classification process, and Simple Grid Manager for running experiments on many computers or cores. For more information visit https://rseslib.mimuw.edu.pl.

The project is built with Java Development Kit and Maven. The following command will build rseslib-<version>.jar and copy other needed libraries to Maven target directory:

mvn package

Rseslib can be used in the following ways:

1. Java library

Rseslib 3 algorithms provide a brief list of algorithms available in the project and Rseslib User Guide is the main source of information how to use Rseslib components within Java code.

2. Command line

Rseslib includes command-line programs evaluating attributes, computing reducts or rules or running experiments with Rseslib classifiers. See the chapter Command line programs in Rseslib User Guide for information how to run them. While starting a program, add weka jar version 3.8.x to classpath to make it work on ARFF data files, for example:

java -cp rseslib.jar:weka.jar rseslib.example.ComputeReducts data/iris.arff iris.reducts

3. WEKA platform

4 selected classifiers (Rough Set based, K Nearest Neighbors, K Nearest Neighbors with Local Metric Induction, and RIONIDA) are available in WEKA. See the chapter WEKA in Rseslib User Guide for information how to install the Rseslib package using WEKA package manager and where to find Rseslib classifiers in WEKA catalog.

4. QMAK

QMAK is a GUI tool included in Rseslib. 5-minute video demonstrating the tool is available at QMAK website. The simplest way to run QMAK is to download the package from the website, unpack it and run qmak.sh (on Linux) or qmak.bat (on Windows). See the chapter QMAK: Interaction wit classifers and their visualization in Rseslib User Guide and Help in the main menu of the appliction for information how to use the tool. If you run QMAK from the source add jcommon-0.9.6.jar, jfreechart-0.9.21.jar and weka jar version 3.8.x to classpath, for example:

java -cp jcommon-0.9.6.jar:jfreechart-0.9.21.jar:weka.jar:rseslib.jar rseslib.qmak.QmakMain

5. Simple Grid Manager

Simple Grid Manager is a tool included in Rseslib for running experiments with Rseslib classifiers on many computers or cores. See the chapter SGM: Computing many experiments on many computers/cores in Rseslib User Guide for information how to configure experiments and run the tool.

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.