Skip to main content

Automatic Outliers Handler Library

Project description

AnLOF

AnLOF is a machine learning utility library build to automatically handle outliers Effectively.

AnLOF uses multiple outliers handling tools and helps you automatically select the best-performing method.

The Ooutliers Handling Tools Used are:

  • IQR Score
  • Z-score
  • Winsorization
  • Median Scoring
  • Mean Scoring
  • Isolation Forest
  • Boxcox Transformation
  • k-Nearest Neighbors
  • XGBRegression
  • LGBMRegresion
  • CatBoostRegression
  • Standard Scaler
  • Robust Scaler
  • MinMax Scaler
  • Log Transformation
  • Quantile Normalization

Features

  • Automatic outlier detection & handling
  • Multiple preprocessing strategies
  • Model-based evaluation
  • Selects best method based on chosen metric
  • Get your dataset Ready with the best methods applied


Hyperparameters

  • X_train : Your training features set
  • X_val : Your validation features set
  • y_train : your training target set
  • t_val : your validation target set
  • features : Features that contains outliers. [Note : Not all the feautures of your dataset]
  • base_model : The model based on which you want to evaluate the tools performance and select the best one
  • metric : The evaluation metric you use
  • higher_is_better : "YES" for metrics where hihger is better for example accuracy_score or f1_score "NO" otherwise.

Author

This Project is developed and managed by MurtazaA2010. For any help email him at: murtazaabdullah989@gmail.com

Installation

pip install AnLOF


```python
from AnLOF.AnLOF_module import AnLOF
from sklearn.linear_model import LinearRegression
from sklearn.metrics import mean_squared_error

anlof = AnLOF(
    X_train,
    X_val,
    y_train,
    y_val,
    features=["feature1", "feature2"],  # features containing outliers
    base_model=LinearRegression,
    metric=mean_squared_error,
    higher_is_better=False
)

best_X_train, best_X_val, best_method, performance_df = anlof.forward()

## best_method : the method with the best score
## performace_df: contains the performance of all the methods 

print("Best method:", best_method)
print("Best X_train:")
print(best_X_train.head())

print("Best X_val:")
print(best_X_val.head())

print("Performance comparison:")
print(performance_df)

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

anlof-1.0.0.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

anlof-1.0.0-py3-none-any.whl (5.1 kB view details)

Uploaded Python 3

File details

Details for the file anlof-1.0.0.tar.gz.

File metadata

  • Download URL: anlof-1.0.0.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for anlof-1.0.0.tar.gz
Algorithm Hash digest
SHA256 6bd536c6b21e47d3788a9cd991d7c747bfa97877471cc68fa361103180d32d39
MD5 0ff0fb596e0961ceffe4d3cd721a8f9b
BLAKE2b-256 edfd6033a1afa2edffebf4ec26e303da03fcb34098583d98b30c5a0e124fa36e

See more details on using hashes here.

File details

Details for the file anlof-1.0.0-py3-none-any.whl.

File metadata

  • Download URL: anlof-1.0.0-py3-none-any.whl
  • Upload date:
  • Size: 5.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.14.3

File hashes

Hashes for anlof-1.0.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4546dd2451afbec7b102d64ce1be224337bc655bf987c2ef2be70447de11e6fc
MD5 529afa166ddaef867ba8834c045ec3bd
BLAKE2b-256 a41488418443856efac3f70a4efc77d7854ffe01673a4cd2b36da353ecfec8d8

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