Code Monkey home page Code Monkey logo

ireos-java's Introduction

IREOS (Internal, Relative Evaluation of Outlier Solutions)

Implementation by Henrique O. Marques < [email protected] >

Original paper:
H.O. Marques, R.J.G.B. Campello, A. Zimek and J. Sander. On the Internal Evaluation of Unsupervised Outlier Detection. In Proceedings of the 27th International Conference on Scientific and Statistical Database Management (SSDBM), San Diego, CA, 2015.

Included in this distribution is an example data set (WBC_withoutdupl_norm) which consists of 223 objects, each of which has 9 attributes. This data set is a publicly available real world dataset from the UCI repository, modified following the procedure described in the paper. Also included are 11 outlier solutions (folder solutions), each of which in a separate file whose name is the number of true outliers (according to the ground truth) correctly labeled in the corresponding solution.


LICENSE:
========

	RapidMiner 5 License:

	This work uses pieces of RapidMiner code and part of them were modified. RapidMiner is a free software distributed under the terms of the GNU Affero General Public License, and the modifications were made under the terms of the license. Below are the RapidMiner classes used and the modifications performed:  
	
	Unmodified classes:

		-com.rapidminer.operator.learner.functions.kernel.jmysvm.examples.SVMExample.java
		-com.rapidminer.operator.learner.functions.kernel.jmysvm.kernel.Kernel.java
		-com.rapidminer.operator.learner.functions.kernel.jmysvm.kernel.KernelRadial.java
		-com.rapidminer.operator.learner.functions.kernel.jmysvm.util.Cache.java

	Modified classes:

		-com.rapidminer.parameter.value.ParameterValueGrid.java - This class was modified on May 2015 in order not to work with operators.
		-com.rapidminer.operator.learner.functions.kernel.logistic.KLR.java - This class was modified on May 2015 in order to work with individual cost weights for each data instance and to not work with operators.
		-com.rapidminer.operator.learner.functions.kernel.jmysvm.examples.SVMExamples.java - This class was modified on May 2015 in order to work with individual cost weights for each data instance; also, unused methods which might have dependencies with other RapidMiner classes were removed, and a method was created to read a dataset from the given plain text file with attributes separated by single spaces.

	Apache Commons Math 3.5 License:

	This work uses Apache Commons Math in order to perform statistical tests. Apache Commons Math is a free software distributed under the terms of the Apache License 2.0 and the binary is included in the folder "libs" without modifications.


Usage:
======

-Create dataset model using dataset file (plain text format, like dataset example provided), the dataset size, and cost weight used by KLR:

	-SVMExamples dataset = new SVMExamples(BufferedReader reader, int size, double c);

-Create the list of solutions to be evaluated, each list element must be a vector that represents whether the corresponding dataset element is an outlier (1) or an inlier (-1):

	-List<int[]> ireosSolutions

-Initialize IREOS using the dataset and the list of solutions to be evaluated:

	-IREOS ireos = new IREOS(dataset, ireosSolutions);

-Set maximum admissible value for gamma (gammaMax):

	-ireos.setGammaMax(double gammaMax);

-Or (alternatively) automatically determine gammaMax:

	-ireos.findGammaMax();

-Set the number of values for gamma within the valid interval [0, gammaMax] (discretization granularity, nGamma):

	-ireos.setnGamma(int nGamma);

-Discretize gamma from 0 to gammaMax into nGamma values; the discretization can be 0 (linear), 1 (quadratic), 2 (logarithmic) or 3 (Rapidminer "logarithmic legacy"):

	-ireos.setGammas(int scale);

-Set the max. clump size:

	-ireos.setmCl(int mCl)

-Evaluate the solutions:

	-List<IREOSSolution> evaluatedSolutions = ireos.evaluateSolutions();

-Return the IREOS index:

	-evaluatedSolutions.get(i).getIREOS();


-Optional:
 ========

-Compute IREOS statistics for the database (distribution estimation in order to perform statistical tests and adjust the index for chance):

	-IREOSStatistics stats = ireos.getStatistics();

-Fit the outlier solution into the statistical model:

	-evaluatedSolutions.get(i).setStatistics(stats);

-Return the Adjusted IREOS index:

	-evaluatedSolutions.get(i).getAdjustedIREOS()

-Return the z-test:

	-evaluatedSolutions.get(i).zTest()

-Return the t-test:

	-evaluatedSolutions.get(i).tTest()

ireos-java's People

Watchers

Henrique Oliveira Marques avatar

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.