An open API service indexing awesome lists of open source software.

https://github.com/seratch/apriori4j

Apriori Algorithm Implementation in Java, Scala
https://github.com/seratch/apriori4j

Last synced: 17 days ago
JSON representation

Apriori Algorithm Implementation in Java, Scala

Awesome Lists containing this project

README

        

# apriori4j - Apriori Algorithm Implementation in Java

[![Maven Central](https://maven-badges.herokuapp.com/maven-central/com.github.seratch/apriori4j/badge.svg)](https://maven-badges.herokuapp.com/maven-central/com.github.seratch/apriori4j)

[Apriori Algorithm](http://en.wikipedia.org/wiki/Apriori_algorithm) implementation in Java which is based on https://github.com/asaini/Apriori/blob/master/apriori.py.

## apriori4j

### How to use

#### Maven

```xml

com.github.seratch
apriori4j
0.4

```

#### Gradle

```
compile 'com.github.seratch:apriori4j:0.4'
```

#### Example

```java
import apriori4j.*;
import java.util.List;

List transactions = prepareTranscations();
Double minSupport = 0.15;
Double minConfidence = 0.6;

AprioriAlgorithm apriori = new AprioriAlgorithm(minSupport, minConfidence);
AnalysisResult result = apriori.analyze(transactions);
```

## apriori4s

Scala interface is also available for the following Scala binary versions.

- Scala 2.10
- Scala 2.11
- Scala 2.12

### How to use

#### sbt

```scala
libraryDependencies += "com.github.seratch" %% "apriori4s" % "0.4"
```

#### Example

```scala
import apriori4s._

val transactions: Seq[Transaction] = prepareTransactions();
val apriori = AprioriAlgorithm(minSupport = 0.15, minConfidence = 0.6)
val result: AnalysisResult = apriori.analyze(transactions)
```

## License

(The MIT License)

Copyright (c) 2014 - 2015 Kazuhiro Sera