git
Project description
tisthemachinelearner
Lightweight interface to scikit-learn with 2 classes, Classifier and Regressor.
Installing (for Python and R)
Python
- 1st method: by using
pipat the command line for the stable version
pip install tisthemachinelearner
- 2nd method: from Github, for the development version
pip install git+https://github.com/Techtonique/tisthemachinelearner.git
or
git clone https://github.com/Techtonique/tisthemachinelearner.git
cd tisthemachinelearner
make install
Examples
import numpy as np
from sklearn.datasets import load_diabetes, load_breast_cancer
from sklearn.model_selection import train_test_split
from tisthemachinelearner import Classifier, Regressor
# Classification
X, y = load_breast_cancer(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
clf = Classifier("LogisticRegression", random_state=42)
clf.fit(X_train, y_train)
print(clf.predict(X_test))
print(clf.score(X_test, y_test))
clf = Classifier("RandomForestClassifier", n_estimators=100, random_state=42)
clf.fit(X_train, y_train)
print(clf.predict(X_test))
print(clf.score(X_test, y_test))
# Regression
X, y = load_diabetes(return_X_y=True)
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
reg = Regressor("LinearRegression")
reg.fit(X_train, y_train)
print(reg.predict(X_test))
print(np.sqrt(np.mean((reg.predict(X_test) - y_test) ** 2)))
reg = Regressor("RidgeCV", alphas=[0.01, 0.1, 1, 10])
reg.fit(X_train, y_train)
print(reg.predict(X_test))
print(np.sqrt(np.mean((reg.predict(X_test) - y_test) ** 2)))
License
BSD 3-Clause © T. Moudiki, 2025.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file tisthemachinelearner-0.1.0.tar.gz.
File metadata
- Download URL: tisthemachinelearner-0.1.0.tar.gz
- Upload date:
- Size: 35.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e0ed5ea5e4558f60ef42d648b22ab362799f2ffee9e7dc46dff1c2413642ebaf
|
|
| MD5 |
3da64500c134e00f0a96342e4a935331
|
|
| BLAKE2b-256 |
efd88fd02d7f46cdf55bf320916fe142ca63251f3131a8d0809eea6d6ac51dc1
|
File details
Details for the file tisthemachinelearner-0.1.0-py3-none-any.whl.
File metadata
- Download URL: tisthemachinelearner-0.1.0-py3-none-any.whl
- Upload date:
- Size: 5.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.0.1 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe9c9ee70d7c40592b5f213709d56977179bf2e39eb788ba7ee4e7601dd4dd52
|
|
| MD5 |
dfeb4fe5f0409841cce7e42bd5ad7caf
|
|
| BLAKE2b-256 |
48805e5f3c5f184e871b036b193bd0fb82e5b4274636251fbd88e668ea0bd453
|