Skip to main content

bace

Python 3.7 PyPI version Build Status Documentation Status License: MIT

A deck of Naive Bayes algorithms with sklearn-like API.

Algorithms

  • Complement Naive Bayes
  • Negation Naive Bayes
  • Universal-set Naive Bayes
  • Selective Naive Bayes

Installation

You can install this module directly from GitHub repo with command:

python3.7 -m pip install git+https://github.com/krzjoa/bace.git

or as a PyPI package

python3.7 -m pip install bace

Usage

bace API mimics scikit-learn API, so usage is very simple.

from bace import ComplementNB
from sklearn.datasets import fetch_20newsgroups
from sklearn.feature_extraction.text import CountVectorizer

vectorizer = CountVectorizer()

# Train set
newsgroups_train = fetch_20newsgroups(subset='train', shuffle=True)
X_train = vectorizer.fit_transform(newsgroups_train.data)
y_train = newsgroups_train.target

# Test set
newsgroups_test = fetch_20newsgroups(subset='test', shuffle=True)
X_test = vectorizer.fit_transform(newsgroups_test.data)
y_test = newsgroups_test.target

# Score 
cnb = ComplementNB()
cnb.fit(X_train, y_train).accuracy_score(X_test, y_test)

Documentation

The full documentation is at http://bace.rtfd.org.

Metadata

Release files for bace 1.0.1

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

Source distribution (sdist)

Source distribution for bace 1.0.1
File Size Uploaded Provenance Actions
bace-1.0.1.tar.gz 8.9 kB Without provenance Details for bace-1.0.1.tar.gz

Built distribution (wheel)

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

Total release size: 23.7 kB

Release files / bace-1.0.1.tar.gz

Download URL bace-1.0.1.tar.gz
Size 8.9 kB
Tags Source
SHA-256 checksum
How to use checksums
fd4d059af8a51bbcd8bbc98f5446975dc31caa4d5cfcc07055a5be5cce70bc51
BLAKE2b-256 checksum
How to use checksums
08fe22b6709a9db828131029d038af656f7556e9a83b950962e07d0943de886b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Release files / bace-1.0.1-py3-none-any.whl

Download URL bace-1.0.1-py3-none-any.whl
Size 14.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
65c2b4ced4d68f9bf000ce50f8302a926b46fbdeb6ec9abc5d04d49b762af5da
BLAKE2b-256 checksum
How to use checksums
cbe09f54bf57313469066277a5ea8d781177db9c1afaa3b1b79b74737cff3c6b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/41.0.1 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.3

Security for bace 1.0.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.

Release history Release notifications | RSS feed

This release

1.0.1 This release

2 release files No provenance

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