<commit_before># Commons Weka (BETA) #

[![Build Status](https://img.shields.io/travis/octavian-h/commons-weka/master.svg)](https://travis-ci.org/octavian-h/commons-weka)
[![Coverage Status](https://img.shields.io/coveralls/octavian-h/commons-weka/master.svg)](https://coveralls.io/github/octavian-h/commons-weka?branch=master)

## Overview ##
The goal of this utility is to provide optimised functions to run validation tasks using Weka library.

## Features ##

* Multi-threaded evaluation comparison of variable train set size
* Hold one out validation

## Usage ##
Add the following dependency to your maven project.
```xml
<dependency>
    <groupId>ro.hasna.commons</groupId>
    <artifactId>commons-weka</artifactId>
    <version>0.3</version>
</dependency>
```

And also add the following custom repository.
```xml
<repository>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
    <id>central</id>
    <name>bintray</name>
    <url>http://jcenter.bintray.com</url>
</repository>
```

### Code Example ###

```java
class Test{
    public static void main(String[] args){
        Classifier classifier = new IBk(1); //1NN classifier
        Instances train = WekaUtils.readInstances("path/to/train.arff");
        Instances test = WekaUtils.readInstances("path/to/test.arff");

        MultipleTrainTestValidation task = new MultipleTrainTestValidation.Builder(classifier, train, test)
                                          .trainSizePercentages(Arrays.asList(0.6, 0.7, 0.8))
                                          .iterations(10)
                                          .build();
        List<EvaluationResult> results = task.call();
<commit_msg>[no-deploy] update version from README<commit_after># Commons Weka (BETA) #

[![Build Status](https://img.shields.io/travis/octavian-h/commons-weka/master.svg)](https://travis-ci.org/octavian-h/commons-weka)
[![Coverage Status](https://img.shields.io/coveralls/octavian-h/commons-weka/master.svg)](https://coveralls.io/github/octavian-h/commons-weka?branch=master)

## Overview ##
The goal of this utility is to provide optimised functions to run validation tasks using Weka library.

## Features ##

* Multi-threaded evaluation comparison of variable train set size
* Hold one out validation

## Usage ##
Add the following dependency to your maven project.
```xml
<dependency>
    <groupId>ro.hasna.commons</groupId>
    <artifactId>commons-weka</artifactId>
    <version>0.4</version>
</dependency>
```

And also add the following custom repository.
```xml
<repository>
    <snapshots>
        <enabled>false</enabled>
    </snapshots>
    <id>central</id>
    <name>bintray</name>
    <url>http://jcenter.bintray.com</url>
</repository>
```

### Code Example ###

```java
class Test{
    public static void main(String[] args){
        Classifier classifier = new IBk(1); //1NN classifier
        Instances train = WekaUtils.readInstances("path/to/train.arff");
        Instances test = WekaUtils.readInstances("path/to/test.arff");

        MultipleTrainTestValidation task = new MultipleTrainTestValidation.Builder(classifier, train, test)
                                          .trainSizePercentages(Arrays.asList(0.6, 0.7, 0.8))
                                          .iterations(10)
                                          .build();
        List<EvaluationResult> results = task.call();

{'fraction_non_alphanumeric': 0.13694173321502515, 'fraction_numerical': 0.00709849157054126, 'mean_word_length': 2.978823529411765, 'pattern_counts': {'":': 0, '<': 45, '<?xml version=': 0, '>': 45, 'https://': 8, 'lorem ipsum': 0, 'www.': 0, 'xml': 4}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 12, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1231794', 'n_tokens_mistral': 1053, 'n_tokens_neox': 984, 'n_words': 216}