Skip to main content

A Python package for removing outliers in dataset using the Interquartile Range technique.

Project description

OUTLIER REMOVAL USING IQR METHOD

Author : Mehak Garg

What are outliers?

An outlier is an observation that lies an abnormal distance from other values in a random sample from a population. In a sense, this definition leaves it up to the analyst (or a consensus process) to decide what will be considered abnormal. Before abnormal observations can be singled out, it is necessary to characterize normal observations.

What is IQR method?

A robust method for labelling outliers is the IQR (interquartile range) method of outlier detection developed by John Tukey, the pioneer of exploratory data analysis. This was in the days of calculation and plotting by hand, so the datasets involved were typically small, and the emphasis was on understanding the story the data told. A box-and-whisker plot (also a Tukey contribution), shows this method in action.

A box-and-whisker plot uses quartiles (points that divide the data into four groups of equal size) to plot the shape of the data. The box represents the 1st and 3rd quartiles, which are equal to the 25th and 75th percentiles. The line inside the box represents the 2nd quartile, which is the median.

The interquartile range, which gives this method of outlier detection its name, is the range between the first and the third quartiles (the edges of the box). Tukey considered any data point that fell outside of either 1.5 times the IQR below the first – or 1.5 times the IQR above the third – quartile to be outside or far out. In a classic box-and-whisker plot, the 'whiskers' extend up to the last data point that is not outside.

How to use this package:

It take in the dataset csv file and outputs out a csv file in the rows having outlier values are removed. This package handles univariate datasets as well as multivariate. Each feature having outlier rows are removed.

Installation

The package can be installed using the following command in anaconda/command prompt.

pip install outlier-removal_3054

Usage

The package can be used for outlier removal by providing dataset.

remove-outlier <dataset>

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

outlier_removal3054-3.1.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

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

outlier_removal3054-3.1.2-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file outlier_removal3054-3.1.2.tar.gz.

File metadata

  • Download URL: outlier_removal3054-3.1.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for outlier_removal3054-3.1.2.tar.gz
Algorithm Hash digest
SHA256 32f105913d1b287e106a893a85703a200779ed7bcea2956d24b4a79a5c391506
MD5 5a69642f9ad76ee1d3ff56dfc9905d89
BLAKE2b-256 48c704ab5b3bf46300413ba9c168b0281840dd35946163633f1580e2f1c13690

See more details on using hashes here.

File details

Details for the file outlier_removal3054-3.1.2-py3-none-any.whl.

File metadata

  • Download URL: outlier_removal3054-3.1.2-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/41.2.0 requests-toolbelt/0.9.1 tqdm/4.43.0 CPython/3.7.7

File hashes

Hashes for outlier_removal3054-3.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 f7320e09085a380a7066c18434dd24cf0ad0678b739b8148015c3d207b98aaba
MD5 76d802f876c4ee5ff51ae5fde6ba3e57
BLAKE2b-256 360b9f5898de8863a6fab4146382c745f571b05ae5837022ee701cddadee78d9

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