Skip to main content

mbgdregressor

This is a small library that tries to run mini batch gradient desent on your linear regression dataset which is not primitively implemented in sklearn library.

Install

pip install Mbgdregressor==1.0

Usage

>>> import numpy as np
>>> import Mbgdregressor
>>> from sklearn.datasets import load_diabetes

>>> 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=2)
>>> batch = X_train.shape[0]//20
>>> model = Mbgdregressor(batch_size= batch,learning_rate=0.01,epochs=100)
>>> model.fit(X_train,y_train)
>>> y_pred = model.predict(X_test)

Performance

The provided graph presents a comparative analysis of the learning curve or descent trajectory for both stochastic gradient descent and mini-batch gradient descent. A noticeable observation from the graph is that the curve does not exhibit a completely random behavior, as observed in stochastic gradient descent method, nor does it appear to be perfectly linear as in batch gradient descent.

Stochiastic gd Mini Batch gd

Metadata

Release files for Mbgdregressor 1.1

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

Source distribution (sdist)

Source distribution for Mbgdregressor 1.1
File Size Uploaded
Mbgdregressor-1.1.tar.gz 14.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for Mbgdregressor 1.1
File Interpreter ABI Platform
Mbgdregressor-1.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.4 kB

Release files / Mbgdregressor-1.1.tar.gz

Download URL Mbgdregressor-1.1.tar.gz
Size 14.8 kB
Tags Source
SHA-256 checksum
How to use checksums
5ee39065e5bd71d2ac5d2be15765e46bfc96394d9b4cc96b40dc8d7e38cd7ffb
BLAKE2b-256 checksum
How to use checksums
9cd99eab7ffcf37b430c76a053ad22aa3ee48fda62ace15e9655a36259bd41e7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release files / Mbgdregressor-1.1-py3-none-any.whl

Download URL Mbgdregressor-1.1-py3-none-any.whl
Size 16.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
73e891ac7eab625694df435884cc943ca767708c4c040b18750b4b94582fc138
BLAKE2b-256 checksum
How to use checksums
a0a87eb66f242d906b61706f620c685691f1ee6705c361f5f4fc7de03611e9a9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.11.0

Release history Release notifications | RSS feed

This release

1.1 This release

2 release files

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