├── .gitignore ├── .travis.yml ├── docs └── NaiveBayesClassifier │ ├── 0.1.0 │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ ├── scripts │ │ ├── prettify │ │ │ ├── lang-css.js │ │ │ └── Apache-License-2.0.txt │ │ ├── toc.js │ │ ├── bootstrap-tab.js │ │ └── bootstrap-dropdown.js │ ├── styles │ │ ├── prettify-tomorrow.css │ │ ├── sunlight.default.css │ │ └── sunlight.dark.css │ ├── classes.list.html │ ├── UriInformation.html │ ├── categorization.html │ └── index.html │ ├── 0.1.1 │ ├── img │ │ ├── glyphicons-halflings.png │ │ └── glyphicons-halflings-white.png │ ├── scripts │ │ ├── prettify │ │ │ ├── lang-css.js │ │ │ └── Apache-License-2.0.txt │ │ ├── toc.js │ │ ├── bootstrap-tab.js │ │ └── bootstrap-dropdown.js │ ├── styles │ │ ├── prettify-tomorrow.css │ │ ├── sunlight.default.css │ │ └── sunlight.dark.css │ ├── classes.list.html │ └── index.html │ └── 0.2.0 │ ├── img │ ├── glyphicons-halflings.png │ └── glyphicons-halflings-white.png │ ├── scripts │ ├── prettify │ │ └── lang-css.js │ ├── toc.js │ ├── bootstrap-tab.js │ └── bootstrap-dropdown.js │ ├── styles │ ├── prettify-tomorrow.css │ ├── sunlight.default.css │ └── sunlight.dark.css │ ├── classes.list.html │ └── index.html ├── resources └── Comparison of Classification Methods Based on the Type of Attributes and Sample Size.pdf ├── gruntfile.js ├── .jshintrc ├── jsdoc.conf.json ├── bower.json ├── package.json ├── gulpfile.js ├── LICENSE ├── dist └── NaiveBayesClassifier-min.js ├── README.md └── test └── NaiveBayesClassifier-test.js /.gitignore: -------------------------------------------------------------------------------- 1 | node_modules 2 | .deploy -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: node_js 2 | node_js: 3 | - "node" 4 | - "iojs" -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings.png -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.0/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.1.1/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings-white.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/docs/NaiveBayesClassifier/0.2.0/img/glyphicons-halflings-white.png -------------------------------------------------------------------------------- /resources/Comparison of Classification Methods Based on the Type of Attributes and Sample Size.pdf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/hdmchl/NaiveBayesClassifier/HEAD/resources/Comparison of Classification Methods Based on the Type of Attributes and Sample Size.pdf -------------------------------------------------------------------------------- /gruntfile.js: -------------------------------------------------------------------------------- 1 | module.exports = function(grunt) { 2 | 'use strict'; 3 | 4 | grunt.initConfig({ 5 | jsdoc : { 6 | dist : { 7 | src: ['src/*.js', 'README.md', 'package.json'], 8 | options: { 9 | destination: 'docs', 10 | template: 'node_modules/grunt-jsdoc/node_modules/ink-docstrap/template', 11 | configure: 'jsdoc.conf.json' 12 | } 13 | } 14 | } 15 | }); 16 | 17 | grunt.loadNpmTasks('grunt-jsdoc'); 18 | }; 19 | -------------------------------------------------------------------------------- /.jshintrc: -------------------------------------------------------------------------------- 1 | { 2 | "node": true, 3 | "browser": true, 4 | "esnext": true, 5 | "bitwise": true, 6 | "camelcase": true, 7 | "curly": true, 8 | "eqeqeq": true, 9 | "immed": true, 10 | "indent": 4, 11 | "latedef": true, 12 | "newcap": true, 13 | "noarg": true, 14 | "quotmark": "single", 15 | "undef": true, 16 | "unused": true, 17 | "strict": true, 18 | "trailing": true, 19 | "smarttabs": true, 20 | "globals": { 21 | "define": true, 22 | "describe": true, 23 | "it": true 24 | } 25 | } 26 | -------------------------------------------------------------------------------- /jsdoc.conf.json: -------------------------------------------------------------------------------- 1 | { 2 | "templates" : { 3 | "cleverLinks" : true, 4 | "monospaceLinks" : true, 5 | "dateFormat" : "ddd, MMM Do, YYYY", 6 | "outputSourceFiles" : false, 7 | "outputSourcePath" : false, 8 | "systemName" : "NaiveBayesClassifier", 9 | "footer" : "", 10 | "copyright" : "Copyright (C) 2015, Hadi Michael. All rights reserved.", 11 | "navType" : "inline", 12 | "theme" : "cosmo", 13 | "linenums" : true, 14 | "collapseSymbols" : false, 15 | "inverseNav" : true, 16 | "highlightTutorialCode" : true 17 | } 18 | } -------------------------------------------------------------------------------- /bower.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "naivebayesclassifier", 3 | "title": "NaiveBayesClassifier", 4 | "homepage": "https://github.com/hadimichael/NaiveBayesClassifier", 5 | "author": { 6 | "name": "Hadi Michael", 7 | "url": "http://hadi.io" 8 | }, 9 | "description": "NaiveBayesClassifier is a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing.", 10 | "main": "dist/NaiveBayesClassifier-min.js", 11 | "moduleType": [ 12 | "amd", 13 | "globals", 14 | "node" 15 | ], 16 | "keywords": [ 17 | "naive", 18 | "bayes", 19 | "classifier", 20 | "multinomial", 21 | "machine learning", 22 | "learn", 23 | "categorize", 24 | "classify" 25 | ], 26 | "license": "BSD-3-Clause, see LICENSE file", 27 | "ignore": [ 28 | "/*", 29 | "!/dist", 30 | "!LICENSE", 31 | "!README.md" 32 | ] 33 | } 34 | -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.0/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([ 2 | ["pln", /^[\t\n\f\r ]+/, null, " \t\r\n "] 3 | ], [ 4 | ["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null], 5 | ["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null], 6 | ["lang-css-str", /^url\(([^"')]*)\)/i], 7 | ["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null], 8 | ["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i], 9 | ["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//], 10 | ["com", /^(?:<\!--|--\>)/], 11 | ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], 12 | ["lit", /^#[\da-f]{3,6}/i], 13 | ["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i], 14 | ["pun", /^[^\s\w"']+/] 15 | ]), ["css"]); 16 | PR.registerLangHandler(PR.createSimpleLexer([], [ 17 | ["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i] 18 | ]), ["css-kw"]); 19 | PR.registerLangHandler(PR.createSimpleLexer([], [ 20 | ["str", /^[^"')]+/] 21 | ]), ["css-str"]); -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.1/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([ 2 | ["pln", /^[\t\n\f\r ]+/, null, " \t\r\n "] 3 | ], [ 4 | ["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null], 5 | ["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null], 6 | ["lang-css-str", /^url\(([^"')]*)\)/i], 7 | ["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null], 8 | ["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i], 9 | ["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//], 10 | ["com", /^(?:<\!--|--\>)/], 11 | ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], 12 | ["lit", /^#[\da-f]{3,6}/i], 13 | ["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i], 14 | ["pun", /^[^\s\w"']+/] 15 | ]), ["css"]); 16 | PR.registerLangHandler(PR.createSimpleLexer([], [ 17 | ["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i] 18 | ]), ["css-kw"]); 19 | PR.registerLangHandler(PR.createSimpleLexer([], [ 20 | ["str", /^[^"')]+/] 21 | ]), ["css-str"]); -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.2.0/scripts/prettify/lang-css.js: -------------------------------------------------------------------------------- 1 | PR.registerLangHandler(PR.createSimpleLexer([ 2 | ["pln", /^[\t\n\f\r ]+/, null, " \t\r\n "] 3 | ], [ 4 | ["str", /^"(?:[^\n\f\r"\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*"/, null], 5 | ["str", /^'(?:[^\n\f\r'\\]|\\(?:\r\n?|\n|\f)|\\[\S\s])*'/, null], 6 | ["lang-css-str", /^url\(([^"')]*)\)/i], 7 | ["kwd", /^(?:url|rgb|!important|@import|@page|@media|@charset|inherit)(?=[^\w-]|$)/i, null], 8 | ["lang-css-kw", /^(-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*)\s*:/i], 9 | ["com", /^\/\*[^*]*\*+(?:[^*/][^*]*\*+)*\//], 10 | ["com", /^(?:<\!--|--\>)/], 11 | ["lit", /^(?:\d+|\d*\.\d+)(?:%|[a-z]+)?/i], 12 | ["lit", /^#[\da-f]{3,6}/i], 13 | ["pln", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i], 14 | ["pun", /^[^\s\w"']+/] 15 | ]), ["css"]); 16 | PR.registerLangHandler(PR.createSimpleLexer([], [ 17 | ["kwd", /^-?(?:[_a-z]|\\[\da-f]+ ?)(?:[\w-]|\\\\[\da-f]+ ?)*/i] 18 | ]), ["css-kw"]); 19 | PR.registerLangHandler(PR.createSimpleLexer([], [ 20 | ["str", /^[^"')]+/] 21 | ]), ["css-str"]); -------------------------------------------------------------------------------- /package.json: -------------------------------------------------------------------------------- 1 | { 2 | "name": "naivebayesclassifier", 3 | "title": "NaiveBayesClassifier", 4 | "version": "0.2.0", 5 | "description": "NaiveBayesClassifier is a Multinomial Naive-Bayes Classifier that uses Laplace Smoothing.", 6 | "keywords": [ "naive", "bayes", "classifier", "multinomial", "machine learning", "learn", "categorize", "classify"], 7 | "main": "dist/NaiveBayesClassifier-min.js", 8 | "scripts": { 9 | "test": "gulp test" 10 | }, 11 | "author": { 12 | "name": "Hadi Michael", 13 | "url": "http://hadi.io" 14 | }, 15 | "repository": { 16 | "type": "git", 17 | "url": "git://github.com/hadimichael/NaiveBayesClassifier.git" 18 | }, 19 | "license": "BSD-3-Clause, see LICENSE file", 20 | "devDependencies": { 21 | "grunt": "^0.4.5", 22 | "grunt-jsdoc": "^0.5.8", 23 | "gulp": "^3.8.11", 24 | "gulp-gh-pages": "^0.5.1", 25 | "gulp-grunt": "^0.5.2", 26 | "gulp-jshint": "^1.10.0", 27 | "gulp-minify": "0.0.5", 28 | "gulp-mocha": "^2.0.1", 29 | "gulp-umd": "^0.1.3", 30 | "mocha": "^2.2.5" 31 | } 32 | } 33 | -------------------------------------------------------------------------------- /gulpfile.js: -------------------------------------------------------------------------------- 1 | 'use strict'; 2 | 3 | var pkg = require('./package.json'), 4 | gulp = require('gulp'), 5 | umd = require('gulp-umd'), 6 | minify = require('gulp-minify'), 7 | jshint = require('gulp-jshint'), 8 | mocha = require('gulp-mocha'), 9 | ghPages = require('gulp-gh-pages'); 10 | 11 | var path = { 12 | scripts: 'src/*.js', 13 | dist: 'dist/*.js', 14 | test: 'test/NaiveBayesClassifier-test.js', 15 | readme: 'README.md', 16 | docs: './docs/NaiveBayesClassifier/' + pkg.version + '/**/*.*' 17 | }; 18 | 19 | require('gulp-grunt')(gulp); // Require all grunt tasks, we need this because grunt-jsdoc is better than the gulp alternative 20 | 21 | gulp.task('docs', function () { 22 | gulp.start('grunt-jsdoc'); 23 | }); 24 | 25 | gulp.task('build', function() { 26 | gulp.src(path.scripts) 27 | .pipe(jshint()) 28 | .pipe(jshint.reporter('default')) 29 | .pipe(umd()) // Ship in 'regular module' UMD format: returnExports.js 30 | .pipe(minify()) 31 | .pipe(gulp.dest('./dist/')); 32 | }); 33 | 34 | gulp.task('test', function() { 35 | gulp.start('build'); 36 | gulp.src(path.test) 37 | .pipe(mocha({reporter: 'nyan'})); 38 | }); 39 | 40 | gulp.task('default', function() { 41 | gulp.start('build', 'test', 'docs'); 42 | }); 43 | 44 | gulp.task('deploy', function() { 45 | return gulp.src(path.docs) 46 | .pipe(ghPages({ 47 | force: true, 48 | cacheDir: '.deploy' 49 | })); 50 | }); 51 | 52 | // Build, test and generate docs, every time we update the code 53 | gulp.task('watch', function() { 54 | gulp.watch(path.scripts, ['default']); 55 | gulp.watch(path.readme, ['docs']); 56 | gulp.watch(path.test, ['test']); 57 | }); -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | BSD-3-Clause 2 | Copyright (C) 2015, Hadi Michael. All rights reserved. 3 | 4 | NaiveBayesClassifier can be downloaded from: https://github.com/hadimichael/NaiveBayesClassifier 5 | 6 | Redistribution and use in source and binary forms, with or without 7 | modification, are permitted provided that the following conditions are met: 8 | 9 | * Redistributions of source code must retain the above copyright notice, this 10 | list of conditions and the following disclaimer. 11 | 12 | * Redistributions in binary form must reproduce the above copyright notice, 13 | this list of conditions and the following disclaimer in the documentation 14 | and/or other materials provided with the distribution. 15 | 16 | * Neither the name of the copyright holder nor the names of its contributors 17 | may be used to endorse or promote products derived from this software without 18 | specific prior written permission. 19 | 20 | THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 21 | AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 | IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE 23 | DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE 24 | FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 | DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR 26 | SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER 27 | CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, 28 | OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 29 | OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.0/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #718c00; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #8959a8; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #8e908c; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #4271ae; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #f5871f; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #4d4d4c; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #4d4d4c; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #4d4d4c; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Menlo, Monaco, Consolas, monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.1/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #718c00; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #8959a8; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #8e908c; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #4271ae; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #f5871f; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #4d4d4c; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #4d4d4c; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #4d4d4c; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Menlo, Monaco, Consolas, monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.2.0/styles/prettify-tomorrow.css: -------------------------------------------------------------------------------- 1 | /* Tomorrow Theme */ 2 | /* Original theme - https://github.com/chriskempson/tomorrow-theme */ 3 | /* Pretty printing styles. Used with prettify.js. */ 4 | /* SPAN elements with the classes below are added by prettyprint. */ 5 | /* plain text */ 6 | .pln { 7 | color: #4d4d4c; } 8 | 9 | @media screen { 10 | /* string content */ 11 | .str { 12 | color: #718c00; } 13 | 14 | /* a keyword */ 15 | .kwd { 16 | color: #8959a8; } 17 | 18 | /* a comment */ 19 | .com { 20 | color: #8e908c; } 21 | 22 | /* a type name */ 23 | .typ { 24 | color: #4271ae; } 25 | 26 | /* a literal value */ 27 | .lit { 28 | color: #f5871f; } 29 | 30 | /* punctuation */ 31 | .pun { 32 | color: #4d4d4c; } 33 | 34 | /* lisp open bracket */ 35 | .opn { 36 | color: #4d4d4c; } 37 | 38 | /* lisp close bracket */ 39 | .clo { 40 | color: #4d4d4c; } 41 | 42 | /* a markup tag name */ 43 | .tag { 44 | color: #c82829; } 45 | 46 | /* a markup attribute name */ 47 | .atn { 48 | color: #f5871f; } 49 | 50 | /* a markup attribute value */ 51 | .atv { 52 | color: #3e999f; } 53 | 54 | /* a declaration */ 55 | .dec { 56 | color: #f5871f; } 57 | 58 | /* a variable name */ 59 | .var { 60 | color: #c82829; } 61 | 62 | /* a function name */ 63 | .fun { 64 | color: #4271ae; } } 65 | /* Use higher contrast and text-weight for printable form. */ 66 | @media print, projection { 67 | .str { 68 | color: #060; } 69 | 70 | .kwd { 71 | color: #006; 72 | font-weight: bold; } 73 | 74 | .com { 75 | color: #600; 76 | font-style: italic; } 77 | 78 | .typ { 79 | color: #404; 80 | font-weight: bold; } 81 | 82 | .lit { 83 | color: #044; } 84 | 85 | .pun, .opn, .clo { 86 | color: #440; } 87 | 88 | .tag { 89 | color: #006; 90 | font-weight: bold; } 91 | 92 | .atn { 93 | color: #404; } 94 | 95 | .atv { 96 | color: #060; } } 97 | /* Style */ 98 | /* 99 | pre.prettyprint { 100 | background: white; 101 | font-family: Menlo, Monaco, Consolas, monospace; 102 | font-size: 12px; 103 | line-height: 1.5; 104 | border: 1px solid #ccc; 105 | padding: 10px; } 106 | */ 107 | 108 | /* Specify class=linenums on a pre to get line numbering */ 109 | ol.linenums { 110 | margin-top: 0; 111 | margin-bottom: 0; } 112 | 113 | /* IE indents via margin-left */ 114 | li.L0, 115 | li.L1, 116 | li.L2, 117 | li.L3, 118 | li.L4, 119 | li.L5, 120 | li.L6, 121 | li.L7, 122 | li.L8, 123 | li.L9 { 124 | /* */ } 125 | 126 | /* Alternate shading for lines */ 127 | li.L1, 128 | li.L3, 129 | li.L5, 130 | li.L7, 131 | li.L9 { 132 | /* */ } 133 | -------------------------------------------------------------------------------- /docs/NaiveBayesClassifier/0.1.0/scripts/toc.js: -------------------------------------------------------------------------------- 1 | (function($) { 2 | $.fn.toc = function(options) { 3 | var self = this; 4 | var opts = $.extend({}, jQuery.fn.toc.defaults, options); 5 | 6 | var container = $(opts.container); 7 | var headings = $(opts.selectors, container); 8 | var headingOffsets = []; 9 | var activeClassName = opts.prefix+'-active'; 10 | 11 | var scrollTo = function(e) { 12 | if (opts.smoothScrolling) { 13 | e.preventDefault(); 14 | var elScrollTo = $(e.target).attr('href'); 15 | var $el = $(elScrollTo); 16 | 17 | $('body,html').animate({ scrollTop: $el.offset().top }, 400, 'swing', function() { 18 | location.hash = elScrollTo; 19 | }); 20 | } 21 | $('li', self).removeClass(activeClassName); 22 | $(e.target).parent().addClass(activeClassName); 23 | }; 24 | 25 | //highlight on scroll 26 | var timeout; 27 | var highlightOnScroll = function(e) { 28 | if (timeout) { 29 | clearTimeout(timeout); 30 | } 31 | timeout = setTimeout(function() { 32 | var top = $(window).scrollTop(), 33 | highlighted; 34 | for (var i = 0, c = headingOffsets.length; i < c; i++) { 35 | if (headingOffsets[i] >= top) { 36 | $('li', self).removeClass(activeClassName); 37 | highlighted = $('li:eq('+(i-1)+')', self).addClass(activeClassName); 38 | opts.onHighlight(highlighted); 39 | break; 40 | } 41 | } 42 | }, 50); 43 | }; 44 | if (opts.highlightOnScroll) { 45 | $(window).bind('scroll', highlightOnScroll); 46 | highlightOnScroll(); 47 | } 48 | 49 | return this.each(function() { 50 | //build TOC 51 | var el = $(this); 52 | var ul = $('