Skip to main content

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}
}

Release files for discrimintools 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for discrimintools 0.1.0
File Size Uploaded
discrimintools-0.1.0.tar.gz 2.4 MB Details

Built distribution (wheel)

Table of built distributions (wheels) for discrimintools 0.1.0
File Interpreter ABI Platform
discrimintools-0.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 4.9 MB

Release files / discrimintools-0.1.0.tar.gz

Download URL discrimintools-0.1.0.tar.gz
Size 2.4 MB
Tags Source
SHA-256 checksum
How to use checksums
9eca81bae95cb1c0542e00e0356964c92d0ec3277288152e3eefe54f1ab6a59c
BLAKE2b-256 checksum
How to use checksums
06674c15de20b30664c901b3754e038fe9cd181c9a4d3738ab29a4b054dd44f8
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release files / discrimintools-0.1.0-py3-none-any.whl

Download URL discrimintools-0.1.0-py3-none-any.whl
Size 2.5 MB
Tags Python 3
SHA-256 checksum
How to use checksums
1b338361b9deb9b411015f1b17fab617333f829f6cfeaa6222a9f02ee4886174
BLAKE2b-256 checksum
How to use checksums
2743f17eb65b8a53acad70ca794a45416994c54642dc3dacfde644e22c651119
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.11.0

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files

0.0.3

2 release files

0.0.2

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page