Coder Social home page Coder Social logo

sar4j's Introduction

SAR4J

Statistical Analysis by using R for Java Applications

Build Status codecov MIT Licence Open Source Love

Features

  • Noparametric Tests
    • Kruskal-Wallis
  • Post-Hoc Tests
    • Nemenyi
  • Effect Size
    • Vargha and Delaney A measure
  • Works on Java 1.8

How to install

This project uses GitHub as a Maven Repository. Then you have just add the following section to your repositories tag in pom.xml

<repository>
    <id>mvn-repo</id>
    <url>https://github.com/thiagodnf/mvn-repo/raw/master/releases</url>
    <releases>
        <enabled>true</enabled>
    </releases>
    <snapshots>
        <enabled>true</enabled>
    </snapshots>
</repository>

Then add a dependency into tag of your pom.xml

<dependency>
	<groupId>thiagodnf.sar4j</groupId>
	<artifactId>sar4j</artifactId>
	<version>1.0.0</version>
</dependency>

How to use

List<Observation> observations = new ArrayList<>();
        
observations.add(new Observation("A", Arrays.asList(0.285, 0.338, 0.088, 0.205, 0.363)));
observations.add(new Observation("B", Arrays.asList(0.521, 0.763, 0.325, 0.425, 0.378)));
observations.add(new Observation("C", Arrays.asList(0.989, 1.192, 0.788, 0.549, 0.544)));
observations.add(new Observation("D", Arrays.asList(1.267, 1.625, 1.266, 1.154, 1.268)));

KruskalWallisTest kruskal = new KruskalWallisTest();

TestResult testResult = kruskal.test(observations);

System.out.println(testResult);

The output will be:

{
	"chiSquared": 10.58,
	"df": 2.0,
	"pValue": 0.00504176,
	"postHocResult": {
		"rows": ["B", "C"],
		"columns": ["A", "B"],
		"values": [0.234479781329244, 0.00327823491935975, NaN, 0.234479781329244],
		"dimensions": [2, 2]
	}
}

Contributions

Feel free to fork this project, work on it and then make a pull request.

Questions or Suggestions

Feel free to create issues here as you need

sar4j's People

Contributors

thiagodnf avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

Forkers

tbpilot2020

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.