https://github.com/javascript-machine-learning/svm-spam-classifier-javascript
🍃 Spam Classifier with Data Preparation and Support Vector Machine (SVM)
https://github.com/javascript-machine-learning/svm-spam-classifier-javascript
javascript machine-learning machine-learning-algorithms support-vector-machine support-vector-machines svm svm-classifier svm-learning svm-library svm-model svm-training
Last synced: about 1 month ago
JSON representation
🍃 Spam Classifier with Data Preparation and Support Vector Machine (SVM)
- Host: GitHub
- URL: https://github.com/javascript-machine-learning/svm-spam-classifier-javascript
- Owner: javascript-machine-learning
- Created: 2017-12-19T03:17:14.000Z (over 7 years ago)
- Default Branch: master
- Last Pushed: 2017-12-28T11:33:00.000Z (over 7 years ago)
- Last Synced: 2024-11-19T22:43:21.455Z (7 months ago)
- Topics: javascript, machine-learning, machine-learning-algorithms, support-vector-machine, support-vector-machines, svm, svm-classifier, svm-learning, svm-library, svm-model, svm-training
- Language: JavaScript
- Homepage: https://bri.im
- Size: 229 KB
- Stars: 8
- Watchers: 3
- Forks: 4
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# Spam Classifier with SVM in JavaScript
[](https://travis-ci.org/javascript-machine-learning/svm-spam-classifier-javascript)
This example project demonstrates how [support vector machine (SVM)](https://en.wikipedia.org/wiki/Support_vector_machine) may be used to solve a classification problem (spam filter) in JavaScript. The [SMS Spam Collection Dataset from kaggle](https://www.kaggle.com/uciml/sms-spam-collection-dataset/data) is used for the purpose of training and testing the algorithm. Before training the algorithm, the data set is prepared with common practices to finally extract a feature vector for each SMS. Furthermore, [svm.js](https://github.com/karpathy/svmjs) is used for a ready to go SVM implementation.
As alternative, uncomment the code to use [Naive Bayes classifier](https://en.wikipedia.org/wiki/Naive_Bayes_classifier) instead of SVM from the [natural](https://github.com/NaturalNode/natural) library.
## Installation
* `git clone [email protected]:javascript-machine-learning/svm-spam-classifier-javascript.git`
* `cd svm-spam-classifier-javascript`
* `npm install`
* `npm start`