A Machine Learning Brain Stroke Classfier.
Project description
BrainStrokeClassifier API
Functionality of the BrainStrokeClassifier
The package includes a trained Machine Learning model to predict Brain Stroke vulnerability. The model can be accessed as BStClassifier utility. You can use BStClassifier.predict(X) to make predictions. Where X is the input consisting of 7 characteristics:
- Gender ("Male", "Female", "Other")
- Age
- Do you have hypertension (Yes/NO)
- Do you have any heart disease (Yes/NO)
- What type of work you do? ("Private job", "Self Employed", "Govt. Job", "Never Worked", "You are a Child")
- Your average blood glucose level
- Your Body Mass Index (BMI)
It classifies whether you are vulnerable to or had brain stroke, or not.
Input type
The input can be:
- NumPy array a. 1D array of shape (7,) b. 2D array of shape (S,7); where S is number of samples
- Pandas Series of shape (7,)
- Pandas DataFrame of shape (S,7); where S is number of columns
About the Machine Learning model
The Machine Learning model is a Pipeline of Strandard Scaler and XGBoost Classifier. You can check the notebook where the model is trained through the github
Package Installation
Make sure you have Python installed in your system. Run Following command in the command window.
!pip install BrainStrokeClassifier
Example Code
# test.py
# Package installation
!pip install BrainStrokeClassifier
# Loading package
from BrainStrokeClassifier import BStClassifier
import numpy as np
import pandas as pd
# Creating some test input
x = np.array([[0,67,0,1,0,228.69,36.6],
[0,58,1,0,0,87.96,39.2]])
df = pd.DataFrame(x)
prediction = BStClassifier(df)
print(prediction)
For Suggestions
If you have any suggestions or improvements, please fork the package on github
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file BrainStrokeClassifier-0.1.8.tar.gz
.
File metadata
- Download URL: BrainStrokeClassifier-0.1.8.tar.gz
- Upload date:
- Size: 114.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39fa62e3f0e90c6817399c3c853fd2b5b2205ca8f5a02ea8e4c221a4243af7f1 |
|
MD5 | e23d676673c4978bc8d6419b80b0140a |
|
BLAKE2b-256 | 6618ba150c7e113dab8c255ae94f70d502c541c16f5ab453781babdbc2b9b76b |
File details
Details for the file BrainStrokeClassifier-0.1.8-py3-none-any.whl
.
File metadata
- Download URL: BrainStrokeClassifier-0.1.8-py3-none-any.whl
- Upload date:
- Size: 118.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.2 CPython/3.9.13
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3267368261a13dedeaceff254f39812f68ce66ad587a855ccab6208dc4bd47ed |
|
MD5 | db3e2839bfb4ad33efc51ef575ee5a12 |
|
BLAKE2b-256 | 7edb220e81163607a2c89e18275f202a928894bf498232c3d357943bac5b308f |