# rdn-naive-bayes

> Implements naive bayes classifier

Latest version **0.1.3** (published 2015-04-27) · MIT license · 0 weekly downloads

## Install

```sh
npm install rdn-naive-bayes
pnpm add rdn-naive-bayes
yarn add rdn-naive-bayes
bun add rdn-naive-bayes
```

Provides the command `rdn-naive-bayes`.

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support; pre 1.0.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 0.1.3 |
| Published | 2015-04-27 |
| First published | 2015-04-26 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 5 |
| Known vulnerabilities | 0 (+5 in 3 direct dependencies) |
| Install scripts | no |
| Author | Ross Nordstrom |
| Maintainers | ross-nordstrom |
| Keywords | naive, bayes, classifier |

## Links

- npm: https://www.npmjs.com/package/rdn-naive-bayes
- Repository: github.com/ross-nordstrom/cs5860-naive_bayes
- Homepage: https://github.com/ross-nordstrom/cs5860-naive_bayes
- Issues: https://github.com/ross-nordstrom/cs5860-naive_bayes/issues
- npm.io page: https://npm.io/package/rdn-naive-bayes

## Dependencies (5)

- [async](https://npm.io/package/async.md) 0.9.0
- [natural](https://npm.io/package/natural.md) 0.2.1
- [minimist](https://npm.io/package/minimist.md) 1.1.1
- [superagent](https://npm.io/package/superagent.md) 1.2.0
- [underscore](https://npm.io/package/underscore.md) 1.8.3

## Recent versions

- 0.1.3 (latest) — 2015-04-27
- 0.1.2 — 2015-04-27
- 0.1.1 — 2015-04-27
- 0.1.0 — 2015-04-27
- 0.0.2 — 2015-04-26
- 0.0.1 — 2015-04-26

## README

CS 5860 - Naive Bayes Classifier
================================

    Ross Nordstrom
    University of Colorado - Colorado Springs
    CS 5860 - Machine Learning

## Assignment
 > Write a program in a language of your choice that classifies datasets into two classes. The two classes
here are _Charles Dickens_ and _Thomas Hardy._

### [Assignment Details](https://github.com/ross-nordstrom/cs5860-naive_bayes/blob/master/ASSIGNMENT.pdf)

## Dataset
In addition to the required Dickens and Hardy books, some additional datasets were taken from [UCI - Machine Learning Repository](https://archive.ics.uci.edu/ml/datasets.html). The datasets used are described below.

**Datasets used, and their location in this project:**

**Dataset** | **Source** | **Path** | **Type** *
---|---|---|---
SMS | [UCI - SMS Spam Collection](https://archive.ics.uci.edu/ml/datasets/SMS+Spam+Collection) | [./data/sms](./data/sms) | inline
Badges | [UCI - Badges](https://archive.ics.uci.edu/ml/datasets/Badges) | [./data/badges](./data/badges) | inline
Main | Gutenberg - [Dickens](http://www.gutenberg.org/ebooks/author/37), [Hardy](http://www.gutenberg.org/ebooks/author/23) | [./data/main](./data/main) | gutenberg

**Dataset Types:** *

**Type** | **Description**
---|---
inline | Dataset is stored as a single file in which each line represents a training point. The first word in each line is the class/category, while the rest of the line is a list of words used as the training "text blob."
gutenberg | Dataset is stored as a list of directories representing classes/categories (e.g. "dickens", "hardy"). Each file within the class directories represent a training point. These files are actually books, but are abstractly considered to be "text blobs," just like the **inline** dataset type.

## Usage
This project is intended to be used via the CLI, and is exposed as an NPM package.

### Installation
**From NPM:**
```sh
npm install -g rdn-naive-bayes
```

**From local:**
```sh
git clone git@github.com:ross-nordstrom/cs5860-naive_bayes.git
cd cs5860-naive-bayes
npm install
npm link
```

### Running
**View Usage:**
Rather than document the usage here, please see the tool's help documentation. In general, the tool
expects to be given a dataset which it will divide into Training/Testing data.

```sh
rdn-naive-bayes -h
```

### Testing
```sh
npm install
npm test
```

---
_Source: https://npm.io/package/rdn-naive-bayes · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
