Skip to main content


nona: Python gap filling toolkit

What is it?

nona a simple toolkit for filling gaps in a dataset. Filling in the gap using artificial intelligence methods.

We go through all the columns. We find a column with gaps and split the dataset into a train, this is the part in which we know all the values ​​​​and the test, where there is no missing value in the column and predict using any machine learning method that supports a simple implementation of fit and predict.

Main Features

Here are just a few of the things that nona does well:

  • Easy and fast filling of missing values.
  • Using Machine Learning Methods
  • Support for machine learning methods with the base implementation of fit and predict
  • High Prediction Accuracy of Missing Values

Where to get it

The source code is currently hosted on GitHub at: GitHub - AbdualimovTP/nona: library for filling in missing values ​​using artificial intelligence methods Binary installers for the latest released version are available at the Python Package Index (PyPI)

# PyPI
pip install nona

Dependencies

Quick start

Out of the box, use ridge regression to fill in the gaps with the regression problem, and RandomForestClassifier for the classification problem in columns with missing values.

# load library
from nona.nona import nona


# prepare your data with na to ML
# only numerical values ​​in the dataset


# fill the missing values
nona(YOUR_DATA)

Accuracy improvement

You can insert other machine learning methods into the function. They should support a simple implementation of fit and predict.

Parameters:

  • data: prepared dataset

  • algreg: Regression algorithm to predict missing values ​​in columns

  • algclss: Classification algorithm to predict missing values ​​in columns

# load library
from nona.nona import nona


# prepare your data with na to ML
# only numerical values ​​in the dataset


# fill the missing values
nona(data=YOUR_DATA, algreg=make_pipeline(StandardScaler(with_mean=False), Ridge(alpha=0.1)), algclass=RandomForestClassifier(max_depth=2, random_state=0))

Comparison of accuracy with other gap filling methods

Framingham heart study dataset | Kaggle

Results of RMSE techniques for filling gaps depending on the percentage of missing values ​​in the dataset.

10% 20% 30% 40% 50% 70% 90%
Baseline_MEAN 2.67 3.8 4.7 5.66 6.4 7.4 8.43
KNN 2.48 3.7 4.57 5.55 6.35 7.47 8.49
MICE 2.12 3.17 4.59 5.41 5.94 7.33 8.61
MISSFOREST 2.26 3.36 4.31 5.33 6.15 8.06 9.85
NONA 2.24 3.35 4.28 5.16 5.83 7.12 8.43

Metadata

Release files for nona 0.0.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for nona 0.0.1
File Size Uploaded
nona-0.0.1.tar.gz 7.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for nona 0.0.1
File Interpreter ABI Platform
nona-0.0.1-py3-none-any.whl Python 3 none any Details

Total release size: 15.9 kB

Release files / nona-0.0.1.tar.gz

Download URL nona-0.0.1.tar.gz
Size 7.8 kB
Tags Source
SHA-256 checksum
How to use checksums
8f89adfcc0730f1d62aebaf7004709e432cea0447c1b375b1b1cd61b3f1d049c
BLAKE2b-256 checksum
How to use checksums
8aa3e47d28eaddef9c67c60772080b237d24d74919c6ca96663a74493c38d427
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release files / nona-0.0.1-py3-none-any.whl

Download URL nona-0.0.1-py3-none-any.whl
Size 8.2 kB
Tags Python 3
SHA-256 checksum
How to use checksums
a9976f9f01374c87cf28ced93cc6d2a48a9642b3376ee00566cdf3f745bf3c1e
BLAKE2b-256 checksum
How to use checksums
0f04dda83cc8d9b49150281f4d5faddbbc216455283f74936a1d8df836b5ccb7
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.10.8

Release history Release notifications | RSS feed

0.0.2

2 release files

This release

0.0.1 This release

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page