mlkit-learn: lightweight machine learning algorithms for learning.
Project description
mlkit-learn
mlkit-learn is a lightweight machine learning library designed to be interactive, easy-to-understand, and educational. It implements all of the classic machine learning algorithms from regression to gradient boosting trees. With only two lines of code, users can witness popular Kaggle datasets being preprocessed and predicted in action.
Contents
Multivariate Linear Regression
Install
pip install mklearn
Demo
Nearest Neighbor
Demo
- download train.csv and put in the directory of your choosing.
- run the following code.
from mklearn import knn
knn.demo(5) # demo(k [the number of nearest neighbour], dir [default: current directory], row [default: first 5000 rows]
Use
KNN Classifier
model = KNNClassifier(k)
model.fit(train_x, train_y)
size = test_x.shape[0]
predictions = []
for i in range(size):
result = classifier.predict(test_x[i])
predictions.append(result)
KNN Regressor
model = KNNRegressor(k)
model.fit(train_x, train_y)
size = test_x.shape[0]
predictions = []
for i in range(size):
result = classifier.predict(test_x[i])
predictions.append(result)
Multivariate Linear Regression
Demo
- download kc_house_data.csv and put in the directory of your choosing.
Naive Bayes
Decision Tree
Logistic Regression
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
mklearn-0.0.5.tar.gz
(3.3 kB
view hashes)