A simple, easy-to-use modular machine learning library for Java. This library uses the Java-Linear-Algebra library to satisfy any linear algebra needs. It is highly recommended that you also have the .jar file for this library as well.
- Ensure you have Java SE 16 or later installed.
- Download the Jar file for this library here
- Also download the Jar file for the Java-Linear-Algebra library here
- Add the Jar(s) to your project in your IDE of choice.
- You are ready to being developing machine learning models in Java!
- The Javadoc for the JML library can be found here.
- Examples of using the library can be found on my personal website here.
This library allows the user to do the following and more:
- Fit and train a variety of models
- Regression models
- Linear regression
- Multiple linear regression
- Polynomial regression
- Classification models
- K-Nearest neighbors
- Logistic Regression
- Gaussian Naive Bayes
- perceptrons
- Neural networks
- Layers
- Linear
- Dense
- Dropout
- Activation functions
- linear
- ReLU (rectified linear unit)
- Sigmoid
- tanh (hyperbolic tangent)
- Loss Functions
- Mean squared error
- Binary cross-entropy
- Multi-class cross-entropy
- Weight and Bias initializers
- Constant values
- Random normal/uniform values
- Specify mean, standard deviation, min, and max.
- Glorot normal/uniform values
- He normal/uniform values
- Random orthongonal matrices
- matrix must be square.
- Optimizers
- Gradient descent
- Momentum
- Adam
- Add learning rate schedulers to optimizer
- Use trained models to make predictions on new data
- Save and reuse trained models
- Save a trained model to a file for later use
- Load a saved model and make predictions with it
- Manipulate Data
- Read and write data from and to a file
- Encode text labels
- Split data into training and testing sets
- Normalize data
- Standardize data
- Compute statistics of data
- Mean
- Median
- Mode
- Standard Deviation
- Variance
Please note this library is still under development. Optimizations and new features are planned.
This library was primary developed for educational purposes. While efforts are currently being made to make this library fast and reliable, other Java libraries with similar features may be better suited for large scale practical applications.