Welcome to the ML-DL-From-Scratch library! This library is designed to implement fundamental and advanced machine learning algorithms from the ground up using minimal dependencies. Our goal is to provide a clear and educational resource for understanding and experimenting with machine learning.
-
Supervised Learning:
- Linear Regression
- Logistic Regression
- Support Vector Machines (SVMs)
- Decision Trees
- Random Forests
-
Unsupervised Learning:
- k-Means Clustering
- Principal Component Analysis (PCA)
-
Utilities:
- Data Preprocessing (scaling, normalization, encoding)
- Model Evaluation Metrics (e.g., accuracy, precision, recall, RMSE)
- Dataset Splitting (train/test/validation)
-
Clone the repository:
git clone https://github.com/CODE-ESI/ml-dl-from-scratch.git
-
Navigate to the project directory:
cd ml-dl-from-scratch
-
Install dependencies:
pip install -r requirements.txt
Here's a simple example to use the Linear Regression module:
from ml_dl_from_scratch.supervised.line_fit import LineFit
# Example dataset
X = [[1], [2], [3], [4]]
y = [3, 7, 11, 15]
# Initialize and train the model
model = LineFit()
model.train(X, y)
# Predict
predictions = model.estimate([[5], [6]])
print(predictions) # Output: [19, 23]
More examples are available in the /examples
directory.
ml-dl-from-scratch/
├── core_algorithms/ # Core ML algorithms
├── datasets/ # Example datasets
├── utils/ # Utility functions
├── examples/ # Example scripts for using the library
├── tests/ # Unit tests for validation
├── LICENSE # License information
├── README.md # Project overview
└── requirements.txt # Required Python dependencies
Contributions are welcome! To contribute:
- Fork the repository.
- Create a feature branch:
git checkout -b feature-name
. - Commit your changes:
git commit -m 'Add feature-name'
. - Push to the branch:
git push origin feature-name
. - Create a pull request.
Please ensure your code follows the repository's coding standards and includes tests where applicable.
This project is licensed under the MIT License - see the LICENSE file for details.
For questions, suggestions, or collaboration, feel free to open an issue or contact us through the CODE-ESI GitHub organization.
Happy Learning!