Metadata-Version: 2.4
Name: skleam-code
Version: 0.3.0a0
Summary: A plug-and-play machine learning package with and without libraries.
Author: aztio131
Project-URL: Homepage, https://pypi.org/project/skleam-code/
Project-URL: Documentation, https://github.com/Aztec-h/skleam#readme
Classifier: Programming Language :: Python :: 3
Classifier: Operating System :: OS Independent
Requires-Python: >=3.7
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy
Requires-Dist: scikit-learn
Dynamic: license-file

# skleam-code

A comprehensive, plug-and-play machine learning library offering algorithm implementations both **with** and **without** standard libraries (from scratch). It is designed to be highly educational, easy to use, and immediately functional.

## Installation

Install the package via pip:

```bash
pip install skleam-code
```

## Overview

The `skleam-code` library is structured into two main sub-modules:
- `with_lib`: Models built on top of standard libraries like `scikit-learn`.
- `no_lib`: Models built strictly from scratch using pure `numpy` mathematics.

Both categories contain the exact same lineup of 13 algorithms!

### Supported Algorithms:
- **Regression:** Linear Regression, Logistic Regression
- **Tree-Based:** Decision Tree, Random Forest, Bagging Random Forest
- **Boosting:** AdaBoost, XGBoost
- **SVM:** Linear SVM, Non-Linear SVM
- **Unsupervised / Dimensionality Reduction:** K-Means Clustering, PCA, SVD, LDA

---

## Quick Start & Usage

Every single model in `skleam-code` shares a uniform, plug-and-play API. You only need to know two methods to use any algorithm:
- `.fit(X, y)` or `.fit(X)` for unsupervised models.
- `.predict(X)` or `.transform(X)` for projection models.

### Example: Using Pre-built "From Scratch" Models (`no_lib`)

```python
from skleam.no_lib import DecisionTreeNoLib

# 1. Initialize the model
model = DecisionTreeNoLib(max_depth=5)

# 2. Automatically generate dummy data to test it out!
X, y = model.generate_data(n_samples=200, n_features=4, task='classification')

# 3. Fit and Predict
model.fit(X, y)
predictions = model.predict(X)
print("Predictions:", predictions[:10])
```

### Example: Using Standard Library Backed Models (`with_lib`)

```python
from skleam.with_lib import RandomForestWithLib

# Initialize the model (you can pass kwargs supported by the underlying sklearn model)
rf = RandomForestWithLib(n_estimators=100, max_depth=3)

# Generate dummy data
X, y = rf.generate_data(task='classification')

# Fit and Predict
rf.fit(X, y)
print("RF Predictions:", rf.predict(X)[:5])
```

---

## Generating Artificial Test Data

One of the best features of `skleam-code` is the built-in static method `generate_data()`, attached to every single model. If you don't have a dataset ready, the library will generate one specifically formatted for the task at hand.

Supported tasks include: `'classification'`, `'regression'`, `'clustering'`, and `'unsupervised'`.

```python
from skleam.no_lib import KMeansNoLib

# Generate clustering data instantly
X, y = KMeansNoLib.generate_data(n_samples=300, n_features=2, task='clustering')

kmeans = KMeansNoLib(K=3)
kmeans.fit(X)
print(kmeans.predict(X)[:10])
```

## Exploring the Architecture

You can quickly view all available algorithms directly in your terminal using the built-in index tool:

```python
from skleam import index
index.main()
```
