Skip to main content

outliers_filtering package for Python-Guide.org

Project description

  • pip install outliers_filtering

  • from outliers_filtering.utils import remove_outliers_numeric, plot_distribution_numeric

Two functions:

remove_outliers_numeric plot_distribution_numeric

Let’s see how to use the functions.

First the function remove_coutliers_numeric, it applies an IQR outliers filtering to normal or lognormal numerical pandas columns.

remove_coutliers_numeric(df,feature,option = “lognormal”,delta=1.5)

  • df: is the pandas dataframe where to apply the outlier removal

  • feature: name of the column to apply the function

  • option: shape of the distribution, either “normal” or “lognormal”

  • delta: coefficient to remove outliers outside IQR. default value is 1.5, the higher it is the less outliers you remove.

Example:

https://github.com/vincent-belz/outliers_filtering/blob/master/img/example_remove_outliers.png

Second the function plot_distribution_numeric, it can plot distribution with and without outliers.

plot_distribution_numeric(df, feature, option = ‘lognormal’,title = ‘distribution’, mode = ‘with_outliers’)

  • df: is the pandas dataframe where to apply the function

  • feature: name of the column to plot the distribution

  • option: shape of the distribution, either “normal” or “lognormal”

  • title: Title of the plot

  • mode: Two possible modes “with_outliers” to plot the raw distribution and “without_outliers” to plot distribution without outliers

Example:

  • plot_distribution_numeric(data,’useful_area’, option = ‘lognormal’,title = ‘distribution useful_area’, mode=’with_outliers’)

  • plot_distribution_numeric(data, ‘useful_area’, option = ‘lognormal’, title = ‘distribution useful_area without extreme values’, mode=’without_outliers’)

https://github.com/vincent-belz/outliers_filtering/blob/master/img/plot_distributions.png

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

outliers_filtering-0.1.0.tar.gz (3.5 kB view details)

Uploaded Source

Built Distribution

outliers_filtering-0.1.0-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file outliers_filtering-0.1.0.tar.gz.

File metadata

  • Download URL: outliers_filtering-0.1.0.tar.gz
  • Upload date:
  • Size: 3.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for outliers_filtering-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0ce18d008186dfc214abae13817855ec6e8b8800a9e11ff616e9c97ba85fb2b5
MD5 b85139824e6aec92a9254d1f21e11229
BLAKE2b-256 81e5eeec934e5a3b34e26a8cd7a86286c454d5f43435c57cdd9d212e9911ca28

See more details on using hashes here.

File details

Details for the file outliers_filtering-0.1.0-py3-none-any.whl.

File metadata

File hashes

Hashes for outliers_filtering-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 f2c65b53685bfc2fdd50a69c54b9c6f9e91b9993722a1992cdcabd563dab44e0
MD5 513bb41b5316e621f453e1dbe32b4570
BLAKE2b-256 5f8260753f8806420fed908b49e0384d22e464d6e767226e48286fe2b5ba4bfd

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