nlptoolkit-classification 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (412) hide show
  1. package/README.md +161 -0
  2. package/datasets/bupa.data +345 -0
  3. package/datasets/car.data +1728 -0
  4. package/datasets/chess.data +28056 -0
  5. package/datasets/dermatology.data +366 -0
  6. package/datasets/iris.data +150 -0
  7. package/datasets/nursery.data +12960 -0
  8. package/datasets/tictactoe.data +958 -0
  9. package/dist/Attribute/Attribute.d.ts +4 -0
  10. package/dist/Attribute/Attribute.js +17 -0
  11. package/dist/Attribute/Attribute.js.map +1 -0
  12. package/dist/Attribute/AttributeType.d.ts +18 -0
  13. package/dist/Attribute/AttributeType.js +33 -0
  14. package/dist/Attribute/AttributeType.js.map +1 -0
  15. package/dist/Attribute/BinaryAttribute.d.ts +9 -0
  16. package/dist/Attribute/BinaryAttribute.js +26 -0
  17. package/dist/Attribute/BinaryAttribute.js.map +1 -0
  18. package/dist/Attribute/ContinuousAttribute.d.ts +30 -0
  19. package/dist/Attribute/ContinuousAttribute.js +59 -0
  20. package/dist/Attribute/ContinuousAttribute.js.map +1 -0
  21. package/dist/Attribute/DiscreteAttribute.d.ts +24 -0
  22. package/dist/Attribute/DiscreteAttribute.js +53 -0
  23. package/dist/Attribute/DiscreteAttribute.js.map +1 -0
  24. package/dist/Attribute/DiscreteIndexedAttribute.d.ts +27 -0
  25. package/dist/Attribute/DiscreteIndexedAttribute.js +61 -0
  26. package/dist/Attribute/DiscreteIndexedAttribute.js.map +1 -0
  27. package/dist/Classifier/Bagging.d.ts +16 -0
  28. package/dist/Classifier/Bagging.js +42 -0
  29. package/dist/Classifier/Bagging.js.map +1 -0
  30. package/dist/Classifier/C45.d.ts +13 -0
  31. package/dist/Classifier/C45.js +40 -0
  32. package/dist/Classifier/C45.js.map +1 -0
  33. package/dist/Classifier/C45Stump.d.ts +12 -0
  34. package/dist/Classifier/C45Stump.js +29 -0
  35. package/dist/Classifier/C45Stump.js.map +1 -0
  36. package/dist/Classifier/Classifier.d.ts +39 -0
  37. package/dist/Classifier/Classifier.js +72 -0
  38. package/dist/Classifier/Classifier.js.map +1 -0
  39. package/dist/Classifier/DeepNetwork.d.ts +13 -0
  40. package/dist/Classifier/DeepNetwork.js +31 -0
  41. package/dist/Classifier/DeepNetwork.js.map +1 -0
  42. package/dist/Classifier/Dummy.d.ts +13 -0
  43. package/dist/Classifier/Dummy.js +29 -0
  44. package/dist/Classifier/Dummy.js.map +1 -0
  45. package/dist/Classifier/KMeans.d.ts +12 -0
  46. package/dist/Classifier/KMeans.js +36 -0
  47. package/dist/Classifier/KMeans.js.map +1 -0
  48. package/dist/Classifier/Knn.d.ts +13 -0
  49. package/dist/Classifier/Knn.js +29 -0
  50. package/dist/Classifier/Knn.js.map +1 -0
  51. package/dist/Classifier/Lda.d.ts +12 -0
  52. package/dist/Classifier/Lda.js +52 -0
  53. package/dist/Classifier/Lda.js.map +1 -0
  54. package/dist/Classifier/LinearPerceptron.d.ts +14 -0
  55. package/dist/Classifier/LinearPerceptron.js +32 -0
  56. package/dist/Classifier/LinearPerceptron.js.map +1 -0
  57. package/dist/Classifier/MultiLayerPerceptron.d.ts +14 -0
  58. package/dist/Classifier/MultiLayerPerceptron.js +32 -0
  59. package/dist/Classifier/MultiLayerPerceptron.js.map +1 -0
  60. package/dist/Classifier/NaiveBayes.d.ts +25 -0
  61. package/dist/Classifier/NaiveBayes.js +67 -0
  62. package/dist/Classifier/NaiveBayes.js.map +1 -0
  63. package/dist/Classifier/Qda.d.ts +12 -0
  64. package/dist/Classifier/Qda.js +50 -0
  65. package/dist/Classifier/Qda.js.map +1 -0
  66. package/dist/Classifier/RandomClassifier.d.ts +12 -0
  67. package/dist/Classifier/RandomClassifier.js +32 -0
  68. package/dist/Classifier/RandomClassifier.js.map +1 -0
  69. package/dist/Classifier/RandomForest.d.ts +13 -0
  70. package/dist/Classifier/RandomForest.js +39 -0
  71. package/dist/Classifier/RandomForest.js.map +1 -0
  72. package/dist/DataSet/DataDefinition.d.ts +59 -0
  73. package/dist/DataSet/DataDefinition.js +108 -0
  74. package/dist/DataSet/DataDefinition.js.map +1 -0
  75. package/dist/DataSet/DataSet.d.ts +111 -0
  76. package/dist/DataSet/DataSet.js +286 -0
  77. package/dist/DataSet/DataSet.js.map +1 -0
  78. package/dist/DistanceMetric/DistanceMetric.d.ts +4 -0
  79. package/dist/DistanceMetric/DistanceMetric.js +13 -0
  80. package/dist/DistanceMetric/DistanceMetric.js.map +1 -0
  81. package/dist/DistanceMetric/EuclidianDistance.d.ts +13 -0
  82. package/dist/DistanceMetric/EuclidianDistance.js +43 -0
  83. package/dist/DistanceMetric/EuclidianDistance.js.map +1 -0
  84. package/dist/DistanceMetric/MahalanobisDistance.d.ts +20 -0
  85. package/dist/DistanceMetric/MahalanobisDistance.js +39 -0
  86. package/dist/DistanceMetric/MahalanobisDistance.js.map +1 -0
  87. package/dist/Experiment/BootstrapRun.d.ts +19 -0
  88. package/dist/Experiment/BootstrapRun.js +44 -0
  89. package/dist/Experiment/BootstrapRun.js.map +1 -0
  90. package/dist/Experiment/Experiment.d.ts +37 -0
  91. package/dist/Experiment/Experiment.js +57 -0
  92. package/dist/Experiment/Experiment.js.map +1 -0
  93. package/dist/Experiment/KFoldRun.d.ts +19 -0
  94. package/dist/Experiment/KFoldRun.js +43 -0
  95. package/dist/Experiment/KFoldRun.js.map +1 -0
  96. package/dist/Experiment/KFoldRunSeparateTest.d.ts +24 -0
  97. package/dist/Experiment/KFoldRunSeparateTest.js +51 -0
  98. package/dist/Experiment/KFoldRunSeparateTest.js.map +1 -0
  99. package/dist/Experiment/MultipleRun.d.ts +5 -0
  100. package/dist/Experiment/MultipleRun.js +13 -0
  101. package/dist/Experiment/MultipleRun.js.map +1 -0
  102. package/dist/Experiment/MxKFoldRun.d.ts +20 -0
  103. package/dist/Experiment/MxKFoldRun.js +44 -0
  104. package/dist/Experiment/MxKFoldRun.js.map +1 -0
  105. package/dist/Experiment/MxKFoldRunSeparateTest.d.ts +21 -0
  106. package/dist/Experiment/MxKFoldRunSeparateTest.js +48 -0
  107. package/dist/Experiment/MxKFoldRunSeparateTest.js.map +1 -0
  108. package/dist/Experiment/SingleRun.d.ts +5 -0
  109. package/dist/Experiment/SingleRun.js +13 -0
  110. package/dist/Experiment/SingleRun.js.map +1 -0
  111. package/dist/Experiment/SingleRunWithK.d.ts +19 -0
  112. package/dist/Experiment/SingleRunWithK.js +37 -0
  113. package/dist/Experiment/SingleRunWithK.js.map +1 -0
  114. package/dist/Experiment/StratifiedKFoldRun.d.ts +17 -0
  115. package/dist/Experiment/StratifiedKFoldRun.js +39 -0
  116. package/dist/Experiment/StratifiedKFoldRun.js.map +1 -0
  117. package/dist/Experiment/StratifiedKFoldRunSeparateTest.d.ts +18 -0
  118. package/dist/Experiment/StratifiedKFoldRunSeparateTest.js +43 -0
  119. package/dist/Experiment/StratifiedKFoldRunSeparateTest.js.map +1 -0
  120. package/dist/Experiment/StratifiedMxKFoldRun.d.ts +19 -0
  121. package/dist/Experiment/StratifiedMxKFoldRun.js +43 -0
  122. package/dist/Experiment/StratifiedMxKFoldRun.js.map +1 -0
  123. package/dist/Experiment/StratifiedMxKFoldRunSeparateTest.d.ts +20 -0
  124. package/dist/Experiment/StratifiedMxKFoldRunSeparateTest.js +47 -0
  125. package/dist/Experiment/StratifiedMxKFoldRunSeparateTest.js.map +1 -0
  126. package/dist/Experiment/StratifiedSingleRunWithK.d.ts +18 -0
  127. package/dist/Experiment/StratifiedSingleRunWithK.js +39 -0
  128. package/dist/Experiment/StratifiedSingleRunWithK.js.map +1 -0
  129. package/dist/FeatureSelection/BackwardSelection.d.ts +18 -0
  130. package/dist/FeatureSelection/BackwardSelection.js +39 -0
  131. package/dist/FeatureSelection/BackwardSelection.js.map +1 -0
  132. package/dist/FeatureSelection/FeatureSubSet.d.ts +47 -0
  133. package/dist/FeatureSelection/FeatureSubSet.js +89 -0
  134. package/dist/FeatureSelection/FeatureSubSet.js.map +1 -0
  135. package/dist/FeatureSelection/FloatingSelection.d.ts +16 -0
  136. package/dist/FeatureSelection/FloatingSelection.js +38 -0
  137. package/dist/FeatureSelection/FloatingSelection.js.map +1 -0
  138. package/dist/FeatureSelection/ForwardSelection.d.ts +17 -0
  139. package/dist/FeatureSelection/ForwardSelection.js +38 -0
  140. package/dist/FeatureSelection/ForwardSelection.js.map +1 -0
  141. package/dist/FeatureSelection/SubSetSelection.d.ts +37 -0
  142. package/dist/FeatureSelection/SubSetSelection.js +90 -0
  143. package/dist/FeatureSelection/SubSetSelection.js.map +1 -0
  144. package/dist/Filter/DiscreteToContinuous.d.ts +25 -0
  145. package/dist/Filter/DiscreteToContinuous.js +69 -0
  146. package/dist/Filter/DiscreteToContinuous.js.map +1 -0
  147. package/dist/Filter/DiscreteToIndexed.d.ts +21 -0
  148. package/dist/Filter/DiscreteToIndexed.js +56 -0
  149. package/dist/Filter/DiscreteToIndexed.js.map +1 -0
  150. package/dist/Filter/FeatureFilter.d.ts +18 -0
  151. package/dist/Filter/FeatureFilter.js +36 -0
  152. package/dist/Filter/FeatureFilter.js.map +1 -0
  153. package/dist/Filter/LaryFilter.d.ts +27 -0
  154. package/dist/Filter/LaryFilter.js +62 -0
  155. package/dist/Filter/LaryFilter.js.map +1 -0
  156. package/dist/Filter/LaryToBinary.d.ts +23 -0
  157. package/dist/Filter/LaryToBinary.js +67 -0
  158. package/dist/Filter/LaryToBinary.js.map +1 -0
  159. package/dist/Filter/Normalize.d.ts +21 -0
  160. package/dist/Filter/Normalize.js +47 -0
  161. package/dist/Filter/Normalize.js.map +1 -0
  162. package/dist/Filter/Pca.d.ts +44 -0
  163. package/dist/Filter/Pca.js +109 -0
  164. package/dist/Filter/Pca.js.map +1 -0
  165. package/dist/Filter/TrainedFeatureFilter.d.ts +11 -0
  166. package/dist/Filter/TrainedFeatureFilter.js +26 -0
  167. package/dist/Filter/TrainedFeatureFilter.js.map +1 -0
  168. package/dist/Instance/CompositeInstance.d.ts +32 -0
  169. package/dist/Instance/CompositeInstance.js +61 -0
  170. package/dist/Instance/CompositeInstance.js.map +1 -0
  171. package/dist/Instance/Instance.d.ts +89 -0
  172. package/dist/Instance/Instance.js +170 -0
  173. package/dist/Instance/Instance.js.map +1 -0
  174. package/dist/InstanceList/InstanceList.d.ts +188 -0
  175. package/dist/InstanceList/InstanceList.js +517 -0
  176. package/dist/InstanceList/InstanceList.js.map +1 -0
  177. package/dist/InstanceList/InstanceListOfSameClass.d.ts +16 -0
  178. package/dist/InstanceList/InstanceListOfSameClass.js +35 -0
  179. package/dist/InstanceList/InstanceListOfSameClass.js.map +1 -0
  180. package/dist/InstanceList/Partition.d.ts +31 -0
  181. package/dist/InstanceList/Partition.js +143 -0
  182. package/dist/InstanceList/Partition.js.map +1 -0
  183. package/dist/Model/DecisionTree/DecisionCondition.d.ts +34 -0
  184. package/dist/Model/DecisionTree/DecisionCondition.js +84 -0
  185. package/dist/Model/DecisionTree/DecisionCondition.js.map +1 -0
  186. package/dist/Model/DecisionTree/DecisionNode.d.ts +82 -0
  187. package/dist/Model/DecisionTree/DecisionNode.js +271 -0
  188. package/dist/Model/DecisionTree/DecisionNode.js.map +1 -0
  189. package/dist/Model/DecisionTree/DecisionTree.d.ts +37 -0
  190. package/dist/Model/DecisionTree/DecisionTree.js +75 -0
  191. package/dist/Model/DecisionTree/DecisionTree.js.map +1 -0
  192. package/dist/Model/DeepNetworkModel.d.ts +42 -0
  193. package/dist/Model/DeepNetworkModel.js +163 -0
  194. package/dist/Model/DeepNetworkModel.js.map +1 -0
  195. package/dist/Model/DummyModel.d.ts +20 -0
  196. package/dist/Model/DummyModel.js +46 -0
  197. package/dist/Model/DummyModel.js.map +1 -0
  198. package/dist/Model/GaussianModel.d.ts +24 -0
  199. package/dist/Model/GaussianModel.js +59 -0
  200. package/dist/Model/GaussianModel.js.map +1 -0
  201. package/dist/Model/KMeansModel.d.ts +27 -0
  202. package/dist/Model/KMeansModel.js +48 -0
  203. package/dist/Model/KMeansModel.js.map +1 -0
  204. package/dist/Model/KnnInstance.d.ts +14 -0
  205. package/dist/Model/KnnInstance.js +33 -0
  206. package/dist/Model/KnnInstance.js.map +1 -0
  207. package/dist/Model/KnnModel.d.ts +36 -0
  208. package/dist/Model/KnnModel.js +83 -0
  209. package/dist/Model/KnnModel.js.map +1 -0
  210. package/dist/Model/LdaModel.d.ts +25 -0
  211. package/dist/Model/LdaModel.js +45 -0
  212. package/dist/Model/LdaModel.js.map +1 -0
  213. package/dist/Model/LinearPerceptronModel.d.ts +21 -0
  214. package/dist/Model/LinearPerceptronModel.js +62 -0
  215. package/dist/Model/LinearPerceptronModel.js.map +1 -0
  216. package/dist/Model/Model.d.ts +12 -0
  217. package/dist/Model/Model.js +31 -0
  218. package/dist/Model/Model.js.map +1 -0
  219. package/dist/Model/MultiLayerPerceptronModel.d.ts +29 -0
  220. package/dist/Model/MultiLayerPerceptronModel.js +101 -0
  221. package/dist/Model/MultiLayerPerceptronModel.js.map +1 -0
  222. package/dist/Model/NaiveBayesModel.d.ts +47 -0
  223. package/dist/Model/NaiveBayesModel.js +95 -0
  224. package/dist/Model/NaiveBayesModel.js.map +1 -0
  225. package/dist/Model/NeuralNetworkModel.d.ts +99 -0
  226. package/dist/Model/NeuralNetworkModel.js +180 -0
  227. package/dist/Model/NeuralNetworkModel.js.map +1 -0
  228. package/dist/Model/QdaModel.d.ts +26 -0
  229. package/dist/Model/QdaModel.js +45 -0
  230. package/dist/Model/QdaModel.js.map +1 -0
  231. package/dist/Model/RandomModel.d.ts +16 -0
  232. package/dist/Model/RandomModel.js +51 -0
  233. package/dist/Model/RandomModel.js.map +1 -0
  234. package/dist/Model/TreeEnsembleModel.d.ts +21 -0
  235. package/dist/Model/TreeEnsembleModel.js +49 -0
  236. package/dist/Model/TreeEnsembleModel.js.map +1 -0
  237. package/dist/Model/ValidatedModel.d.ts +12 -0
  238. package/dist/Model/ValidatedModel.js +35 -0
  239. package/dist/Model/ValidatedModel.js.map +1 -0
  240. package/dist/Parameter/ActivationFunction.d.ts +5 -0
  241. package/dist/Parameter/ActivationFunction.js +20 -0
  242. package/dist/Parameter/ActivationFunction.js.map +1 -0
  243. package/dist/Parameter/BaggingParameter.d.ts +17 -0
  244. package/dist/Parameter/BaggingParameter.js +36 -0
  245. package/dist/Parameter/BaggingParameter.js.map +1 -0
  246. package/dist/Parameter/C45Parameter.d.ts +25 -0
  247. package/dist/Parameter/C45Parameter.js +46 -0
  248. package/dist/Parameter/C45Parameter.js.map +1 -0
  249. package/dist/Parameter/DeepNetworkParameter.d.ts +38 -0
  250. package/dist/Parameter/DeepNetworkParameter.js +60 -0
  251. package/dist/Parameter/DeepNetworkParameter.js.map +1 -0
  252. package/dist/Parameter/KMeansParameter.d.ts +18 -0
  253. package/dist/Parameter/KMeansParameter.js +42 -0
  254. package/dist/Parameter/KMeansParameter.js.map +1 -0
  255. package/dist/Parameter/KnnParameter.d.ts +19 -0
  256. package/dist/Parameter/KnnParameter.js +37 -0
  257. package/dist/Parameter/KnnParameter.js.map +1 -0
  258. package/dist/Parameter/LinearPerceptronParameter.d.ts +41 -0
  259. package/dist/Parameter/LinearPerceptronParameter.js +66 -0
  260. package/dist/Parameter/LinearPerceptronParameter.js.map +1 -0
  261. package/dist/Parameter/MultiLayerPerceptronParameter.d.ts +30 -0
  262. package/dist/Parameter/MultiLayerPerceptronParameter.js +50 -0
  263. package/dist/Parameter/MultiLayerPerceptronParameter.js.map +1 -0
  264. package/dist/Parameter/Parameter.d.ts +15 -0
  265. package/dist/Parameter/Parameter.js +33 -0
  266. package/dist/Parameter/Parameter.js.map +1 -0
  267. package/dist/Parameter/RandomForestParameter.d.ts +18 -0
  268. package/dist/Parameter/RandomForestParameter.js +37 -0
  269. package/dist/Parameter/RandomForestParameter.js.map +1 -0
  270. package/dist/Performance/ClassificationPerformance.d.ts +17 -0
  271. package/dist/Performance/ClassificationPerformance.js +36 -0
  272. package/dist/Performance/ClassificationPerformance.js.map +1 -0
  273. package/dist/Performance/ConfusionMatrix.d.ts +81 -0
  274. package/dist/Performance/ConfusionMatrix.js +178 -0
  275. package/dist/Performance/ConfusionMatrix.js.map +1 -0
  276. package/dist/Performance/DetailedClassificationPerformance.d.ts +17 -0
  277. package/dist/Performance/DetailedClassificationPerformance.js +35 -0
  278. package/dist/Performance/DetailedClassificationPerformance.js.map +1 -0
  279. package/dist/Performance/ExperimentPerformance.d.ts +88 -0
  280. package/dist/Performance/ExperimentPerformance.js +176 -0
  281. package/dist/Performance/ExperimentPerformance.js.map +1 -0
  282. package/dist/Performance/Performance.d.ts +15 -0
  283. package/dist/Performance/Performance.js +33 -0
  284. package/dist/Performance/Performance.js.map +1 -0
  285. package/dist/StatisticalTest/Combined5x2F.d.ts +7 -0
  286. package/dist/StatisticalTest/Combined5x2F.js +43 -0
  287. package/dist/StatisticalTest/Combined5x2F.js.map +1 -0
  288. package/dist/StatisticalTest/Combined5x2t.d.ts +7 -0
  289. package/dist/StatisticalTest/Combined5x2t.js +43 -0
  290. package/dist/StatisticalTest/Combined5x2t.js.map +1 -0
  291. package/dist/StatisticalTest/Paired5x2t.d.ts +7 -0
  292. package/dist/StatisticalTest/Paired5x2t.js +42 -0
  293. package/dist/StatisticalTest/Paired5x2t.js.map +1 -0
  294. package/dist/StatisticalTest/PairedTest.d.ts +6 -0
  295. package/dist/StatisticalTest/PairedTest.js +35 -0
  296. package/dist/StatisticalTest/PairedTest.js.map +1 -0
  297. package/dist/StatisticalTest/Pairedt.d.ts +7 -0
  298. package/dist/StatisticalTest/Pairedt.js +40 -0
  299. package/dist/StatisticalTest/Pairedt.js.map +1 -0
  300. package/dist/StatisticalTest/Sign.d.ts +8 -0
  301. package/dist/StatisticalTest/Sign.js +52 -0
  302. package/dist/StatisticalTest/Sign.js.map +1 -0
  303. package/dist/StatisticalTest/StatisticalTestResult.d.ts +9 -0
  304. package/dist/StatisticalTest/StatisticalTestResult.js +53 -0
  305. package/dist/StatisticalTest/StatisticalTestResult.js.map +1 -0
  306. package/dist/StatisticalTest/StatisticalTestResultType.d.ts +7 -0
  307. package/dist/StatisticalTest/StatisticalTestResultType.js +22 -0
  308. package/dist/StatisticalTest/StatisticalTestResultType.js.map +1 -0
  309. package/index.js +100 -0
  310. package/package.json +30 -0
  311. package/source/Attribute/Attribute.ts +6 -0
  312. package/source/Attribute/AttributeType.ts +18 -0
  313. package/source/Attribute/BinaryAttribute.ts +14 -0
  314. package/source/Attribute/ContinuousAttribute.ts +53 -0
  315. package/source/Attribute/DiscreteAttribute.ts +46 -0
  316. package/source/Attribute/DiscreteIndexedAttribute.ts +54 -0
  317. package/source/Classifier/Bagging.ts +32 -0
  318. package/source/Classifier/C45.ts +30 -0
  319. package/source/Classifier/C45Stump.ts +19 -0
  320. package/source/Classifier/Classifier.ts +71 -0
  321. package/source/Classifier/DeepNetwork.ts +22 -0
  322. package/source/Classifier/Dummy.ts +19 -0
  323. package/source/Classifier/KMeans.ts +26 -0
  324. package/source/Classifier/Knn.ts +21 -0
  325. package/source/Classifier/Lda.ts +43 -0
  326. package/source/Classifier/LinearPerceptron.ts +23 -0
  327. package/source/Classifier/MultiLayerPerceptron.ts +23 -0
  328. package/source/Classifier/NaiveBayes.ts +62 -0
  329. package/source/Classifier/Qda.ts +42 -0
  330. package/source/Classifier/RandomClassifier.ts +22 -0
  331. package/source/Classifier/RandomForest.ts +29 -0
  332. package/source/DataSet/DataDefinition.ts +106 -0
  333. package/source/DataSet/DataSet.ts +279 -0
  334. package/source/DistanceMetric/DistanceMetric.ts +6 -0
  335. package/source/DistanceMetric/EuclidianDistance.ts +32 -0
  336. package/source/DistanceMetric/MahalanobisDistance.ts +33 -0
  337. package/source/Experiment/BootstrapRun.ts +37 -0
  338. package/source/Experiment/Experiment.ts +57 -0
  339. package/source/Experiment/KFoldRun.ts +44 -0
  340. package/source/Experiment/KFoldRunSeparateTest.ts +50 -0
  341. package/source/Experiment/MultipleRun.ts +7 -0
  342. package/source/Experiment/MxKFoldRun.ts +37 -0
  343. package/source/Experiment/MxKFoldRunSeparateTest.ts +40 -0
  344. package/source/Experiment/SingleRun.ts +7 -0
  345. package/source/Experiment/SingleRunWithK.ts +39 -0
  346. package/source/Experiment/StratifiedKFoldRun.ts +30 -0
  347. package/source/Experiment/StratifiedKFoldRunSeparateTest.ts +33 -0
  348. package/source/Experiment/StratifiedMxKFoldRun.ts +34 -0
  349. package/source/Experiment/StratifiedMxKFoldRunSeparateTest.ts +40 -0
  350. package/source/Experiment/StratifiedSingleRunWithK.ts +33 -0
  351. package/source/FeatureSelection/BackwardSelection.ts +28 -0
  352. package/source/FeatureSelection/FeatureSubSet.ts +82 -0
  353. package/source/FeatureSelection/FloatingSelection.ts +27 -0
  354. package/source/FeatureSelection/ForwardSelection.ts +27 -0
  355. package/source/FeatureSelection/SubSetSelection.ts +88 -0
  356. package/source/Filter/DiscreteToContinuous.ts +59 -0
  357. package/source/Filter/DiscreteToIndexed.ts +48 -0
  358. package/source/Filter/FeatureFilter.ts +31 -0
  359. package/source/Filter/LaryFilter.ts +54 -0
  360. package/source/Filter/LaryToBinary.ts +57 -0
  361. package/source/Filter/Normalize.ts +42 -0
  362. package/source/Filter/Pca.ts +104 -0
  363. package/source/Filter/TrainedFeatureFilter.ts +17 -0
  364. package/source/Instance/CompositeInstance.ts +53 -0
  365. package/source/Instance/Instance.ts +170 -0
  366. package/source/InstanceList/InstanceList.ts +519 -0
  367. package/source/InstanceList/InstanceListOfSameClass.ts +25 -0
  368. package/source/InstanceList/Partition.ts +131 -0
  369. package/source/Model/DecisionTree/DecisionCondition.ts +74 -0
  370. package/source/Model/DecisionTree/DecisionNode.ts +257 -0
  371. package/source/Model/DecisionTree/DecisionTree.ts +71 -0
  372. package/source/Model/DeepNetworkModel.ts +156 -0
  373. package/source/Model/DummyModel.ts +40 -0
  374. package/source/Model/GaussianModel.ts +58 -0
  375. package/source/Model/KMeansModel.ts +44 -0
  376. package/source/Model/KnnInstance.ts +27 -0
  377. package/source/Model/KnnModel.ts +78 -0
  378. package/source/Model/LdaModel.ts +39 -0
  379. package/source/Model/LinearPerceptronModel.ts +55 -0
  380. package/source/Model/Model.ts +22 -0
  381. package/source/Model/MultiLayerPerceptronModel.ts +95 -0
  382. package/source/Model/NaiveBayesModel.ts +89 -0
  383. package/source/Model/NeuralNetworkModel.ts +187 -0
  384. package/source/Model/QdaModel.ts +39 -0
  385. package/source/Model/RandomModel.ts +44 -0
  386. package/source/Model/TreeEnsembleModel.ts +43 -0
  387. package/source/Model/ValidatedModel.ts +23 -0
  388. package/source/Parameter/ActivationFunction.ts +3 -0
  389. package/source/Parameter/BaggingParameter.ts +26 -0
  390. package/source/Parameter/C45Parameter.ts +38 -0
  391. package/source/Parameter/DeepNetworkParameter.ts +59 -0
  392. package/source/Parameter/KMeansParameter.ts +33 -0
  393. package/source/Parameter/KnnParameter.ts +28 -0
  394. package/source/Parameter/LinearPerceptronParameter.ts +66 -0
  395. package/source/Parameter/MultiLayerPerceptronParameter.ts +49 -0
  396. package/source/Parameter/Parameter.ts +22 -0
  397. package/source/Parameter/RandomForestParameter.ts +27 -0
  398. package/source/Performance/ClassificationPerformance.ts +26 -0
  399. package/source/Performance/ConfusionMatrix.ts +175 -0
  400. package/source/Performance/DetailedClassificationPerformance.ts +26 -0
  401. package/source/Performance/ExperimentPerformance.ts +175 -0
  402. package/source/Performance/Performance.ts +22 -0
  403. package/source/StatisticalTest/Combined5x2F.ts +33 -0
  404. package/source/StatisticalTest/Combined5x2t.ts +33 -0
  405. package/source/StatisticalTest/Paired5x2t.ts +32 -0
  406. package/source/StatisticalTest/PairedTest.ts +24 -0
  407. package/source/StatisticalTest/Pairedt.ts +30 -0
  408. package/source/StatisticalTest/Sign.ts +41 -0
  409. package/source/StatisticalTest/StatisticalTestResult.ts +42 -0
  410. package/source/StatisticalTest/StatisticalTestResultType.ts +6 -0
  411. package/source/tsconfig.json +13 -0
  412. package/tsconfig.json +15 -0
