搜索
人大经济论坛 附件下载

附件下载

所在主题:
文件名:  naive-bayes-master.zip
资料下载链接地址: https://bbs.pinggu.org/a-2057107.html
附件大小:
  1. Methods

  2. new NaiveBayes()

  3. Constructor that takes no arguments.

  4. Example

  5. var nb = new NaiveBayes();
  6. train(trainingSet, predictions)

  7. Train the Naive Bayes model to the given training set and predictions

  8. Arguments

  9. trainingSet - A matrix of the training set.
  10. trainingLabels - An array of value for each case in the training set.
  11. Example

  12. var cases = [[6,148,72,35,0,33.6,0.627,5],
  13. [1.50,85,66.5,29,0,26.6,0.351,31],
  14. [8,183,64,0,0,23.3,0.672,32],
  15. [0.5,89,65.5,23,94,28.1,0.167,21],
  16. [0,137,40,35,168,43.1,2.288,33]];
  17. var predictions = [1, 0, 1, 0, 1];

  18. nb.train(trainingSet, predictions);
  19. predict(dataset)

  20. Predict the values of the dataset.

  21. Arguments

  22. dataset - A matrix that contains the dataset.
  23. Example

  24. var dataset = [[6,148,72,35,0,33.6,0.627,5],
  25. [1.50,85,66.5,29,0,26.6,0.351,31]];

  26. var ans = nb.predict(dataset);
  27. export()

  28. Exports the actual Naive Bayes model to an Javascript Object.

  29. load(model)

  30. Returns a new Naive Bayes Classifier with the given model.

  31. Arguments

  32. model - Javascript Object generated from export() function.
  33. Authors

  34. Jefferson Hernandez
  35. License

  36. MIT
复制代码
[hide][/hide]


    熟悉论坛请点击新手指南
下载说明
1、论坛支持迅雷和网际快车等p2p多线程软件下载,请在上面选择下载通道单击右健下载即可。
2、论坛会定期自动批量更新下载地址,所以请不要浪费时间盗链论坛资源,盗链地址会很快失效。
3、本站为非盈利性质的学术交流网站,鼓励和保护原创作品,拒绝未经版权人许可的上传行为。本站如接到版权人发出的合格侵权通知,将积极的采取必要措施;同时,本站也将在技术手段和能力范围内,履行版权保护的注意义务。
(如有侵权,欢迎举报)
二维码

扫码加我 拉你入群

请注明:姓名-公司-职位

以便审核进群资格,未注明则拒绝

GMT+8, 2026-1-19 02:07