Skip to main content

Logistic Regression Python Library

Project description

py4logistic_regression

Logistic Regression Python Library

Getting Started

This project is simply implementation of logistic regression algorithm in python programming language.

Prerequisites

Numpy

Installing

The easiest way to install py4logistic_regression is using pip

pip install py4logistic_regression

Usage

There is 2 public method of Logistic Regression class. It is learn and predict method, learn method takes 5 argument namely x_train, t_train, alpha, and epoch. It is the training data, it's label, learning rate, and number of iteration respectively. predict method takes 1 argument namely x_test. It is the data to be predicted

from py4logistic_regression.regression import logistic_regression
x_train=[[0,0],[0,1],[1,0],[1,1]]
t_train=[0,0,0,1]
classifier=logistic_regression()
classifier.learn(x_train,t_train,0.1,50)
x_test=[[0.02,0.25],[0.97,0.89]]
y=classifier.predict(x_test)

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

py4logistic_regression-0.0.2.tar.gz (2.3 kB view details)

Uploaded Source

Built Distribution

py4logistic_regression-0.0.2-py3-none-any.whl (2.8 kB view details)

Uploaded Python 3

File details

Details for the file py4logistic_regression-0.0.2.tar.gz.

File metadata

  • Download URL: py4logistic_regression-0.0.2.tar.gz
  • Upload date:
  • Size: 2.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1

File hashes

Hashes for py4logistic_regression-0.0.2.tar.gz
Algorithm Hash digest
SHA256 beaf94824307ff8b947e608938c95be6936f3bba3f1e5d695d7546d27727aa26
MD5 cbbf3348b6a6c4199c2bbd8ca990970c
BLAKE2b-256 b6f65d53060b170c527fe13c21a3f53abda4228a6877958ef03bb8eb3fe9e7dc

See more details on using hashes here.

File details

Details for the file py4logistic_regression-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: py4logistic_regression-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 2.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.1

File hashes

Hashes for py4logistic_regression-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 476b478b3070021b428150ba3de65a3a43eca3195a3e8074764ddcf23143663e
MD5 b83908e41c9636058dbdc6dd1ed89734
BLAKE2b-256 59fa897a77788b576f0c04769c097f340407acf8d9ce836077fa2ef8103db4ea

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page