
# Py-redranger

redranger is a collection of machine learning models implemented from scratch. This library provides simple and easy-to-use implementations of various machine learning algorithms, including linear regression, multiple regression, logistic regression, k-nearest neighbors (KNN), decision trees,random forests,XGB classifier and SVM.

## Installation

You can install redranger using pip:

```bash
pip install redranger
```

## Usage

Here an examples of how to use the models provided by redranger:

### Linear Regression

```python
from redranger import LinearRegression
import numpy as np

# Example data
X = np.array([[1], [2], [3], [4]])
y = np.array([2, 4, 6, 8])

# Create and train the model
model = LinearRegression(learning_rate=0.01, epochs=1000)
model.fit(X, y)

# Make predictions
predictions = model.predict(X)
print("Predictions:", predictions)

```
similarly implement all other algorithms

## Algorithms

redranger includes the following machine learning algorithms:

Linear Regression - A basic regression model that fits a linear relationship between independent and dependent variables.
Multiple Linear Regression - An extension of linear regression that handles multiple input features.
Logistic Regression - A classification algorithm based on the sigmoid function for binary classification problems.
K-Nearest Neighbors (KNN) - A non-parametric method used for classification and regression based on distance metrics.
Decision Tree - A tree-based model that splits data based on feature importance to make decisions.
Random Forest - An ensemble method using multiple decision trees to improve prediction accuracy and reduce overfitting.
Support Vector Machine (SVM) - A powerful classification algorithm that finds the optimal hyperplane for separating classes.
XGBoost - An optimized gradient boosting algorithm that builds trees sequentially to minimize errors


## Contributing

Contributions are welcome! Please open an issue or submit a pull request on GitHub.

## License

This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

## Contact

For any questions or feedback, please contact [Karthikeyan](mailto:karthikkrishna0907@gmail.com).
