Skip to content

twiddles/jftrl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Java-FTRL

An optimized Java implementation of the "Follow the (Proximally) Regularized Leader"-Algorithm.

References
Installation (requires Maven)
  • git clone https://github.com/twiddles/jftrl.git
  • cd jftrl
  • mvn clean install
Referenced as a Maven dependency
<dependency>
    <groupId>org.ftrl</groupId>
    <artifactId>jftrl</artifactId>
    <version>1.0.0-SNAPSHOT</version>
</dependency>
Example Code

XOR

FTRL clf = new FTRL();
clf.interactions = 2; // automatically consider feature interactions up to  a degree of 2
clf.λ1 = 0.0; // disable regularization for the sake of simplicity

clf.fit("true true", Label.FALSE);
clf.fit("true false", Label.TRUE);
clf.fit("false true", Label.TRUE);
clf.fit("false false", Label.FALSE);

clf.predict("true true"); // Label.FALSE
clf.predict("false true"); // Label.TRUE

Kaggle Titanic

See example code here

About

An optimized Java implementation of the "Follow the (Proximally) Regularized Leader"-Algorithm.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages