Skip to content

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Latest commit

 

History

5 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

🧠 SynapseML — Lightweight Machine Learning Framework in Java

SynapseML is a minimal machine learning library written in pure Java. It implements popular classification algorithms from scratch with a clean, modular structure — ideal for learning, experimentation, and demonstration purposes.


🚀 Features

✔️ Implemented ML Models:

  • Perceptron (single-layer binary classifier)
  • k-Nearest Neighbors (KNN)
  • Naive Bayes (binary classification with Laplace smoothing)
  • Logistic Regression (gradient descent based)
  • Decision Tree (ID3 / Information Gain)
  • Decision Tree (Gini Index)

✔️ Framework Utilities:

  • Common model interface: MLModel
  • Sample usage in ExampleApp.java
  • Predicts binary outputs for toy datasets
  • Easily extendable for new models and utilities

🧱 Project Structure

synapse/ ├── models/ │ ├── Perceptron.java │ ├── KNN.java │ ├── NaiveBayes.java │ ├── LogisticRegression.java │ ├── DecisionTreeID3.java │ ├── DecisionTreeGini.java │ └── MLModel.java ← shared model interface └── ExampleApp.java ← demo of models


🧪 Example Usage

MLModel model = new DecisionTreeID3();
model.train(X, y);
double prediction = model.predict(new double[] {1.0, 0.0});

You can easily switch between models like:

MLModel model = new LogisticRegression();

All models implement:

interface MLModel {
    void train(double[][] X, double[] y);
    double predict(double[] x);
}

📈 Evaluation (coming soon)

Metrics to be added soon:

  • Accuracy

  • Precision, Recall, F1-Score

  • Confusion Matrix

  • k-Fold Cross Validation

🛠 Planned Features

  • Load datasets from .csv

  • Feature normalization

  • Multiclass classification

  • Cross-validation

  • CLI or JavaFX UI frontend

  • Build as .jar file with CLI flags

  • Graph/tree visualizer for decision trees

📚 About the Author

Nurassyl Mussainov

High school student (10th grade) | Self-taught programmer | ML & CS enthusiast 🇰🇿 Based in Kazakhstan

About

No description, website, or topics provided.

Resources

Stars

2 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages