Skip to main content

This is a Python ML librabry like scikit-learn

You can create your ML model or use some ML algorithms on your project

Example: Logistic Regression

Read csv file and slip data into training and test data

import pandas as pd
df = pd.read_csv('Data_for_UCI_named.csv', header=0)
df['stabf'] = df['stabf'].map({'unstable': 0, 'stable': 1})
Y = df['stabf'].values
# sometimes it's needed to reshape data
X = df.drop(['stabf'], axis=1).values

X_train = X[:9000]
Y_train = Y[:9000]
X_test = X[9000:]
Y_test = Y[9000:]

Let’s use our library

# call the LogisticRegression class
from nista_learn.regressions import LinearRegression, LogisticRegression

log_reg = LogisticRegression()
# fitting data
log_reg.fit(X_train, Y_train, iterations=200000, learning_rate=0.25, show=True)
# predict a small dataset
y_pred = log_reg.predict(X_test[20:28])
print('--- small value ---')
print(Y_test[20:28])
print('--- predicted data ---')
print(y_pred)
# plotting the cost function
log_reg.plot_cost()

Release files for nista_learn 0.0.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nista_learn 0.0.4
File Size Uploaded
nista_learn-0.0.4.tar.gz 2.9 kB Details

Release files / nista_learn-0.0.4.tar.gz

Download URL nista_learn-0.0.4.tar.gz
Size 2.9 kB
Tags Source
SHA-256 checksum
How to use checksums
2b213748deab6e044773bbe9cb8b9c9605504c2f0756c1f42131ae8f4c67a729
BLAKE2b-256 checksum
How to use checksums
c30fa1bb304374cf276f3e1b59118ca4d468956aa660420bd1a94f5d2e138e38
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via Python-urllib/3.6

Release history Release notifications | RSS feed

This release

0.0.4 This release

1 release file

0.0.3

1 release file

0.0.2

2 release files

0.0.1

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page