Skip to main content

A Python package for performing various statistical analyses

Project description

PyDatalysis

The pydatalysis package is a Python library designed to provide a convenient and user-friendly interface for performing statistical analysis. Currently, the library includes a set of functions for fitting and evaluating regression models. More functions will be added soon.

The package is designed to be user-friendly, with intuitive syntax and clear output. It is intended for use by researchers, data scientists. Under the hood, pydatalysis utiize the statsmodels and sklearn libraries to provide a range of data analysis and modeling functions. Essentially, this library provides a high-level interface that abstracts away many of the complexities of working with statistical models, making it easy to get started with data analysis in Python.

Installation

You can install this package using pip. Open a terminal or command prompt and type:

pip install regression_analysis


Dependencies

  • numpy
  • pandas
  • statsmodels
  • sklearn

License

This package is licensed under the MIT License.


Linear Regression

Paragraph

linear_regression(data, x, y)

This function performs a linear regression analysis on the input dataset.

Parameters

Parameter Data type Description
data pandas DataFrame The input dataset.
x string or list of strings The name(s) of the column(s) to be used as predictor variable(s).
y string The name of the column to be used as the response variable.

Returns

This function returns a dictionary of tables that summarize the results of a linear regression analysis. The tables included are

  • coefficients table: shows the estimated coefficients and standard errors for each predictor variable,
  • summary table: provides an overview of the regression results,
  • diagnostics table: includes various diagnostic measures such as the residuals and leverage values.

These tables can be used to evaluate the fit of the regression model and to identify any potential issues such as outliers or multicollinearity.

Exmaple


Logistic Regression

Paragraph

logistic_regression(data, x, y)

This function performs a logistic regression analysis on the input dataset.

Parameters

Parameter Data type Description
data pandas DataFrame The input dataset.
x string or list of strings The name(s) of the column(s) to be used as predictor variable(s).
y string The name of the column to be used as the response variable.

Returns

This function returns a dictionary of tables that summarize the results of a linear regression analysis. The tables included are

  • summary_table: Logistic Regression Summary Table. This table provides information on the model's goodness of fit, including the number of observations, the model's Log-Likelihood value, and the Wald Chi-Square test statistic.

  • coefficients_table: provides information on the regression coefficients of the predictors used in the logistic regression model. This table includes columns for the predictor variable name, unstandardized coefficient estimates, standardized coefficient estimates, standard error, z-value, p-value, confidence interval lower bound, confidence interval upper bound, and odds ratio.

  • predictive_measures_table: provides information on the predictive measures of the logistic regression model. This table includes columns for the accuracy, specificity, and sensitivity of the model.

  • classification_table: provides information on the classification accuracy of the logistic regression model. This table includes the number of true positives, true negatives, false positives, and false negatives, as well as the percentage of correct classifications for each category.

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

pydatalysis-0.1.821.tar.gz (4.9 kB view details)

Uploaded Source

Built Distribution

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

pydatalysis-0.1.821-py3-none-any.whl (6.5 kB view details)

Uploaded Python 3

File details

Details for the file pydatalysis-0.1.821.tar.gz.

File metadata

  • Download URL: pydatalysis-0.1.821.tar.gz
  • Upload date:
  • Size: 4.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for pydatalysis-0.1.821.tar.gz
Algorithm Hash digest
SHA256 ddaa7a71618fa3805ae603a81a4186643019986f18c89dfc31b35f9a78ab18e4
MD5 96a8885b78b31897e28c71487612f1d1
BLAKE2b-256 6165744b6b67f99b27a0954673d08d1dfe6469ab7fbea1f81899feb0d41aad80

See more details on using hashes here.

File details

Details for the file pydatalysis-0.1.821-py3-none-any.whl.

File metadata

  • Download URL: pydatalysis-0.1.821-py3-none-any.whl
  • Upload date:
  • Size: 6.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.9.5

File hashes

Hashes for pydatalysis-0.1.821-py3-none-any.whl
Algorithm Hash digest
SHA256 340f830e2f05496a0bb22bb9c75d59c71735dcf993aea49cd24cdff94adbab0d
MD5 a661723991069a2217a4ebc7eaae06f7
BLAKE2b-256 0f0b905803ba44d1f5dc5ce76fc59da271e5823304dca290b0ac3039d7a66d78

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