outlier-python
Package Description :
Python package for Outlier Removal Algorithm using z_score or iqr.
Motivation :
This is a part of project - II made for UCS633 - Data analytics and visualization at TIET.
@Author : Sourav Kumar
@Roll no. : 101883068
Algorithm :
-
Z-SCORE : If the population mean and population standard deviation are known, the standard score of a raw score x is calculated as:
z = (x - mean) / std.
mean : is the mean of the sample.
std : is the standard deviation of the sample. -
Interquartile range : interquartile range (IQR), also called the midspread, middle 50%, or H‑spread, is a measure of statistical dispersion, being equal to the difference between 75th and 25th percentiles, or between upper and lower quartiles.
IQR = Q3 − Q1
The IQR of a set of values is calculated as the difference between the upper and lower quartiles, Q3 and Q1. Each quartile is a median calculated as follows :
Given an even 2n or odd 2n+1 number of values.
first quartile Q1 = median of the n smallest values
third quartile Q3 = median of the n largest values
The second quartile Q2 is the same as the ordinary median.
Getting started Locally :
Run On Terminal
python -m outlier.outlier inputFilePath outputFilePath z_score
orpython -m outlier.outlier inputFilePath outputFilePath iqr
ex. python -m outlier outlier C:/Users/DELL/Desktop/train.csv C:/Users/DELL/Desktop/output.csv z_score
Run In IDLE
from outlier import outlier
o = outlier.outlier(inputFilePath, outputFilePath)
o.outlier_main('z_score')or
o.outlier_main('iqr')
Run on Jupyter
Open terminal (cmd)
jupyter notebook
Create a new python3 file.
from outlier import outlier
o = outlier.outlier(inputFilePath, outputFilePath)o.outlier_main('z_score')or
o.outlier_main('iqr')
- NOTE :
outlier_main()doesn't necessarily require anymethodargument , if no argument is provided, it usesz_scoreby default as the algorithm for removal of outliers from the dataset. - The algorithm only reports missing data containing columns and not handles them, it assumes that it has been handled already.
Also in case of z-score method, it will not affect much, but it may be possible to give wrong output in case of IQR if missing values are found.
OUTPUT :
Removes all the valid rows contaning outlier values from the dataset and prints the number of rows removed along with the columns which were considered for the algorithm.
Also , the final dataframe will be written to the output file path you provided.
TESTING :
- The package has been extensively tested on various datasets consisting varied types of expected and unexpected input data and any preprocessing , if required has been taken care of.
Metadata
Release files for outlier-python-souravdlboy 1.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| outlier-python-souravdlboy-1.1.tar.gz | 4.6 kB | Without provenance | Details for outlier-python-souravdlboy-1.1.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| outlier_python_souravdlboy-1.1-py3-none-any.whl | Python 3 | none | any | Details for outlier_python_souravdlboy-1.1-py3-none-any.whl |
Total release size: 10.5 kB
Release files / outlier-python-souravdlboy-1.1.tar.gz
| Download URL | outlier-python-souravdlboy-1.1.tar.gz |
|---|---|
| Size | 4.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
ab3a5fa52bb48f9c936d57a3cac212e22ea5e65caee72f96510d3cd6eafc061f
|
|
BLAKE2b-256 checksum How to use checksums |
dfcfbac5a2718e32137d5d213318cedf683a50af1c8a16ef3bff3ae62d5b4428
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0b5
|
Release files / outlier_python_souravdlboy-1.1-py3-none-any.whl
| Download URL | outlier_python_souravdlboy-1.1-py3-none-any.whl |
|---|---|
| Size | 5.9 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
2ee9fd624017771e74e9e09c3d0170753bd1ade650b459d46980f8ef51f7e11d
|
|
BLAKE2b-256 checksum How to use checksums |
a2a26e0e60434e2c19a7fe4d79705d71c397192c4de59d809c6707f57444d277
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.41.1 CPython/3.7.0b5
|
Security for outlier-python-souravdlboy 1.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.