seratch / apriori4j   0.4

MIT License GitHub

Apriori Algorithm Implementation in Java, Scala

Scala versions: 2.12 2.11 2.10

apriori4j - Apriori Algorithm Implementation in Java

Maven Central

Apriori Algorithm implementation in Java which is based on https://github.com/asaini/Apriori/blob/master/apriori.py.

apriori4j

How to use

Maven

<dependency>
  <groupId>com.github.seratch</groupId>
  <artifactId>apriori4j</artifactId>
  <version>0.4</version>
</dependency>

Gradle

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

Example

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

List<Transaction> 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

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

Example

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