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:
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’)
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 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
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0ce18d008186dfc214abae13817855ec6e8b8800a9e11ff616e9c97ba85fb2b5 |
|
MD5 | b85139824e6aec92a9254d1f21e11229 |
|
BLAKE2b-256 | 81e5eeec934e5a3b34e26a8cd7a86286c454d5f43435c57cdd9d212e9911ca28 |
File details
Details for the file outliers_filtering-0.1.0-py3-none-any.whl
.
File metadata
- Download URL: outliers_filtering-0.1.0-py3-none-any.whl
- Upload date:
- Size: 4.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.0 CPython/3.9.12
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2c65b53685bfc2fdd50a69c54b9c6f9e91b9993722a1992cdcabd563dab44e0 |
|
MD5 | 513bb41b5316e621f453e1dbe32b4570 |
|
BLAKE2b-256 | 5f8260753f8806420fed908b49e0384d22e464d6e767226e48286fe2b5ba4bfd |