Skip to main content

Package containing functions to run Group 4's Data Analysis

Project description

group4package

A package for running Group 4's data analysis

Installation

Note: This package requires python version 3.9.1 or greater

$ pip install group4package

Usage

The following functions in this package were created for Group 4's Project Predicting Defaults of Credit Card Clients. However, they are useful for any data analysis that involves pre-processing data and calculating classification metrics and statistics.

calculate_metrics(FP, TN, TP)

  • calulates Recall, F1-Score and Precision for a classification model

Example:

from group4package import metrics_function as cm
TN, FP, FN, TP = confusion_matrix(y_test, predict).ravel()
res = cm.calculate_metrics(FP, FN, TP)

get_summary_stats(df)

  • calculates summary statistics including mean, std, min, and max of numeric columns of a dataframe

Example:

from group4package import summary_stats_function as ss
ss.get_summary_stats(train_df)

count_plot(df, x, name)

  • creates a plot of the counts between x and y values of the given dataframe, while the latter two arguments are used as the x-axis label and title of the produced plot

Example:

from group4package.function_count_plot import count_plot
new_plot = count_plot(df=train_df, x="x-axis label", name="Plot Title")

pre-process data(df, train_frac, seed)

  • drops all rows with missing or null values and then splits the dataframe into training and testing sets according to the given split ratio

Example:

from group4package import preprocess as pp
train_df, test_df = pp.preprocess(df, 0.8, 200)

Contributing

Interested in contributing? Check out the contributing guidelines. Please note that this project is released with a Code of Conduct. By contributing to this project, you agree to abide by its terms.

License

group4package was created by Hannah, Jordan, Diana, and Shravan. It is licensed under the terms of the MIT license.

Credits

group4package was created with cookiecutter and the py-pkgs-cookiecutter template.

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

group4package-0.1.3.tar.gz (6.4 kB view details)

Uploaded Source

Built Distribution

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

group4package-0.1.3-py3-none-any.whl (9.9 kB view details)

Uploaded Python 3

File details

Details for the file group4package-0.1.3.tar.gz.

File metadata

  • Download URL: group4package-0.1.3.tar.gz
  • Upload date:
  • Size: 6.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for group4package-0.1.3.tar.gz
Algorithm Hash digest
SHA256 c8d6cc34d78133624c6365ab563b2462994c31c5863af0eebf94611ce587de33
MD5 74a9db4da3dcadb6656b4313de9eff0f
BLAKE2b-256 034d5a971e07abaa0d00d294b2ebdbacee4377dc5b4a1e08c809efb40118e7c4

See more details on using hashes here.

File details

Details for the file group4package-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: group4package-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 9.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.0 CPython/3.9.12

File hashes

Hashes for group4package-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 546e534f2bf241c1b6e925fdab68213400d7c4601d407b4e34e8fcab706ba30c
MD5 d628ce29b4dcd3fe69f75c6236474b00
BLAKE2b-256 ea3dd9555a657402c4acc8b152c3d19bd52b303be0c28373675949f9ba174fbe

See more details on using hashes here.

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