@@ -0,0 +1,36 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Performance"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ClassificationPerformance = void 0;
13
+ const Performance_1 = require("./Performance");
14
+ class ClassificationPerformance extends Performance_1.Performance {
15
+ /**
16
+ * A constructor that sets the accuracy and errorRate via given input.
17
+ *
18
+ * @param accuracy Double value input.
19
+ * @param errorRate Double value input.
20
+ */
21
+ constructor(accuracy, errorRate) {
22
+ super(errorRate == undefined ? 1 - accuracy : errorRate);
23
+ this.accuracy = accuracy;
24
+ }
25
+ /**
26
+ * Accessor for the accuracy.
27
+ *
28
+ * @return Accuracy value.
29
+ */
30
+ getAccuracy() {
31
+ return this.accuracy;
32
+ }
33
+ }
34
+ exports.ClassificationPerformance = ClassificationPerformance;
35
+ });
36
+ //# sourceMappingURL=ClassificationPerformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ClassificationPerformance.js","sourceRoot":"","sources":["../../source/Performance/ClassificationPerformance.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,+CAA0C;IAE1C,MAAa,yBAA0B,SAAQ,yBAAW;QAItD;;;;;WAKG;QACH,YAAY,QAAgB,EAAE,SAAkB;YAC5C,KAAK,CAAC,SAAS,IAAI,SAAS,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC;YACzD,IAAI,CAAC,QAAQ,GAAG,QAAQ,CAAA;QAC5B,CAAC;QAED;;;;WAIG;QACH,WAAW;YACP,OAAO,IAAI,CAAC,QAAQ,CAAA;QACxB,CAAC;KACJ;IAvBD,8DAuBC"}
@@ -0,0 +1,81 @@
1
+ export declare class ConfusionMatrix {
2
+ private matrix;
3
+ private classLabels;
4
+ /**
5
+ * Constructor that sets the class labels {@link Array} and creates new {@link Map} matrix
6
+ *
7
+ * @param classLabels {@link ArrayList} of String.
8
+ */
9
+ constructor(classLabels: Array<string>);
10
+ /**
11
+ * The classify method takes two Strings; actual class and predicted class as inputs. If the matrix {@link Map} contains
12
+ * given actual class String as a key, it then assigns the corresponding object of that key to a {@link CounterHashMap}, if not
13
+ * it creates a new {@link CounterHashMap}. Then, it puts the given predicted class String to the counterHashMap and
14
+ * also put this counterHashMap to the matrix {@link Map} together with the given actual class String.
15
+ *
16
+ * @param actualClass String input actual class.
17
+ * @param predictedClass String input predicted class.
18
+ */
19
+ classify(actualClass: string, predictedClass: string): void;
20
+ /**
21
+ * The addConfusionMatrix method takes a {@link ConfusionMatrix} as an input and loops through actual classes of that {@link Map}
22
+ * and initially gets one row at a time. Then it puts the current row to the matrix {@link Map} together with the actual class string.
23
+ *
24
+ * @param confusionMatrix {@link ConfusionMatrix} input.
25
+ */
26
+ addConfusionMatrix(confusionMatrix: ConfusionMatrix): void;
27
+ /**
28
+ * The sumOfElements method loops through the keys in matrix {@link Map} and returns the summation of all the values of the keys.
29
+ * I.e: TP+TN+FP+FN.
30
+ *
31
+ * @return The summation of values.
32
+ */
33
+ private sumOfElements;
34
+ /**
35
+ * The trace method loops through the keys in matrix {@link Map} and if the current key contains the actual key,
36
+ * it accumulates the corresponding values. I.e: TP+TN.
37
+ *
38
+ * @return Summation of values.
39
+ */
40
+ private trace;
41
+ /**
42
+ * The columnSum method takes a String predicted class as input, and loops through the keys in matrix {@link HashMap}.
43
+ * If the current key contains the predicted class String, it accumulates the corresponding values. I.e: TP+FP.
44
+ *
45
+ * @param predictedClass String input predicted class.
46
+ * @return Summation of values.
47
+ */
48
+ private columnSum;
49
+ /**
50
+ * The getAccuracy method returns the result of TP+TN / TP+TN+FP+FN
51
+ *
52
+ * @return the result of TP+TN / TP+TN+FP+FN
53
+ */
54
+ getAccuracy(): number;
55
+ /**
56
+ * The precision method loops through the class labels and returns the resulting Array which has the result of TP/FP+TP.
57
+ *
58
+ * @return The result of TP/FP+TP.
59
+ */
60
+ precision(): Array<number>;
61
+ /**
62
+ * The recall method loops through the class labels and returns the resulting Array which has the result of TP/FN+TP.
63
+ *
64
+ * @return The result of TP/FN+TP.
65
+ */
66
+ recall(): Array<number>;
67
+ /**
68
+ * The fMeasure method loops through the class labels and returns the resulting Array which has the average of
69
+ * recall and precision.
70
+ *
71
+ * @return The average of recall and precision.
72
+ */
73
+ fMeasure(): Array<number>;
74
+ /**
75
+ * The weightedFMeasure method loops through the class labels and returns the resulting Array which has the weighted average of
76
+ * recall and precision.
77
+ *
78
+ * @return The weighted average of recall and precision.
79
+ */
80
+ weightedFMeasure(): number;
81
+ }
@@ -0,0 +1,178 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "nlptoolkit-datastructure/dist/CounterHashMap"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ConfusionMatrix = void 0;
13
+ const CounterHashMap_1 = require("nlptoolkit-datastructure/dist/CounterHashMap");
14
+ class ConfusionMatrix {
15
+ /**
16
+ * Constructor that sets the class labels {@link Array} and creates new {@link Map} matrix
17
+ *
18
+ * @param classLabels {@link ArrayList} of String.
19
+ */
20
+ constructor(classLabels) {
21
+ this.matrix = new Map();
22
+ this.classLabels = classLabels;
23
+ }
24
+ /**
25
+ * The classify method takes two Strings; actual class and predicted class as inputs. If the matrix {@link Map} contains
26
+ * given actual class String as a key, it then assigns the corresponding object of that key to a {@link CounterHashMap}, if not
27
+ * it creates a new {@link CounterHashMap}. Then, it puts the given predicted class String to the counterHashMap and
28
+ * also put this counterHashMap to the matrix {@link Map} together with the given actual class String.
29
+ *
30
+ * @param actualClass String input actual class.
31
+ * @param predictedClass String input predicted class.
32
+ */
33
+ classify(actualClass, predictedClass) {
34
+ let counterHashMap;
35
+ if (this.matrix.has(actualClass)) {
36
+ counterHashMap = this.matrix.get(actualClass);
37
+ }
38
+ else {
39
+ counterHashMap = new CounterHashMap_1.CounterHashMap();
40
+ }
41
+ counterHashMap.put(predictedClass);
42
+ this.matrix.set(actualClass, counterHashMap);
43
+ }
44
+ /**
45
+ * The addConfusionMatrix method takes a {@link ConfusionMatrix} as an input and loops through actual classes of that {@link Map}
46
+ * and initially gets one row at a time. Then it puts the current row to the matrix {@link Map} together with the actual class string.
47
+ *
48
+ * @param confusionMatrix {@link ConfusionMatrix} input.
49
+ */
50
+ addConfusionMatrix(confusionMatrix) {
51
+ for (let actualClass of confusionMatrix.matrix.keys()) {
52
+ let rowToBeAdded = confusionMatrix.matrix.get(actualClass);
53
+ if (this.matrix.has(actualClass)) {
54
+ let currentRow = this.matrix.get(actualClass);
55
+ currentRow.add(rowToBeAdded);
56
+ this.matrix.set(actualClass, currentRow);
57
+ }
58
+ else {
59
+ this.matrix.set(actualClass, rowToBeAdded);
60
+ }
61
+ }
62
+ }
63
+ /**
64
+ * The sumOfElements method loops through the keys in matrix {@link Map} and returns the summation of all the values of the keys.
65
+ * I.e: TP+TN+FP+FN.
66
+ *
67
+ * @return The summation of values.
68
+ */
69
+ sumOfElements() {
70
+ let result = 0;
71
+ for (let actualClass of this.matrix.keys()) {
72
+ result += this.matrix.get(actualClass).sumOfCounts();
73
+ }
74
+ return result;
75
+ }
76
+ /**
77
+ * The trace method loops through the keys in matrix {@link Map} and if the current key contains the actual key,
78
+ * it accumulates the corresponding values. I.e: TP+TN.
79
+ *
80
+ * @return Summation of values.
81
+ */
82
+ trace() {
83
+ let result = 0;
84
+ for (let actualClass of this.matrix.keys()) {
85
+ if (this.matrix.get(actualClass).has(actualClass)) {
86
+ result += this.matrix.get(actualClass).get(actualClass);
87
+ }
88
+ }
89
+ return result;
90
+ }
91
+ /**
92
+ * The columnSum method takes a String predicted class as input, and loops through the keys in matrix {@link HashMap}.
93
+ * If the current key contains the predicted class String, it accumulates the corresponding values. I.e: TP+FP.
94
+ *
95
+ * @param predictedClass String input predicted class.
96
+ * @return Summation of values.
97
+ */
98
+ columnSum(predictedClass) {
99
+ let result = 0;
100
+ for (let actualClass of this.matrix.keys()) {
101
+ if (this.matrix.get(actualClass).has(predictedClass)) {
102
+ result += this.matrix.get(actualClass).get(predictedClass);
103
+ }
104
+ }
105
+ return result;
106
+ }
107
+ /**
108
+ * The getAccuracy method returns the result of TP+TN / TP+TN+FP+FN
109
+ *
110
+ * @return the result of TP+TN / TP+TN+FP+FN
111
+ */
112
+ getAccuracy() {
113
+ return this.trace() / this.sumOfElements();
114
+ }
115
+ /**
116
+ * The precision method loops through the class labels and returns the resulting Array which has the result of TP/FP+TP.
117
+ *
118
+ * @return The result of TP/FP+TP.
119
+ */
120
+ precision() {
121
+ let result = new Array(this.classLabels.length).fill(0);
122
+ for (let i = 0; i < this.classLabels.length; i++) {
123
+ let actualClass = this.classLabels[i];
124
+ if (this.matrix.has(actualClass)) {
125
+ result[i] = this.matrix.get(actualClass).get(actualClass) / this.columnSum(actualClass);
126
+ }
127
+ }
128
+ return result;
129
+ }
130
+ /**
131
+ * The recall method loops through the class labels and returns the resulting Array which has the result of TP/FN+TP.
132
+ *
133
+ * @return The result of TP/FN+TP.
134
+ */
135
+ recall() {
136
+ let result = new Array(this.classLabels.length).fill(0);
137
+ for (let i = 0; i < this.classLabels.length; i++) {
138
+ let actualClass = this.classLabels[i];
139
+ if (this.matrix.has(actualClass)) {
140
+ result[i] = this.matrix.get(actualClass).get(actualClass) / this.matrix.get(actualClass).sumOfCounts();
141
+ }
142
+ }
143
+ return result;
144
+ }
145
+ /**
146
+ * The fMeasure method loops through the class labels and returns the resulting Array which has the average of
147
+ * recall and precision.
148
+ *
149
+ * @return The average of recall and precision.
150
+ */
151
+ fMeasure() {
152
+ let precision = this.precision();
153
+ let recall = this.recall();
154
+ let result = new Array(this.classLabels.length).fill(0);
155
+ for (let i = 0; i < this.classLabels.length; i++) {
156
+ result[i] = 2 / (1 / precision[i] + 1 / recall[i]);
157
+ }
158
+ return result;
159
+ }
160
+ /**
161
+ * The weightedFMeasure method loops through the class labels and returns the resulting Array which has the weighted average of
162
+ * recall and precision.
163
+ *
164
+ * @return The weighted average of recall and precision.
165
+ */
166
+ weightedFMeasure() {
167
+ let fMeasure = this.fMeasure();
168
+ let sum = 0;
169
+ for (let i = 0; i < this.classLabels.length; i++) {
170
+ let actualClass = this.classLabels[i];
171
+ sum += fMeasure[i] * this.matrix.get(actualClass).sumOfCounts();
172
+ }
173
+ return sum / this.sumOfElements();
174
+ }
175
+ }
176
+ exports.ConfusionMatrix = ConfusionMatrix;
177
+ });
178
+ //# sourceMappingURL=ConfusionMatrix.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ConfusionMatrix.js","sourceRoot":"","sources":["../../source/Performance/ConfusionMatrix.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,iFAA4E;IAE5E,MAAa,eAAe;QAKxB;;;;WAIG;QACH,YAAY,WAA0B;YAR9B,WAAM,GAAwC,IAAI,GAAG,EAAkC,CAAA;YAS3F,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;QAClC,CAAC;QAED;;;;;;;;WAQG;QACH,QAAQ,CAAC,WAAmB,EAAE,cAAsB;YAChD,IAAI,cAAsC,CAAA;YAC1C,IAAI,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,EAAC;gBAC7B,cAAc,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAA;aAChD;iBAAM;gBACH,cAAc,GAAG,IAAI,+BAAc,EAAU,CAAA;aAChD;YACD,cAAc,CAAC,GAAG,CAAC,cAAc,CAAC,CAAA;YAClC,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,EAAE,cAAc,CAAC,CAAA;QAChD,CAAC;QAED;;;;;WAKG;QACH,kBAAkB,CAAC,eAAgC;YAC/C,KAAK,IAAI,WAAW,IAAI,eAAe,CAAC,MAAM,CAAC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AC,CAAC,CAAC,CAAC;gBACtC,GAAG,IAAI,QAAQ,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,MAAM,CAAC,GAAG,CAAC,WAAW,CAAC,CAAC,WAAW,EAAE,CAAC;aACnE;YACD,OAAO,GAAG,GAAG,IAAI,CAAC,aAAa,EAAE,CAAC;QACtC,CAAC;KACJ;IA5KD,0CA4KC"}
@@ -0,0 +1,17 @@
1
+ import { ClassificationPerformance } from "./ClassificationPerformance";
2
+ import { ConfusionMatrix } from "./ConfusionMatrix";
3
+ export declare class DetailedClassificationPerformance extends ClassificationPerformance {
4
+ private readonly confusionMatrix;
5
+ /**
6
+ * A constructor that sets the accuracy and errorRate as 1 - accuracy via given {@link ConfusionMatrix} and also sets the confusionMatrix.
7
+ *
8
+ * @param confusionMatrix {@link ConfusionMatrix} input.
9
+ */
10
+ constructor(confusionMatrix: ConfusionMatrix);
11
+ /**
12
+ * Accessor for the confusionMatrix.
13
+ *
14
+ * @return ConfusionMatrix.
15
+ */
16
+ getConfusionMatrix(): ConfusionMatrix;
17
+ }
@@ -0,0 +1,35 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./ClassificationPerformance"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.DetailedClassificationPerformance = void 0;
13
+ const ClassificationPerformance_1 = require("./ClassificationPerformance");
14
+ class DetailedClassificationPerformance extends ClassificationPerformance_1.ClassificationPerformance {
15
+ /**
16
+ * A constructor that sets the accuracy and errorRate as 1 - accuracy via given {@link ConfusionMatrix} and also sets the confusionMatrix.
17
+ *
18
+ * @param confusionMatrix {@link ConfusionMatrix} input.
19
+ */
20
+ constructor(confusionMatrix) {
21
+ super(confusionMatrix.getAccuracy());
22
+ this.confusionMatrix = confusionMatrix;
23
+ }
24
+ /**
25
+ * Accessor for the confusionMatrix.
26
+ *
27
+ * @return ConfusionMatrix.
28
+ */
29
+ getConfusionMatrix() {
30
+ return this.confusionMatrix;
31
+ }
32
+ }
33
+ exports.DetailedClassificationPerformance = DetailedClassificationPerformance;
34
+ });
35
+ //# sourceMappingURL=DetailedClassificationPerformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"DetailedClassificationPerformance.js","sourceRoot":"","sources":["../../source/Performance/DetailedClassificationPerformance.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2EAAsE;IAGtE,MAAa,iCAAkC,SAAQ,qDAAyB;QAI5E;;;;WAIG;QACH,YAAY,eAAgC;YACxC,KAAK,CAAC,eAAe,CAAC,WAAW,EAAE,CAAC,CAAC;YACrC,IAAI,CAAC,eAAe,GAAG,eAAe,CAAA;QAC1C,CAAC;QAED;;;;WAIG;QACH,kBAAkB;YACd,OAAO,IAAI,CAAC,eAAe,CAAA;QAC/B,CAAC;KACJ;IAtBD,8EAsBC"}
@@ -0,0 +1,88 @@
1
+ import { Performance } from "./Performance";
2
+ import { DetailedClassificationPerformance } from "./DetailedClassificationPerformance";
3
+ import { ClassificationPerformance } from "./ClassificationPerformance";
4
+ export declare class ExperimentPerformance {
5
+ private results;
6
+ private containsDetails;
7
+ private classification;
8
+ /**
9
+ * A constructor that takes a file name as an input and takes the inputs from that file assigns these inputs to the
10
+ * errorRate and adds them to the results {@link Array} as a new {@link Performance}.
11
+ *
12
+ * @param fileName String input.
13
+ */
14
+ constructor(fileName?: string);
15
+ /**
16
+ * The add method takes a {@link Performance} as an input and adds it to the results {@link Array}.
17
+ *
18
+ * @param performance {@link Performance} input.
19
+ */
20
+ add(performance: Performance): void;
21
+ /**
22
+ * The numberOfExperiments method returns the size of the results {@link Array}.
23
+ *
24
+ * @return The results {@link Array}.
25
+ */
26
+ numberOfExperiments(): number;
27
+ /**
28
+ * The getErrorRate method takes an index as an input and returns the errorRate at given index of
29
+ * results {@link Array}.
30
+ *
31
+ * @param index Index of results {@link Array} to retrieve.
32
+ * @return The errorRate at given index of results {@link Array}.
33
+ */
34
+ getErrorRate(index: number): number;
35
+ /**
36
+ * The getAccuracy method takes an index as an input. It returns the accuracy of a {@link Performance} at given
37
+ * index of results {@link Array}.
38
+ *
39
+ * @param index Index of results {@link Array} to retrieve.
40
+ * @return The accuracy of a {@link Performance} at given index of results {@link Array}.
41
+ */
42
+ getAccuracy(index: number): number;
43
+ /**
44
+ * The meanPerformance method loops through the performances of results {@link Array} and sums up the errorRates
45
+ * of each then returns a new {@link Performance} with the mean of that summation.
46
+ *
47
+ * @return A new {@link Performance} with the mean of the summation of errorRates.
48
+ */
49
+ meanPerformance(): Performance;
50
+ /**
51
+ * The meanClassificationPerformance method loops through the performances of results {@link Array} and sums up the
52
+ * accuracy of each classification performance, then returns a new classificationPerformance with the mean of that
53
+ * summation.
54
+ *
55
+ * @return A new classificationPerformance with the mean of that summation.
56
+ */
57
+ meanClassificationPerformance(): ClassificationPerformance;
58
+ /**
59
+ * The meanDetailedPerformance method gets the first confusion matrix of results {@link Array}.
60
+ * Then, it adds new confusion matrices as the {@link DetailedClassificationPerformance} of
61
+ * other elements of results ArrayList' confusion matrices as a {@link DetailedClassificationPerformance}.
62
+ *
63
+ * @return A new {@link DetailedClassificationPerformance} with the {@link ConfusionMatrix} sum.
64
+ */
65
+ meanDetailedPerformance(): DetailedClassificationPerformance;
66
+ /**
67
+ * The standardDeviationPerformance method loops through the {@link Performance}s of results {@link Array} and
68
+ * returns a new Performance with the standard deviation.
69
+ *
70
+ * @return A new Performance with the standard deviation.
71
+ */
72
+ standardDeviationPerformance(): Performance;
73
+ /**
74
+ * The standardDeviationClassificationPerformance method loops through the {@link Performance}s of results {@link ArrayList} and
75
+ * returns a new {@link ClassificationPerformance} with standard deviation.
76
+ *
77
+ * @return A new {@link ClassificationPerformance} with standard deviation.
78
+ */
79
+ standardDeviationClassificationPerformance(): ClassificationPerformance;
80
+ /**
81
+ * The isBetter method takes an {@link ExperimentPerformance} as an input and returns true if the result of compareTo method is positive
82
+ * and false otherwise.
83
+ *
84
+ * @param experimentPerformance {@link ExperimentPerformance} input.
85
+ * @return True if the result of compareTo method is positive and false otherwise.
86
+ */
87
+ isBetter(experimentPerformance: ExperimentPerformance): boolean;
88
+ }
@@ -0,0 +1,176 @@
1
+ (function (factory) {
2
+ if (typeof module === "object" && typeof module.exports === "object") {
3
+ var v = factory(require, exports);
4
+ if (v !== undefined) module.exports = v;
5
+ }
6
+ else if (typeof define === "function" && define.amd) {
7
+ define(["require", "exports", "./Performance", "fs", "./DetailedClassificationPerformance", "./ClassificationPerformance"], factory);
8
+ }
9
+ })(function (require, exports) {
10
+ "use strict";
11
+ Object.defineProperty(exports, "__esModule", { value: true });
12
+ exports.ExperimentPerformance = void 0;
13
+ const Performance_1 = require("./Performance");
14
+ const fs = require("fs");
15
+ const DetailedClassificationPerformance_1 = require("./DetailedClassificationPerformance");
16
+ const ClassificationPerformance_1 = require("./ClassificationPerformance");
17
+ class ExperimentPerformance {
18
+ /**
19
+ * A constructor that takes a file name as an input and takes the inputs from that file assigns these inputs to the
20
+ * errorRate and adds them to the results {@link Array} as a new {@link Performance}.
21
+ *
22
+ * @param fileName String input.
23
+ */
24
+ constructor(fileName) {
25
+ this.results = new Array();
26
+ this.containsDetails = true;
27
+ this.classification = true;
28
+ if (fileName != undefined) {
29
+ let data = fs.readFileSync(fileName, 'utf8');
30
+ let lines = data.split("\n");
31
+ for (let line of lines) {
32
+ this.results.push(new Performance_1.Performance(Number.parseFloat(line)));
33
+ }
34
+ }
35
+ }
36
+ /**
37
+ * The add method takes a {@link Performance} as an input and adds it to the results {@link Array}.
38
+ *
39
+ * @param performance {@link Performance} input.
40
+ */
41
+ add(performance) {
42
+ if (!(performance instanceof DetailedClassificationPerformance_1.DetailedClassificationPerformance)) {
43
+ this.containsDetails = false;
44
+ }
45
+ if (!(performance instanceof ClassificationPerformance_1.ClassificationPerformance)) {
46
+ this.classification = false;
47
+ }
48
+ this.results.push(performance);
49
+ }
50
+ /**
51
+ * The numberOfExperiments method returns the size of the results {@link Array}.
52
+ *
53
+ * @return The results {@link Array}.
54
+ */
55
+ numberOfExperiments() {
56
+ return this.results.length;
57
+ }
58
+ /**
59
+ * The getErrorRate method takes an index as an input and returns the errorRate at given index of
60
+ * results {@link Array}.
61
+ *
62
+ * @param index Index of results {@link Array} to retrieve.
63
+ * @return The errorRate at given index of results {@link Array}.
64
+ */
65
+ getErrorRate(index) {
66
+ return this.results[index].getErrorRate();
67
+ }
68
+ /**
69
+ * The getAccuracy method takes an index as an input. It returns the accuracy of a {@link Performance} at given
70
+ * index of results {@link Array}.
71
+ *
72
+ * @param index Index of results {@link Array} to retrieve.
73
+ * @return The accuracy of a {@link Performance} at given index of results {@link Array}.
74
+ */
75
+ getAccuracy(index) {
76
+ if (this.results[index] instanceof ClassificationPerformance_1.ClassificationPerformance) {
77
+ return this.results[index].getAccuracy();
78
+ }
79
+ }
80
+ /**
81
+ * The meanPerformance method loops through the performances of results {@link Array} and sums up the errorRates
82
+ * of each then returns a new {@link Performance} with the mean of that summation.
83
+ *
84
+ * @return A new {@link Performance} with the mean of the summation of errorRates.
85
+ */
86
+ meanPerformance() {
87
+ let sumError = 0;
88
+ for (let performance of this.results) {
89
+ sumError += performance.getErrorRate();
90
+ }
91
+ return new Performance_1.Performance(sumError / this.results.length);
92
+ }
93
+ /**
94
+ * The meanClassificationPerformance method loops through the performances of results {@link Array} and sums up the
95
+ * accuracy of each classification performance, then returns a new classificationPerformance with the mean of that
96
+ * summation.
97
+ *
98
+ * @return A new classificationPerformance with the mean of that summation.
99
+ */
100
+ meanClassificationPerformance() {
101
+ if (this.results.length == 0 || !this.classification) {
102
+ return undefined;
103
+ }
104
+ let sumAccuracy = 0;
105
+ for (let performance of this.results) {
106
+ let classificationPerformance = performance;
107
+ sumAccuracy += classificationPerformance.getAccuracy();
108
+ }
109
+ return new ClassificationPerformance_1.ClassificationPerformance(sumAccuracy / this.results.length);
110
+ }
111
+ /**
112
+ * The meanDetailedPerformance method gets the first confusion matrix of results {@link Array}.
113
+ * Then, it adds new confusion matrices as the {@link DetailedClassificationPerformance} of
114
+ * other elements of results ArrayList' confusion matrices as a {@link DetailedClassificationPerformance}.
115
+ *
116
+ * @return A new {@link DetailedClassificationPerformance} with the {@link ConfusionMatrix} sum.
117
+ */
118
+ meanDetailedPerformance() {
119
+ if (this.results.length == 0 || !this.containsDetails) {
120
+ return undefined;
121
+ }
122
+ let sum = this.results[0].getConfusionMatrix();
123
+ for (let i = 1; i < this.results.length; i++) {
124
+ sum.addConfusionMatrix(this.results[i].getConfusionMatrix());
125
+ }
126
+ return new DetailedClassificationPerformance_1.DetailedClassificationPerformance(sum);
127
+ }
128
+ /**
129
+ * The standardDeviationPerformance method loops through the {@link Performance}s of results {@link Array} and
130
+ * returns a new Performance with the standard deviation.
131
+ *
132
+ * @return A new Performance with the standard deviation.
133
+ */
134
+ standardDeviationPerformance() {
135
+ let sumErrorRate = 0;
136
+ let averagePerformance = this.meanPerformance();
137
+ for (let performance of this.results) {
138
+ sumErrorRate += Math.pow(performance.getErrorRate() - averagePerformance.getErrorRate(), 2);
139
+ }
140
+ return new Performance_1.Performance(Math.sqrt(sumErrorRate / (this.results.length - 1)));
141
+ }
142
+ /**
143
+ * The standardDeviationClassificationPerformance method loops through the {@link Performance}s of results {@link ArrayList} and
144
+ * returns a new {@link ClassificationPerformance} with standard deviation.
145
+ *
146
+ * @return A new {@link ClassificationPerformance} with standard deviation.
147
+ */
148
+ standardDeviationClassificationPerformance() {
149
+ if (this.results.length == 0 || !this.classification) {
150
+ return undefined;
151
+ }
152
+ let sumAccuracy = 0, sumErrorRate = 0;
153
+ let averageClassificationPerformance = this.meanClassificationPerformance();
154
+ for (let performance of this.results) {
155
+ let classificationPerformance = performance;
156
+ sumAccuracy += Math.pow(classificationPerformance.getAccuracy() - averageClassificationPerformance.getAccuracy(), 2);
157
+ sumErrorRate += Math.pow(classificationPerformance.getErrorRate() - averageClassificationPerformance.getErrorRate(), 2);
158
+ }
159
+ return new ClassificationPerformance_1.ClassificationPerformance(Math.sqrt(sumAccuracy / (this.results.length - 1)), Math.sqrt(sumErrorRate / (this.results.length - 1)));
160
+ }
161
+ /**
162
+ * The isBetter method takes an {@link ExperimentPerformance} as an input and returns true if the result of compareTo method is positive
163
+ * and false otherwise.
164
+ *
165
+ * @param experimentPerformance {@link ExperimentPerformance} input.
166
+ * @return True if the result of compareTo method is positive and false otherwise.
167
+ */
168
+ isBetter(experimentPerformance) {
169
+ let accuracy1 = this.meanClassificationPerformance().getAccuracy();
170
+ let accuracy2 = experimentPerformance.meanClassificationPerformance().getAccuracy();
171
+ return accuracy1 > accuracy2;
172
+ }
173
+ }
174
+ exports.ExperimentPerformance = ExperimentPerformance;
175
+ });
176
+ //# sourceMappingURL=ExperimentPerformance.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"ExperimentPerformance.js","sourceRoot":"","sources":["../../source/Performance/ExperimentPerformance.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,+CAA0C;IAC1C,yBAAyB;IACzB,2FAAsF;IACtF,2EAAsE;IAEtE,MAAa,qBAAqB;QAM9B;;;;;WAKG;QACH,YAAY,QAAiB;YAVrB,YAAO,GAAuB,IAAI,KAAK,EAAe,CAAA;YACtD,oBAAe,GAAY,IAAI,CAAA;YAC/B,mBAAc,GAAY,IAAI,CAAA;YASlC,IAAI,QAAQ,IAAI,SAAS,EAAC;gBACtB,IAAI,IAAI,GAAG,EAAE,CAAC,YAAY,CAAC,QAAQ,EAAE,MAAM,CAAC,CAAA;gBAC5C,IAAI,KAAK,GAAG,IAAI,CAAC,KAAK,CAAC,IAAI,CAAC,CAAA;gBAC5B,KAAK,IAAI,IAAI,IAAI,KAAK,EAAC;oBACnB,IAAI,CAAC,OAAO,CAAC,IAAI,CAAC,IAAI,yBAAW,CAAC,MAAM,CAAC,UAAU,CAAC,IAAI,CAAC,CAAC,CAAC,CAAA;iB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Double input.
7
+ */
8
+ constructor(errorRate: number);
9
+ /**
10
+ * Accessor for the error rate.
11
+ *
12
+ * @return Double errorRate.
13
+ */
14
+ getErrorRate(): number;
15
+ }