{"id":18732672,"url":"https://github.com/krzjoa/bace","last_synced_at":"2025-04-12T18:31:17.288Z","repository":{"id":57413621,"uuid":"57446048","full_name":"krzjoa/bace","owner":"krzjoa","description":"A deck of Naive Bayes algorithms with sklearn-like API 🃏 ","archived":false,"fork":false,"pushed_at":"2020-05-21T05:33:59.000Z","size":2389,"stargazers_count":8,"open_issues_count":2,"forks_count":5,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-10T04:40:31.097Z","etag":null,"topics":["bayes-classifier","machine-learning-algorithms","naive-bayes","naive-bayes-algorithm","naive-bayes-classifier"],"latest_commit_sha":null,"homepage":"https://bace.readthedocs.io","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/krzjoa.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-04-30T14:29:17.000Z","updated_at":"2021-11-15T07:59:38.000Z","dependencies_parsed_at":"2022-08-28T13:11:09.935Z","dependency_job_id":null,"html_url":"https://github.com/krzjoa/bace","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzjoa%2Fbace","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzjoa%2Fbace/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzjoa%2Fbace/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/krzjoa%2Fbace/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/krzjoa","download_url":"https://codeload.github.com/krzjoa/bace/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248613331,"owners_count":21133493,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["bayes-classifier","machine-learning-algorithms","naive-bayes","naive-bayes-algorithm","naive-bayes-classifier"],"created_at":"2024-11-07T15:07:06.560Z","updated_at":"2025-04-12T18:31:15.088Z","avatar_url":"https://github.com/krzjoa.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# bace \u003cimg src=\"https://raw.githubusercontent.com/krzjoa/bace/master/img/bace-of-spades.png\" align=\"right\" width = \"75px\"/\u003e\n![Python 3.7](https://img.shields.io/badge/python-3.7-blue.svg) \n[![PyPI version](https://badge.fury.io/py/bace.svg)](https://badge.fury.io/py/bace) \n[![Build Status](https://travis-ci.org/rasbt/mlxtend.svg?branch=master)](https://travis-ci.org/krzjoa/Bayes) \n[![Documentation Status](https://readthedocs.org/projects/bace/badge/?version=latest)](https://bace.readthedocs.io/en/latest/?badge=latest) \n[![License: MIT](https://img.shields.io/badge/License-MIT-yellow.svg)](https://opensource.org/licenses/MIT) \n\n\nA deck of Naive Bayes algorithms with sklearn-like API.\n\n## Algorithms\n* Complement Naive Bayes\n* Negation Naive Bayes\n* Universal-set Naive Bayes\n* Selective Naive Bayes\n\n## Installation\n\nYou can install this module directly from GitHub repo with command:\n\n````\npython3.7 -m pip install git+https://github.com/krzjoa/bace.git\n````\n\nor as a PyPI package\n\n````\npython3.7 -m pip install bace\n````\n\n## Usage\n\n**bace** API mimics [scikit-learn](http://scikit-learn.org/stable/modules/classes.html) API, so usage is very simple.\n\n```` python\nfrom bace import ComplementNB\nfrom sklearn.datasets import fetch_20newsgroups\nfrom sklearn.feature_extraction.text import CountVectorizer\n\nvectorizer = CountVectorizer()\n    \n# Train set\nnewsgroups_train = fetch_20newsgroups(subset='train', shuffle=True)\nX_train = vectorizer.fit_transform(newsgroups_train.data)\ny_train = newsgroups_train.target\n    \n# Test set\nnewsgroups_test = fetch_20newsgroups(subset='test', shuffle=True)\nX_test = vectorizer.fit_transform(newsgroups_test.data)\ny_test = newsgroups_test.target\n\n# Score \ncnb = ComplementNB()\ncnb.fit(X_train, y_train).accuracy_score(X_test, y_test)\n````\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzjoa%2Fbace","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fkrzjoa%2Fbace","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fkrzjoa%2Fbace/lists"}