No project description provided
Project description
# DataScienceTools
This repository contains some modules I consider useful in Data Science tasks. Most of them are based on sklearn and require input data to be in pandas DataFrames or Series.
## Table of contents
1. [ Preprocessing ](#preprocessing) <br> 1.1 [ NumScaler ](#numscaler) <br> 1.2 [ Imputer ](#imputer) <br> 1.3 [ FeatureConverter ](#featureconverter) <br> 1.4 [ OneHotEncoder ](#onehotencoder) <br> 1.5 [ Bucketizer ](#bucketizer) <br>
2. [ Classifier ](#classifier) <br> 2.1 [ BestGuessClassifier ](#bestguessclassifier) <br> 2.2 [ BestGuessRegressor ](#bestguessregressor) <br>
<a name=”preprocessing”></a> ## 1. Preprocessing
These modules are meant to help with preprocessing tasks. They are built upon sklearn.base.Transformermixin and can be used in sklearn.Pipeline. Possible tasks are scaling, imputing …
<a name=”numscaler”></a> ### 1.1 NumScaler
NumScaler is a wrapper for scalers. Some scalers only take numerical input and can’t ignore non numerical data. NumScaler identifies numerical data and passes it to a Scaler (default=sklearn.preprocessing.StandardScaler).
<a name=”imputer”></a> ### 1.2 Imputer
Imputes missing values based on ‘sklearn.base.TransformerMixin’. Numerics values can be imputed by a given metric (default=np.mean) or by a constant value when passed in manual_values. Non numeric values can be imputed by the most frequent value or by a constant value when passed in manual_values.
<a name=”featureconverter”></a> ### 1.3 FeatureConverter
The FeatureConverter helps to integrate common preprocessing steps into sklearn pipelines. Supported preprocessing steps are replacing values, converting to str, int or float, dropping columns or adding flags. Steps will be performed in the following order: create flags, replace values, convert types, drop columns
<a name=”onehotencoder”></a> ### 1.4 OneHotEncoder
This module performs binary encoding on columns containing categorical data. It assumes that all non numeric columns contain categorical data. If categorical data is encoded in numeric columns, use dstools.preprocessing.FeatureConverter to convert these values first. The maximum number of encoded values can be given globally or fine tuned for every column. Values that exceed the maximum number of encoded values are aggregated in a REST class. Missing values can be either put in the REST class or be classified as distinct value. Categrocial columns with exactly two values (including missing values) can be encoded into one column to reduce dimensionality.
<a name=”bucketizer”></a> ### 1.5 Bucektizer
The Bucketizer puts numeric features into bins. The binned feature can either replace the original feature or can be created additionally. You can bin all numeric features, pass a list of the features to be binned or pass prefix of the features to be binned.
<a name=”classifier”></a> ## 2. Classifier
some text
<a name=”bestguessclassifier”></a> ### 2.1 BestGuessClassifier
The BestGuessClassifier creates a constant numeric best guess for a given metric, e.g. mean absolute squared error. This Classifier is for interval scaled numeric dependent variables. Use this classifier for binnend variables, otherwise use dstools.regressors.BestGuessRegressor.
<a name=”bestguessregressor”></a> ### 2.2 BestGuessRegressor
The BestGuessRegressor creates a constant best guess for a given metric, e.g. mean absolute squared error. This regressor is for interval scaled numeric dependent variables.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for DataScienceTools-0.1.dev0.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3842919aed41817ded7dac4f81104437448dea2366126ad6685d75a88fa8899 |
|
MD5 | a1d9725c817ee6626d24ef5820e9b495 |
|
BLAKE2b-256 | de6766612970271b1b09e5c290d297f683922a98b07f6b3c19ca565c962cd8ac |
Hashes for DataScienceTools-0.1.dev0-py3.7.egg
Algorithm | Hash digest | |
---|---|---|
SHA256 | 11f6319909c805d96f3833d035590d725f014e78239a7eb58489f8980df83acf |
|
MD5 | 0819c07fcebc944d575791315a407a18 |
|
BLAKE2b-256 | 2f344f00619af5b51b5cbbf0d92ba526c2c7941e8b4eb3657fcfa6ab8f2c2849 |
Hashes for DataScienceTools-0.1.dev0-py3-none-any.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3d421247f8a45a687ab7709a02f0ada7a6f2a8ed1169e34262ebb161248907d4 |
|
MD5 | 7a6ff8638a6d49e3332b00bc74730879 |
|
BLAKE2b-256 | b26699f9b8731401a0d12f5e9ef53b869c41ea6e4530b2b87bd59b91012931fd |