{"id":25360189,"url":"https://github.com/iamyourdre/naive-bayes-classifier-js","last_synced_at":"2026-04-08T21:31:21.407Z","repository":{"id":190154397,"uuid":"681624057","full_name":"iamyourdre/naive-bayes-classifier-js","owner":"iamyourdre","description":"Naive Bayes classifier developed with MySQL, ExpressJS, and NodeJS by @iamyourdre.","archived":false,"fork":false,"pushed_at":"2023-08-24T07:27:54.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-04-09T02:46:41.677Z","etag":null,"topics":["backend","data","data-science","expressjs","javascript","mysql","naive-bayes","naive-bayes-algorithm","naive-bayes-classifier","nodejs"],"latest_commit_sha":null,"homepage":"","language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/iamyourdre.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2023-08-22T12:11:42.000Z","updated_at":"2023-08-24T06:10:19.000Z","dependencies_parsed_at":null,"dependency_job_id":"842ff001-4b9b-4a93-8b11-691cfff55450","html_url":"https://github.com/iamyourdre/naive-bayes-classifier-js","commit_stats":null,"previous_names":["iamyourdre/naive-bayes-classifier-js"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/iamyourdre/naive-bayes-classifier-js","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamyourdre%2Fnaive-bayes-classifier-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamyourdre%2Fnaive-bayes-classifier-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamyourdre%2Fnaive-bayes-classifier-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamyourdre%2Fnaive-bayes-classifier-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/iamyourdre","download_url":"https://codeload.github.com/iamyourdre/naive-bayes-classifier-js/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/iamyourdre%2Fnaive-bayes-classifier-js/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":31575400,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-08T14:31:17.711Z","status":"ssl_error","status_checked_at":"2026-04-08T14:31:17.202Z","response_time":54,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["backend","data","data-science","expressjs","javascript","mysql","naive-bayes","naive-bayes-algorithm","naive-bayes-classifier","nodejs"],"created_at":"2025-02-14T21:28:30.729Z","updated_at":"2026-04-08T21:31:21.379Z","avatar_url":"https://github.com/iamyourdre.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Naive Bayes Classifier JS\n\n### With Node JS, Express and MySQL\n\n![Screenshot](https://i.ibb.co/fvxH2dj/image.png)\n\n## A. How to Configure:\n\n### 1. Install Backend Prerequisite.\n\n- Move to `cd backend`\n- Run `npm i express mysql2 sequelize cors mathjs`\n\n### 2. Configure Database.\n- Set the database connection in \"backend/config/Database.js\"\n- Import \"sample.sql\" to 'naive_bayes_js' database.\n\n### 3. Run Server.\n- Check `nodemon -v`. If you have not installed yet, run `npm i -g nodemon`\n- Start backend server with `nodemon index` (Make sure your terminal path is on \"your-project/backend\")\n\n## ___________________\n\n## B. How to Use:\n- First of all, you need to calculate \"sample\" table with Naive Bayes algorithm first, then it will be summarized as \"NB_dataclass\" table. You can use Rest Client or POSTMAN. \u003cb\u003e Run it once\u003c/b\u003e.\n```\nPOST http://localhost:5000/CreateNaiveBayesDataset\nContent-Type: application/json\n```\n- Then, \u003cb\u003eput your input on x1, x2, x3, and x4 and run it\u003c/b\u003e. It will classify the genre from your input. \n```\nPOST http://localhost:5000/NaiveBayesClassifier\nContent-Type: application/json\n\n{\n    \"x1\": 30, \"x2\": 922001, \"x3\": 3631, \"x4\": 3726\n}\n```\nAfter process completed, the output will be like this:\n```\n{\n  \"msg\": \"Calculation Completed! Your input is classified as:\",\n  \"result\": [\n    {\n      \"genreIs\": \"Hardrock\",\n      \"probability\": 0.024855977439682212\n    }\n  ]\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamyourdre%2Fnaive-bayes-classifier-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fiamyourdre%2Fnaive-bayes-classifier-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fiamyourdre%2Fnaive-bayes-classifier-js/lists"}