realkd.py
Methods for knowledge discovery from data and interpretable machine learning. Currently, package contains primarily rule ensembles learners.
>>> import pandas as pd
>>> from sklearn.metrics import roc_auc_score
>>> from realkd.rules import RuleBoostingEstimator, XGBRuleEstimator
>>> titanic = pd.read_csv('../datasets/titanic/train.csv')
>>> survived = titanic.Survived
>>> titanic.drop(columns=['PassengerId', 'Name', 'Ticket', 'Cabin', 'Survived'], inplace=True)
>>> re = RuleBoostingEstimator(base_learner=XGBRuleEstimator(loss=logistic_loss))
>>> re.fit(titanic, survived.replace(0, -1), verbose=0)
-1.4248 if Pclass>=2 & Sex==male
+1.7471 if Pclass<=2 & Sex==female
+2.5598 if Age<=19.0 & Fare>=7.8542 & Parch>=1.0 & Sex==male & SibSp<=1.0
See the full documentation.
Metadata
Release files for realkd 0.2.1
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| realkd-0.2.1.tar.gz | 22.6 kB | Without provenance | Details for realkd-0.2.1.tar.gz |
Release files / realkd-0.2.1.tar.gz
| Download URL | realkd-0.2.1.tar.gz |
|---|---|
| Size | 22.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
0f55c813169a4b91b6b8798a5c4f198e0989c97b196df159af624f0bb508fd17
|
|
BLAKE2b-256 checksum How to use checksums |
9e88fadbd74a1fec1a9401455c40dccf92c0203bdc56be0ba0c6413e92423525
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/3.1.1 pkginfo/1.5.0.1 requests/2.23.0 setuptools/46.0.0 requests-toolbelt/0.9.1 tqdm/4.44.0 CPython/3.7.7
|
Security for realkd 0.2.1
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.