Skip to main content

Python package dedicated to Discriminant Analysis (DA) distributed under the MIT License

Project description

PyPI Version Python versions GitHub Downloads Downloads Downloads

discrimintools : Python library for Discriminant Analysis (DA)

discrimintools is an open source Python package dedicated to Discriminant Analysis (DA) distributed under the MIT License.

Contents

1. Overview

2. Installation

3. Example

4. Documentation

5. About us

Overview

Discriminant analysis is a classification problem, where two or more groups or clusters or populations are known a priori and one or more new observations are classified into one of the known populations based on the measured characteristics.

discrimintools provides functions for:

  1. Discriminant Analysis (DA):

    • Canonical Discriminant Analysis - CANDISC
    • Discriminant Correspondence Analysis - DiCA
    • Discriminant Analysis (linear & quadractic) - DISCRIM
    • Stepwise Discriminant Analysis (backward & forward) - STEPDISC
  2. Factor Analysis (FA):

    • General Factor Analysis (PCA, MCA & FAMD) - GFA
    • Mixed Principal Component Analysis - MPCA
  3. Regularized Discriminant Analysis (RDA):

    • Partial Least Squares for Classification - CPLS
    • General Factor Analysis Linear Discriminant Analysis (PCADA, DISQUAL & DISMIX) - GFALDA
    • Discriminant Analysis on Mixed Predictors - MDA
    • Partial Least Squares Discriminant Analysis - PLSDA
    • Partial Least Squares Logistic Regression - PLSLOGIT
    • Partial Least Squares Linear Discriminant Analysis - PLSDA

Installation

Global environment

You can directly install discrimintools using pip :

pip install discrimintools

or set a virtual environment.

Virtual environment

Install the 64-bit version of Python 3, for instance from the official website. Now create a virtual environment (venv) and install discrimintools.

The virtual environment is optional but strongly recommended, in order to avoid potential conflicts with other packages.

PS C:\> python -m venv discrimintools-env # create virtual env
PS C:\> discrimintools-env\Scripts\activate  # activate
PS C:\> pip install -U discrimintools  # install discrimintools

Version

In order to check your installation, you can use.

import discrimintools
print(discrimintools.__version__)

Using an isolated environment such as pip venv or conda makes it possible to install a specific version of discrimintools with pip and conda and its dependencies independently of any previously installed Python packages.

You should always remember to activate the environment of your choice prior to running any Python command whenever you start a new terminal session.

Dependencies

discrimintools is compatible with python version which supports both dependencies :

Packages Version
statsmodels 0.14.6
scikit-learn 1.8.0
openpyxl 3.1.5
tabulate 0.9.0
plotnine 0.15.1
adjustText 1.3.0

Example

We performs a linear discriminant analysis with alcools dataset.

from discrimintools.datasets import load_alcools
from discrimintools import DISCRIM
D = load_alcools() # load training data
y, X = D['TYPE'], D.drop(columns=['TYPE']) # split into X and y
clf = DISCRIM()
clf.fit(X,y)

Documentation

The official documentation is hosted on https://discrimintools.readthedocs.io.

About Us

Authors

discrimintools is developed and maintained by Duvérier DJIFACK ZEBAZE, the founder of djifacklab (Djifack Laboratory of Mathematics, Statistics and Economics books and packages production using Python Programming Language).

The djifacklab laboratory maintains others python librairies such as scientisttools, scientistmetrics, scientistshiny, scientisttseries and ggcorrplot.

Feedbacks

If you have found discrimintools useful in your work, research, or company, please let us know by writing to email djifacklab@gmail.com.

Citing discrimintools

If discrimintools has been significant in your research, and you would like to acknowledge the project in your academic publication, we suggest citing it using the following BibTeX format:

@misc{DJIFACK ZEBAZE_2024, 
    url = {https://github.com/enfantbenidedieu/discrimintools}, 
    title = {discrimintools: a Python library for Discriminant Analysis}
    author = {DJIFACK ZEBAZE, Duvérier}, 
    year = {2024}
}

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

discrimintools-0.1.0.tar.gz (2.4 MB view details)

Uploaded Source

Built Distribution

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

discrimintools-0.1.0-py3-none-any.whl (2.5 MB view details)

Uploaded Python 3

File details

Details for the file discrimintools-0.1.0.tar.gz.

File metadata

  • Download URL: discrimintools-0.1.0.tar.gz
  • Upload date:
  • Size: 2.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for discrimintools-0.1.0.tar.gz
Algorithm Hash digest
SHA256 9eca81bae95cb1c0542e00e0356964c92d0ec3277288152e3eefe54f1ab6a59c
MD5 039325690520401f8a7310faf5768b56
BLAKE2b-256 06674c15de20b30664c901b3754e038fe9cd181c9a4d3738ab29a4b054dd44f8

See more details on using hashes here.

File details

Details for the file discrimintools-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: discrimintools-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 2.5 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.0

File hashes

Hashes for discrimintools-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 1b338361b9deb9b411015f1b17fab617333f829f6cfeaa6222a9f02ee4886174
MD5 51c9a3f6f22535821b55c7c935738752
BLAKE2b-256 2743f17eb65b8a53acad70ca794a45416994c54642dc3dacfde644e22c651119

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