Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mckib2/pygini
Compute the Gini index.
https://github.com/mckib2/pygini
Last synced: 19 days ago
JSON representation
Compute the Gini index.
- Host: GitHub
- URL: https://github.com/mckib2/pygini
- Owner: mckib2
- License: gpl-3.0
- Created: 2019-06-25T00:48:00.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-12-11T04:36:22.000Z (about 5 years ago)
- Last Synced: 2024-11-16T05:43:02.469Z (about 2 months ago)
- Language: Python
- Size: 27.3 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.rst
- License: LICENSE
Awesome Lists containing this project
README
pygini
======Very simple module that computes the Gini index of a numpy array.
Installation
============.. code-block:: bash
pip install pygini
Usage
=====.. code-block:: python
import numpy as np
from pygini import giniRG = np.random.default_rng(0)
A = RG.random(100)
GI = gini(A)# Also compute along axis
A = RG.random((100, 80, 80))
GI = gini(A, axis=0)# GI.shape = (80, 80)
See `examples` directory.