Skip to main content

This is a python module which is made for learning purpose.

Project description

PyStatsLearn

This is a python module which is made for education purpose. The aim is to implement machine learning algorithms and publish it. Currenlty this package has 2 functionalities

  1. Calculating mean by taking a dataframe as an input. (Mean Calculates is not done by using any library. The code is developed from scratch)
  2. Implemeted Gaussian Naive Bayes Classifier which is build upon numpy

Installation

pip install PyStatsLearn

Usage

import pandas as pd
from PyStatsLearn import Measure, GaussianNaiveBayesClassifier
from sklearn.model_selection import train_test_split

df = pd.read_excel('data.xlsx')

a = Measure(df)
print(a.mean('Insulin'))

b = GaussianNaiveBayesClassifier()

X = df.iloc[:, :-1]
y = df.iloc[:, -1]

X = X.to_numpy()
y = y.to_numpy()
X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=.25)

nb_classifier = GaussianNaiveBayesClassifier()

nb_classifier.train(X_train, y_train)

predictions = nb_classifier.predict(X_test)
print(predictions)

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

PyStatsLearn-0.0.1.tar.gz (3.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyStatsLearn-0.0.1-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file PyStatsLearn-0.0.1.tar.gz.

File metadata

  • Download URL: PyStatsLearn-0.0.1.tar.gz
  • Upload date:
  • Size: 3.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for PyStatsLearn-0.0.1.tar.gz
Algorithm Hash digest
SHA256 d50c66a1e609c48dd404e2c1e034044ebd2c9d6c7f8328e25f492b276d0f535c
MD5 9fb9a03fbef41bdda5ca32a710db096c
BLAKE2b-256 0b7ac009810baae77054dd3361def2263c1f0c9dde3de34f4a2833f330a8a3de

See more details on using hashes here.

File details

Details for the file PyStatsLearn-0.0.1-py3-none-any.whl.

File metadata

  • Download URL: PyStatsLearn-0.0.1-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.8.0 pkginfo/1.9.6 readme-renderer/34.0 requests/2.27.1 requests-toolbelt/1.0.0 urllib3/1.26.16 tqdm/4.64.1 importlib-metadata/4.8.3 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.5 CPython/3.6.8

File hashes

Hashes for PyStatsLearn-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 4128fd2ddb7bb426dfb4136389ed86ac4a5ad10edf1a2f6435c8ccdd5b45632a
MD5 c8d7740b1396d82a65bf9d6a02648fb6
BLAKE2b-256 505d8e7d6d682521acd61988c897075bff680f7e2bce5a7751848aab984f0dfa

See more details on using hashes here.

Supported by

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