CountEst is a module containing the implementation of count-based estimators, i.e., supervised learning algorithms that make predictions based on the frequency or count of specific events, categories, or values within a dataset.
Project description
CountEst
CountEst is a Python module containing the implementation of count-based estimators, i.e., supervised learning algorithms that make predictions based on the frequency or count of specific events, categories, or values within a dataset. These estimators operate under the assumption that the distribution of counts or frequencies provides valuable information for making predictions or inferences. The classifier is inspired by "Vastu Moolak Ganit" as described in a recent Indian philosophy Madhyasth Darshan by Late Shri A Nagraj.
Currently, we have implemented count-based classifier for categorical data. It operates by learning the distribution of category counts (i.e. the number of occurrences or frequency of each distinct category within a specific feature) within each class during the training phase. It then predicts class probabilities for unseen data based on the observed counts of categories within each feature, employing a voting mechanism to handle ties.
Installation
The package can be installed using pip
:
pip install countest
Dependencies
The installation dependency requirements are:
- Python (>= 3.9)
- NumPy (>= 1.5)
- Pandas (>= 1.1.5)
- Scikit-Learn (>=0.20.0)
These dependencies are automatically installed using the pip commands above.
Examples
Here we show an example using the CategoricalCBC (i.e. count-based classifier for categorical data):
from countest.classifiers import CategoricalCBC
import numpy as np
X = np.random.choice(range(0,10),(100,6))
y = np.random.choice([0, 1], size=100)
estimator = CategoricalCBC()
estimator.fit(X, y)
print(estimator.predict([3, 6, 7, 2, 3, 4]))
Changelog
See the changelog for a history of notable changes to CountEst.
Development
This project is currently in its early stages. We're actively building and shaping it, and we welcome contributions from everyone, regardless of experience level. If you're interested in getting involved, we encourage you to explore the project and see where you can contribute! For specific contribution guidelines, visit our GitHub page.
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
Built Distribution
File details
Details for the file countest-0.1.5.tar.gz
.
File metadata
- Download URL: countest-0.1.5.tar.gz
- Upload date:
- Size: 6.0 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f1a49ac97a808850dcf9f3ea36102142a75c917b61ce3184b2be47319b53a1b6 |
|
MD5 | b3630b7be9555d3b57d52b128eab8f14 |
|
BLAKE2b-256 | 479e4c41b9f263b92785f89b195bf54be580c2144e647c9ad489809f9b7078bd |
File details
Details for the file countest-0.1.5-py3-none-any.whl
.
File metadata
- Download URL: countest-0.1.5-py3-none-any.whl
- Upload date:
- Size: 6.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31bd6b1e8d4b0d1691ca3c1a48dfbb110fea9b078da6f55a995302df1b3f0ad1 |
|
MD5 | c0b7a74ed3ab7bcd5dcf9c7866d2201a |
|
BLAKE2b-256 | b8f2b450b992e0522d477e2b789812dd87e11a22ec8c31fce5430a2e68d6e31d |