All Projects → fcanas → Bayes

fcanas / Bayes

Licence: MIT license
Naive Bayes Classifier in Swift for Mac and iOS

Programming Languages

swift
15916 projects
ruby
36898 projects - #4 most used programming language

Projects that are alternatives of or similar to Bayes

bayes
naive bayes in php
Stars: ✭ 61 (+103.33%)
Mutual labels:  naive-bayes-classifier, bayes
lapis-bayes
Naive Bayes classifier for use in Lua
Stars: ✭ 26 (-13.33%)
Mutual labels:  naive-bayes-classifier
20-newsgroups text-classification
"20 newsgroups" dataset - Text Classification using Multinomial Naive Bayes in Python.
Stars: ✭ 41 (+36.67%)
Mutual labels:  naive-bayes-classifier
Machine Learning From Scratch
Machine Learning models from scratch with a better visualisation
Stars: ✭ 15 (-50%)
Mutual labels:  naive-bayes-classifier
GaussianNB
Gaussian Naive Bayes (GaussianNB) classifier
Stars: ✭ 17 (-43.33%)
Mutual labels:  naive-bayes-classifier
Naive-Bayes-Text-Classifier-in-Java
Naive Bayes Classification used to classify movie reviews as positive or negative
Stars: ✭ 18 (-40%)
Mutual labels:  naive-bayes-classifier
naive-bayes-classifier
Implementing Naive Bayes Classification algorithm into PHP to classify given text as ham or spam. This application uses MySql as database.
Stars: ✭ 21 (-30%)
Mutual labels:  naive-bayes-classifier
twitter mining
Twitter Mining in Java
Stars: ✭ 25 (-16.67%)
Mutual labels:  naive-bayes-classifier
Machine-Learning-Projects-2
No description or website provided.
Stars: ✭ 23 (-23.33%)
Mutual labels:  naive-bayes-classifier
100 Days Of Ml Code
100 Days of ML Coding
Stars: ✭ 33,641 (+112036.67%)
Mutual labels:  naive-bayes-classifier
sentiment-analysis-using-python
Large Data Analysis Course Project
Stars: ✭ 23 (-23.33%)
Mutual labels:  naive-bayes-classifier
chatto
Chatto is a minimal chatbot framework in Go.
Stars: ✭ 98 (+226.67%)
Mutual labels:  naive-bayes-classifier
MachineLearning
โค้ดประกอบเนื้อหา Python Machine Learning เบื้องต้น [2020]
Stars: ✭ 28 (-6.67%)
Mutual labels:  naive-bayes-classifier
Nepali-News-Classifier
Text Classification of Nepali Language Document. This Mini Project was done for the partial fulfillment of NLP Course : COMP 473.
Stars: ✭ 13 (-56.67%)
Mutual labels:  naive-bayes-classifier
distribution-cheatsheet
📈📄👀A lookup repo for a variety of discrete and continuous distributions (incl. Beta, Binomial, Cauchy, Chi-squared, Geometric, Hypergeometric, Normal & Poisson)
Stars: ✭ 43 (+43.33%)
Mutual labels:  bayes
Word-Embeddings-and-Document-Vectors
An evaluation of word-embeddings for classification
Stars: ✭ 32 (+6.67%)
Mutual labels:  naive-bayes-classifier
fake-fews
Candidate solution for Facebook's fake news problem using machine learning and crowd-sourcing. Takes form of a Chrome extension. Developed in under 24 hours at 2017 Crimson Code hackathon at Washington State University.
Stars: ✭ 13 (-56.67%)
Mutual labels:  naive-bayes-classifier
name2gender
Extrapolate gender from first names using Naïve-Bayes and PyTorch Char-RNN
Stars: ✭ 24 (-20%)
Mutual labels:  naive-bayes-classifier
DiseaseClassifier
Using a Naive Bayes Classifier gets possible diseases from symptoms
Stars: ✭ 23 (-23.33%)
Mutual labels:  naive-bayes-classifier
Machine Learning With Python
Python code for common Machine Learning Algorithms
Stars: ✭ 3,334 (+11013.33%)
Mutual labels:  naive-bayes-classifier

Bayes Build

Bayes is a Naive Bayes Classifier for iOS and Mac platforms.

Bayes is implemented in Swift and takes advantage of generics to enable any Hashable, Equatable type of your choosing or creation for use as category or feature.

Installation

Swift Package

Bayes is built as a Swift package.

CocoaPods

Bayes is available as a CocoaPod, but has not yet been versioned and submitted to trunk. So to use it:

pod 'Bayes', git: 'https://github.com/fcanas/Bayes.git'

Since Bayes is written in Swift, you will need to be using a recent version of CocoaPods (>0.36) and you may need to add use_frameworks! to your Podfile. See this blog post for more information.

Framework

The project includes framework targets for iOS and Mac. Pull the repository and build the appropriate target for you. When Bayes reaches a release milestone, it will be appropriately tagged and should be easily available via Carthage.

Use

var eventSpace = EventSpace<String, String>()

eventSpace.observe("Cat", features: ["paw", "tail", "claw"])
eventSpace.observe("Cat", features: ["stripe", "tail", "whisker", "ear"])
eventSpace.observe("Cat", features: ["meow", "vertical pupil"])

eventSpace.observe("Dog", features: ["paw", "tail", "bark"])
eventSpace.observe("Dog", features: ["wag", "fetch", "tail", "paw"])

var classifier = BayesianClassifier(eventSpace: eventSpace)

XCTAssertEqual(classifier.classify(["claw", "tail"])!, "Cat", "Should categorize as Cat, due to claw")
XCTAssertEqual(classifier.classify(["bark", "tail"])!, "Dog", "Should categorize as Dog, due to bark")
XCTAssertEqual(classifier.classify(["tail"])!, "Cat", "Should categorize as Cat, due to base rate")
XCTAssertEqual(classifier.classify(["paw", "tail"])!, "Dog", "Should categorize as Dog, due to prevalence of paw")

Contribute

Contributions are welcome. Please note the following guidelines

  • Test public functionality
  • Make everything as private as possible; use private and internal aggressively and only expose what is necessary for external functionality
  • Favor structs over classes
  • Extract standard mathematical functions that may simplify implementation of future models, e.g. product, argmax
Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].