Skip to main content

A powerful package for K-NN regression, data preprocessing, and analysis for Data Science

Project description

Patatas

https://pypi.org/project/patatas/

Patatas is a Python package that provides tools for preprocessing and modeling data using machine learning algorithms.

Installation

You can install Patatas using pip:

pip install patatas

Installation

Usage

Encoding categorical columns To encode all categorical (object) columns of a pandas DataFrame using Label Encoding, you can use the fritas() function:

from patatas import fritas
import pandas as pd

# Create a sample DataFrame with categorical columns
df = pd.DataFrame({'Color': ['Red', 'Green', 'Blue'], 'Size': ['Small', 'Medium', 'Large']})

# Encode categorical columns using Label Encoding
df_encoded = fritas(df)

# Show the encoded DataFrame
print(df_encoded)

Finding the best value of k for K-NN regression To find the best value of k (number of neighbors) for K-NN regression based on the mean squared error, you can use the bravas() function:

from patatas import bravas
import pandas as pd

# Load a sample dataset
df = pd.read_csv('my_dataset.csv')

# Find the best value of k for K-NN regression
best_k = bravas(df, 'target_column')
print(f'The best value of k is {best_k}')
Contributing
Contributions to Patata Poderosa are welcome! To contribute, please follow these steps:

Fork the repository and create a new branch for your feature or bug fix. Write tests for your changes. Implement your feature or bug fix. Run the tests and ensure they pass. Submit a pull request. License Patatas is released under the MIT License. See the LICENSE file for more details.

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

patatas-0.1.1.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

patatas-0.1.1-py3-none-any.whl (4.3 kB view details)

Uploaded Python 3

File details

Details for the file patatas-0.1.1.tar.gz.

File metadata

  • Download URL: patatas-0.1.1.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for patatas-0.1.1.tar.gz
Algorithm Hash digest
SHA256 846cb1627c5ff8416384a8a73097c291c1db1781f9fd9b776f3806fc0f9ace32
MD5 25816c8801193b82945b765e12c27eae
BLAKE2b-256 5c24135e546543c6b43b740d5812fbec717747b53799a29c8af287e49d392115

See more details on using hashes here.

File details

Details for the file patatas-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: patatas-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 4.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.13

File hashes

Hashes for patatas-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e75b7d00cf92d612560ce3c7049ddaf4aadd75f90fe5b458a6fca809292df298
MD5 b7b6292b2f4d8cf659251d8a7abd44ba
BLAKE2b-256 7b4bdd9939378b0cc5f8ed8eab08b27aab605870ad691dffe24e6c6815d18785

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