{"id":15288166,"url":"https://github.com/tgsmith61591/skoot","last_synced_at":"2025-09-11T16:46:50.710Z","repository":{"id":49686606,"uuid":"127207413","full_name":"tgsmith61591/skoot","owner":"tgsmith61591","description":"A package for data science practitioners. This library implements a number of helpful, common data transformations with a scikit-learn friendly interface in an effort to expedite the modeling process.","archived":false,"fork":false,"pushed_at":"2021-06-10T21:44:12.000Z","size":10917,"stargazers_count":57,"open_issues_count":7,"forks_count":11,"subscribers_count":4,"default_branch":"master","last_synced_at":"2025-03-26T23:04:22.896Z","etag":null,"topics":["data-science","imbalanced-data","machine-learning","pandas","python","scikit-learn","skutil"],"latest_commit_sha":null,"homepage":"https://alkaline-ml.com/skoot","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/tgsmith61591.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-03-28T22:48:40.000Z","updated_at":"2025-02-08T19:30:31.000Z","dependencies_parsed_at":"2022-09-19T09:30:51.495Z","dependency_job_id":null,"html_url":"https://github.com/tgsmith61591/skoot","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgsmith61591%2Fskoot","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgsmith61591%2Fskoot/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgsmith61591%2Fskoot/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/tgsmith61591%2Fskoot/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/tgsmith61591","download_url":"https://codeload.github.com/tgsmith61591/skoot/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248617901,"owners_count":21134197,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["data-science","imbalanced-data","machine-learning","pandas","python","scikit-learn","skutil"],"created_at":"2024-09-30T15:44:31.166Z","updated_at":"2025-04-13T06:30:53.641Z","avatar_url":"https://github.com/tgsmith61591.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![codecov](https://codecov.io/gh/tgsmith61591/skoot/branch/master/graph/badge.svg)](https://codecov.io/gh/tgsmith61591/skoot)\n![Supported versions](https://img.shields.io/badge/python-3.5-blue.svg)\n![Supported versions](https://img.shields.io/badge/python-3.6-blue.svg)\n![Supported versions](https://img.shields.io/badge/python-3.7-blue.svg)\n[![CircleCI](https://circleci.com/gh/tgsmith61591/skoot.svg?style=svg)](https://circleci.com/gh/tgsmith61591/skoot)\n[![Build Status](https://dev.azure.com/tgsmith61591gh/skoot/_apis/build/status/tgsmith61591.skoot?branchName=master)](https://dev.azure.com/tgsmith61591gh/skoot/_build/latest?definitionId=1\u0026branchName=master)\n\n# skoot\n\nSkoot is a lightweight python library of machine learning transformer classes \nthat interact with [scikit-learn](https://github.com/scikit-learn/scikit-learn)\nand [pandas](https://github.com/pandas-dev/pandas). \nIts objective is to expedite data munging and pre-processing tasks that can\ntend to take up so much of data science practitioners' time. See \n[the documentation](https://tgsmith61591.github.io/skoot) for more info.\n\n__Note that skoot is the preferred \nalternative to the now deprecated [skutil](https://github.com/tgsmith61591/skutil) \nlibrary__\n\n## Two minutes to model-readiness\n\nReal world data is nasty. Most data scientists spend the majority of their time\ntackling data cleansing tasks. With skoot, we can automate away so much of the\nbespoke hacking solutions that consume data scientists' time. \n\nIn this example, we'll examine a common dataset (the \n[adult dataset](https://archive.ics.uci.edu/ml/datasets/Adult) from the UCI \nmachine learning repo) that requires significant pre-processing.\n\n```python\nfrom skoot.datasets import load_adult_df\nfrom skoot.feature_selection import FeatureFilter\nfrom skoot.decomposition import SelectivePCA\nfrom skoot.preprocessing import DummyEncoder\nfrom skoot.utils.dataframe import get_numeric_columns\nfrom skoot.utils.dataframe import get_categorical_columns\nfrom sklearn.model_selection import train_test_split\nfrom sklearn.pipeline import Pipeline\nfrom sklearn.ensemble import RandomForestClassifier\nfrom sklearn.metrics import accuracy_score\n\n# load the dataset with the skoot-native loader \u0026 split it\nadult = load_adult_df(tgt_name=\"target\")\ny = adult.pop(\"target\")\nX_train, X_test, y_train, y_test = train_test_split(\n    adult, y, random_state=42, test_size=0.2)\n    \n# get numeric and categorical feature names\nnum_cols = get_numeric_columns(X_train).columns\nobj_cols = get_categorical_columns(X_train).columns\n\n# remove the education-num from the num_cols since we're going to remove it\nnum_cols = num_cols[~(num_cols == \"education-num\")]\n    \n# build a pipeline\npipe = Pipeline([\n    # drop out the ordinal level that's otherwise equal to \"education\"\n    (\"dropper\", FeatureFilter(cols=[\"education-num\"])),\n    \n    # decompose the numeric features with PCA\n    (\"pca\", SelectivePCA(cols=num_cols)),\n    \n    # dummy encode the categorical features\n    (\"dummy\", DummyEncoder(cols=obj_cols, handle_unknown=\"ignore\")),\n    \n    # and a simple classifier class\n    (\"clf\", RandomForestClassifier(n_estimators=100, random_state=42))\n])\n\npipe.fit(X_train, y_train)\n\n# produce predictions\npreds = pipe.predict(X_test)\nprint(\"Test accuracy: %.3f\" % accuracy_score(y_test, preds))\n```\n\nFor more tutorials, check out [the documentation](https://tgsmith61591.github.io/skoot).","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgsmith61591%2Fskoot","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftgsmith61591%2Fskoot","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftgsmith61591%2Fskoot/lists"}