Skip to main content

A collection of utility functions designed to simplify training machine learning models for Kaggle competitions.

Project description

Kaggle Toolbox

Koolbox is a collection of helper functions and utilities designed to simplify training machine learning models in Kaggle competitions. This library abstracts away repetitive boilerplate code, allowing competitors to focus on more important tasks.

Installation

pip install koolbox

Usage

Trainer

import pandas as pd
from sklearn.model_selection import KFold
from sklearn.ensemble import RandomForestClassifier
from sklearn.metrics import roc_auc_score

from koolbox import Trainer

X = pd.DataFrame(...)
y = pd.Series(...)

trainer = Trainer(
    estimator=RandomForestClassifier(random_state=42),
    cv=KFold(n_splits=5, shuffle=True, random_state=42),
    metric=roc_auc_score,
    task="binary",
    verbose=True
)

trainer.fit(X, y)

X_test = pd.DataFrame(...)
preds = trainer.predict(X_test)

oof_preds = trainer.oof_preds
overall_score = trainer.overall_score
fold_scores = trainer.fold_scores

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

koolbox-0.1.1.tar.gz (9.7 kB view details)

Uploaded Source

Built Distribution

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

koolbox-0.1.1-py3-none-any.whl (10.8 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: koolbox-0.1.1.tar.gz
  • Upload date:
  • Size: 9.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for koolbox-0.1.1.tar.gz
Algorithm Hash digest
SHA256 7c8d90194be88f56b46a8a7e1905fa65ec5c31f89d81f27aa81b1d2f5e978e87
MD5 a9234ec0b492786c23a9dd014d130b37
BLAKE2b-256 02454a8fae93f37e89323bc082468503a6840e4a5cbf805c85487eea31ebfbbd

See more details on using hashes here.

Provenance

The following attestation bundles were made for koolbox-0.1.1.tar.gz:

Publisher: publish.yml on ravaghi/koolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

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

File metadata

  • Download URL: koolbox-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for koolbox-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 e16f99918ffb0d1816bf83b3362c661eb9b88c7e37153456183e947a25182922
MD5 b7374c3d56a1aefc4dcff7eb9725ce46
BLAKE2b-256 7ef180425ee307f3ad3524a80045de0a18f6902a3b33ed0611b3246a3467e616

See more details on using hashes here.

Provenance

The following attestation bundles were made for koolbox-0.1.1-py3-none-any.whl:

Publisher: publish.yml on ravaghi/koolbox

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

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