Skip to main content

DAtaset siZe Effect estimatoR

Project description

DAZER (DAtaset siZe Effect estimatoR)

Class Subsampler with examples

import dazer

subsampler = dazer.Subsampler(df, dataset.keep_ratio, .2)

df_test = subsampler.extract_test()

df_test = subsampler.extract_test(subsample_factor=.2, random_state=101)

df_train_1 = subsampler.subsample(subsample_factor=.1, random_state=101)
df_train_2 = subsampler.subsample(subsample_factor=.2, random_state=101)
df_train_3 = subsampler.subsample(subsample_factor=.3, random_state=101)

Class Classifier with examples

import dazer

y_test = df_test[target_column] == target_value
X_test = df_test.drop([target_column], axis=1)

y_train = df_train_1[target_column] == target_value
X_train = df_train_1.drop([target_column], axis=1)

classifier = dazer.Classifier(X_train, y_train, X_test, y_test)
model, evaluation = classifier.train_test_random_forest(random_state=101, model_path='models/model_1.joblib', scoring='f1')

Run unittests

python3 -m unittest discover tests

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

dazer-0.1.15.tar.gz (6.9 kB view hashes)

Uploaded Source

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