Learning Based Java (LBJava)

Overview

Learning Based Java

Build Status Build status

Compiling the whole package

From the root directory run the following command:

  • Just compile all examples: mvn compile

  • Compile and train all examples: mvn compile -P train-all-examples See more details here.

  • Test the whole project: mvn test

Compiling LBJava Core

  • mvn compile -pl lbjava

External Links

Here is LBJava's homepage.

Licensing

To see the full license for this software, see LICENSE or visit the download page for this software and press "Download". The next screen displays the license.

Comments
  • added interface to set bias and removed bias update

    added interface to set bias and removed bias update

    @christos-c @danyaljj Please review this PR.

    When I was using SparseWinnow, I ran into the problem that the accuracy is always around 50%. The issue is that SparseWinnow use a constant 1 as bias(theta) and there is no way to set it by the user.

    For winnow update rule: y(wT dot x + theta) < margin. Initially weight vector is inited to all 1s, it's very likely (wT dot x + 1) > 0. When y is either 0 or negative, regardless of making a mistake or not, the winnow is always demoting in this case. This deviates greatly from the essence of the update rule of winnow algorithm.

    It's suggested in CS 446 homework 3 handout that setting theta to -n, where n is the number of features and do not update it.

    I have tested using the updated winnow algorithm, with 10 iterations producing 99.98% accuracy.

    opened by yj14n9xyz 15
  • Generate source files from .lbj during compile phase.

    Generate source files from .lbj during compile phase.

    mvn compile at root-level builds all three projects and generates sources for the examples project using the latest LBJava code.

    Pending: lbjava:generate and lbjava:compile commands do not work currently as the plugin is never installed or fetched from repo. Investigating if we can do this as part of build process itself.

    opened by bhargav 13
  • WIP: added adagrad class and unit test

    WIP: added adagrad class and unit test

    @christos-c I have added both AdaGrad class and unit test.

    However, I couldn't run any of the existing tests because of some errors. I am not sure whether it's due to my set up or there is an issue in lbjava. I have run the unit test successfully in my own project.

    Thanks.

    opened by yj14n9xyz 12
  • WIP: added adagrad and unit test

    WIP: added adagrad and unit test

    @christos-c @danyaljj Please review this PR. Currently AdaGrad uses hinge loss as loss function. I will add lms loss function after adding algo tests.

    opened by yj14n9xyz 11
  • OJalgoHook is too verbose

    OJalgoHook is too verbose

    There are lots of print statements that need to be delegated to a debug mode. Also, "Good news!: the optimizatin solution is optimal" 1) too informal 2) contains a spelling error (IntelliJ catches these :smile:)

    opened by christos-c 8
  • Using inference project as dependency

    Using inference project as dependency

    The inference package offers a nice abstraction over various ILP (and non-ILP) inference algorithms and hooks (just ported oj! there).

    It would be nice to have LBJava's inference classes drawn from this package, since it'll be easier to update and maintain.

    enhancement 
    opened by christos-c 7
  • added regression example and fixed script issue

    added regression example and fixed script issue

    @christos-c @danyaljj

    I have fixed the script issue and added the regression example. Code are documented and data set is cited and documented. All other examples compiled successfully.

    opened by yj14n9xyz 7
  • Minor changes

    Minor changes

    Updated compileLBJ.sh to point to the latest vesrion Updated mvn-plugin's LBJava dependency to point to the project's version Added generated .ex files in main gitignore Removed auto-generated LBJava files (sym and parser classes)

    opened by christos-c 7
  • AdaGrad classification version added; Data set from CS 446 HW 3 added

    AdaGrad classification version added; Data set from CS 446 HW 3 added

    @danyaljj @christos-c Please review this PR.

    • AdaGradCL classification added
    • AlgoDataSet: CS 446 Homework 3 data set
    • AlgoData, AlgoParser: example data structure, parser
    • AdaGradCLClassifier added

    With data set of 500 features and 50000 examples (40000 for training, 10000 for testing), AdaGradCL has 99.61% accuracy with only 10 iterations.

    Thanks!

    opened by yj14n9xyz 6
  • No exit in static init

    No exit in static init

    A static init block was doing a system.exit if the ".lex" or ".lc" filedid not exist in the classpath. The absence of these files is now ignored during static init, but throws a RuntimeException if you try to fetch the static instance.

    opened by cowchipkid 4
  • license on top of files?

    license on top of files?

    @mssammon @christos-c what do you think about adding this snippet on top of each file?

    /*******************************************************************************
     * University of Illinois/Research and Academic Use License 
     * Copyright (c) 2016, 
     *
     * Developed by:
     * The Cognitive Computations Group
     * University of Illinois at Urbana-Champaign
     * http://cogcomp.cs.illinois.edu/
     *
     * Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal with the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
     *
     * Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimers.
     * Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimers in the documentation and/or other materials provided with the distribution.
     * Neither the names of the Cognitive Computations Group, nor the University of Illinois at Urbana-Champaign, nor the names of its contributors may be used to endorse or promote products derived from this Software without specific prior written permission.
     * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE CONTRIBUTORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS WITH THE SOFTWARE.
     *     
     *******************************************************************************/
    
    opened by danyaljj 4
  • Bump plexus-utils from 3.0.8 to 3.0.16 in /lbjava-mvn-plugin

    Bump plexus-utils from 3.0.8 to 3.0.16 in /lbjava-mvn-plugin

    Bumps plexus-utils from 3.0.8 to 3.0.16.

    Commits
    • cf317f9 [maven-release-plugin] prepare release plexus-utils-3.0.16
    • 26e3ae8 Remove incorrect tag element
    • 99639d6 Little test to mimic ${project.artifactMap(g:a:c)} usage
    • 5d46979 Needs to build with 1.7 because of some Java7 utils, but source/target needs ...
    • 18bd77d We can't switch to Java7 yet while Maven still needs to run on Java6
    • 3cf855c Remove release cruft
    • 3196d4c ignore .java-version
    • 57b636d changed XmlUtilTest to create test output directory
    • 33091f9 Use the same method for finding the basedir as our other code.
    • a153249 MNG-5553 reworked dotted expressions interpreter
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump junit from 4.11 to 4.13.1 in /lbjava

    Bump junit from 4.11 to 4.13.1 in /lbjava

    Bumps junit from 4.11 to 4.13.1.

    Release notes

    Sourced from junit's releases.

    JUnit 4.13.1

    Please refer to the release notes for details.

    JUnit 4.13

    Please refer to the release notes for details.

    JUnit 4.13 RC 2

    Please refer to the release notes for details.

    JUnit 4.13 RC 1

    Please refer to the release notes for details.

    JUnit 4.13 Beta 3

    Please refer to the release notes for details.

    JUnit 4.13 Beta 2

    Please refer to the release notes for details.

    JUnit 4.13 Beta 1

    Please refer to the release notes for details.

    JUnit 4.12

    Please refer to the release notes for details.

    JUnit 4.12 Beta 3

    Please refer to the release notes for details.

    JUnit 4.12 Beta 2

    No release notes provided.

    JUnit 4.12 Beta 1

    No release notes provided.

    Commits
    • 1b683f4 [maven-release-plugin] prepare release r4.13.1
    • ce6ce3a Draft 4.13.1 release notes
    • c29dd82 Change version to 4.13.1-SNAPSHOT
    • 1d17486 Add a link to assertThrows in exception testing
    • 543905d Use separate line for annotation in Javadoc
    • 510e906 Add sub headlines to class Javadoc
    • 610155b Merge pull request from GHSA-269g-pwp5-87pp
    • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
    • a5d205c Fix GitHub link in FAQ (#1672)
    • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Bump junit from 4.8.2 to 4.13.1 in /lbjava-mvn-plugin

    Bump junit from 4.8.2 to 4.13.1 in /lbjava-mvn-plugin

    Bumps junit from 4.8.2 to 4.13.1.

    Release notes

    Sourced from junit's releases.

    JUnit 4.13.1

    Please refer to the release notes for details.

    JUnit 4.13

    Please refer to the release notes for details.

    JUnit 4.13 RC 2

    Please refer to the release notes for details.

    JUnit 4.13 RC 1

    Please refer to the release notes for details.

    JUnit 4.13 Beta 3

    Please refer to the release notes for details.

    JUnit 4.13 Beta 2

    Please refer to the release notes for details.

    JUnit 4.13 Beta 1

    Please refer to the release notes for details.

    JUnit 4.12

    Please refer to the release notes for details.

    JUnit 4.12 Beta 3

    Please refer to the release notes for details.

    JUnit 4.12 Beta 2

    No release notes provided.

    JUnit 4.12 Beta 1

    No release notes provided.

    JUnit 4.11

    No release notes provided.

    Changelog

    Sourced from junit's changelog.

    Summary of changes in version 4.13.1

    Rules

    Security fix: TemporaryFolder now limits access to temporary folders on Java 1.7 or later

    A local information disclosure vulnerability in TemporaryFolder has been fixed. See the published security advisory for details.

    Test Runners

    [Pull request #1669:](junit-team/junit#1669) Make FrameworkField constructor public

    Prior to this change, custom runners could make FrameworkMethod instances, but not FrameworkField instances. This small change allows for both now, because FrameworkField's constructor has been promoted from package-private to public.

    Commits
    • 1b683f4 [maven-release-plugin] prepare release r4.13.1
    • ce6ce3a Draft 4.13.1 release notes
    • c29dd82 Change version to 4.13.1-SNAPSHOT
    • 1d17486 Add a link to assertThrows in exception testing
    • 543905d Use separate line for annotation in Javadoc
    • 510e906 Add sub headlines to class Javadoc
    • 610155b Merge pull request from GHSA-269g-pwp5-87pp
    • b6cfd1e Explicitly wrap float parameter for consistency (#1671)
    • a5d205c Fix GitHub link in FAQ (#1672)
    • 3a5c6b4 Deprecated since jdk9 replacing constructor instance of Double and Float (#1660)
    • Additional commits viewable in compare view

    Dependabot compatibility score

    Dependabot will resolve any conflicts with this PR as long as you don't alter it yourself. You can also trigger a rebase manually by commenting @dependabot rebase.


    Dependabot commands and options

    You can trigger Dependabot actions by commenting on this PR:

    • @dependabot rebase will rebase this PR
    • @dependabot recreate will recreate this PR, overwriting any edits that have been made to it
    • @dependabot merge will merge this PR after your CI passes on it
    • @dependabot squash and merge will squash and merge this PR after your CI passes on it
    • @dependabot cancel merge will cancel a previously requested merge and block automerging
    • @dependabot reopen will reopen this PR if it is closed
    • @dependabot close will close this PR and stop Dependabot recreating it. You can achieve the same result by closing it manually
    • @dependabot ignore this major version will close this PR and stop Dependabot creating any more for this major version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this minor version will close this PR and stop Dependabot creating any more for this minor version (unless you reopen the PR or upgrade to it yourself)
    • @dependabot ignore this dependency will close this PR and stop Dependabot creating any more for this dependency (unless you reopen the PR or upgrade to it yourself)
    • @dependabot use these labels will set the current labels as the default for future PRs for this repo and language
    • @dependabot use these reviewers will set the current reviewers as the default for future PRs for this repo and language
    • @dependabot use these assignees will set the current assignees as the default for future PRs for this repo and language
    • @dependabot use this milestone will set the current milestone as the default for future PRs for this repo and language

    You can disable automated security fix PRs for this repo from the Security Alerts page.

    dependencies 
    opened by dependabot[bot] 0
  • Added pruneUselessLabels to SparseNetworkLearner

    Added pruneUselessLabels to SparseNetworkLearner

    This method will discard any classifiers for labels not in the list passed in. This is intended to allow users to discard classifers for labels they are not interested in, but may have uninteded side effects, like GPE labels being classified as PERSON.

    opened by cowchipkid 1
  • Add ability for weighted code

    Add ability for weighted code

    Add ability for learners to be weighted. See this branch of my fork: https://github.com/mayhewsw/lbjava/tree/weighted

    The difficulty is that the abstract function learn() in Learner.java needs to be changed, which is a breaking change. It's easy to retrofit classifiers, but it is busy work (already done in my branch).

    So far, I have implemented weighted learning only for SparseAveragePerceptron.

    Any comments @mssammon @cowchipkid @danyaljj ?

    enhancement 
    opened by mayhewsw 0
  • ILP inference fails when classifier is loaded from model files

    ILP inference fails when classifier is loaded from model files

    I have an ILP Inference classifier that relies on a base classifier. When the classifier is initialized and trained, the ILP inference classifier works fine.

    However, if I initialize the base classifier with a model file and a lexicon file that are pre-trained, the ILP classifier gives me an error LBJava ERROR: Classifier relation_classifier did not return any scores. ILP inference cannot be performed.

    The error message is produced from https://github.com/CogComp/lbjava/blob/434cf0a40e4f2ae08c96d3ae1b96f319eb531d67/lbjava/src/main/java/edu/illinois/cs/cogcomp/lbjava/infer/ILPInference.java#L173-#L174

    opened by Slash0BZ 3
Owner
CogComp
Cognitive Computation Group, led by Prof. Dan Roth
CogComp
Datumbox is an open-source Machine Learning framework written in Java which allows the rapid development of Machine Learning and Statistical applications.

Datumbox Machine Learning Framework The Datumbox Machine Learning Framework is an open-source framework written in Java which allows the rapid develop

Vasilis Vryniotis 1.1k Dec 9, 2022
MALLET is a Java-based package for statistical natural language processing, document classification, clustering, topic modeling, information extraction, and other machine learning applications to text.

MALLET is a Java-based package for statistical natural language processing, document classification, clustering, topic modeling, information extraction, and other machine learning applications to text.

null 900 Jan 2, 2023
Java Statistical Analysis Tool, a Java library for Machine Learning

Java Statistical Analysis Tool JSAT is a library for quickly getting started with Machine Learning problems. It is developed in my free time, and made

null 752 Dec 20, 2022
An Engine-Agnostic Deep Learning Framework in Java

Deep Java Library (DJL) Overview Deep Java Library (DJL) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is desig

Amazon Web Services - Labs 2.9k Jan 7, 2023
java deep learning algorithms and deep neural networks with gpu acceleration

Deep Neural Networks with GPU support Update This is a newer version of the framework, that I developed while working at ExB Research. Currently, you

Ivan Vasilev 1.2k Jan 6, 2023
Tribuo - A Java machine learning library

Tribuo - A Java prediction library (v4.2) Tribuo is a machine learning library in Java that provides multi-class classification, regression, clusterin

Oracle 1.1k Dec 28, 2022
Java time series machine learning tools in a Weka compatible toolkit

UEA Time Series Classification A Weka-compatible Java toolbox for time series classification, clustering and transformation. For the python sklearn-co

Machine Learning and Time Series Tools and Datasets 140 Nov 7, 2022
An Engine-Agnostic Deep Learning Framework in Java

Deep Java Library (DJL) Overview Deep Java Library (DJL) is an open-source, high-level, engine-agnostic Java framework for deep learning. DJL is desig

DeepJavaLibrary 2.9k Jan 7, 2023
Oryx 2: Lambda architecture on Apache Spark, Apache Kafka for real-time large scale machine learning

Oryx 2 is a realization of the lambda architecture built on Apache Spark and Apache Kafka, but with specialization for real-time large scale machine l

Oryx Project 1.8k Dec 28, 2022
Statistical Machine Intelligence & Learning Engine

Smile Smile (Statistical Machine Intelligence and Learning Engine) is a fast and comprehensive machine learning, NLP, linear algebra, graph, interpola

Haifeng Li 5.7k Jan 1, 2023
On-device wake word detection powered by deep learning.

Porcupine Made in Vancouver, Canada by Picovoice Porcupine is a highly-accurate and lightweight wake word engine. It enables building always-listening

Picovoice 2.8k Dec 30, 2022
A machine learning package built for humans.

aerosolve Machine learning for humans. What is it? A machine learning library designed from the ground up to be human friendly. It is different from o

Airbnb 4.8k Dec 30, 2022
statistics, data mining and machine learning toolbox

Disambiguation (Italian dictionary) Field of turnips. It is also a place where there is confusion, where tricks and sims are plotted. (Computer scienc

Aurelian Tutuianu 63 Jun 11, 2022
Oryx 2: Lambda architecture on Apache Spark, Apache Kafka for real-time large scale machine learning

Oryx 2 is a realization of the lambda architecture built on Apache Spark and Apache Kafka, but with specialization for real-time large scale machine l

Oryx Project 1.7k Mar 12, 2021
Test project for learning GoF design pattern

DesignPattern Test project for learning GoF design pattern ㅁ개요 객체지향 설계의 교과서라고 불리는 Design Pattern 을 직접 Activity 별로 구현해봤습니다. ㅁ동기 물론 디자인패턴을 몰라도 기능은 얼마든지

null 11 Aug 8, 2022
A course for learning how to program FRC robots using the WPILib and a Romi robot.

FRC-Romi-Programming-Course A course for learning how to program FRC robots using the WPILib and a Romi robot. This course is designed for FRC teams o

null 16 Nov 9, 2022
Bazel training materials and codelabs focused on beginner, advanced and contributor learning paths

Bazel-learning-paths This repo has materials for learning Bazel: codelabs, presentations, examples. We are open sourcing the content for training engi

null 18 Nov 14, 2022
Reference implementation for MINAS (MultI-class learNing Algorithm for data Streams), an algorithm to address novelty detection in data streams multi-class problems.

Reference implementation for MINAS (MultI-class learNing Algorithm for data Streams), an algorithm to address novelty detection in data streams multi-class problems.

Douglas M. Cavalcanti 4 Sep 7, 2022