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.
- package/README.md +161 -0
- package/datasets/bupa.data +345 -0
- package/datasets/car.data +1728 -0
- package/datasets/chess.data +28056 -0
- package/datasets/dermatology.data +366 -0
- package/datasets/iris.data +150 -0
- package/datasets/nursery.data +12960 -0
- package/datasets/tictactoe.data +958 -0
- package/dist/Attribute/Attribute.d.ts +4 -0
- package/dist/Attribute/Attribute.js +17 -0
- package/dist/Attribute/Attribute.js.map +1 -0
- package/dist/Attribute/AttributeType.d.ts +18 -0
- package/dist/Attribute/AttributeType.js +33 -0
- package/dist/Attribute/AttributeType.js.map +1 -0
- package/dist/Attribute/BinaryAttribute.d.ts +9 -0
- package/dist/Attribute/BinaryAttribute.js +26 -0
- package/dist/Attribute/BinaryAttribute.js.map +1 -0
- package/dist/Attribute/ContinuousAttribute.d.ts +30 -0
- package/dist/Attribute/ContinuousAttribute.js +59 -0
- package/dist/Attribute/ContinuousAttribute.js.map +1 -0
- package/dist/Attribute/DiscreteAttribute.d.ts +24 -0
- package/dist/Attribute/DiscreteAttribute.js +53 -0
- package/dist/Attribute/DiscreteAttribute.js.map +1 -0
- package/dist/Attribute/DiscreteIndexedAttribute.d.ts +27 -0
- package/dist/Attribute/DiscreteIndexedAttribute.js +61 -0
- package/dist/Attribute/DiscreteIndexedAttribute.js.map +1 -0
- package/dist/Classifier/Bagging.d.ts +16 -0
- package/dist/Classifier/Bagging.js +42 -0
- package/dist/Classifier/Bagging.js.map +1 -0
- package/dist/Classifier/C45.d.ts +13 -0
- package/dist/Classifier/C45.js +40 -0
- package/dist/Classifier/C45.js.map +1 -0
- package/dist/Classifier/C45Stump.d.ts +12 -0
- package/dist/Classifier/C45Stump.js +29 -0
- package/dist/Classifier/C45Stump.js.map +1 -0
- package/dist/Classifier/Classifier.d.ts +39 -0
- package/dist/Classifier/Classifier.js +72 -0
- package/dist/Classifier/Classifier.js.map +1 -0
- package/dist/Classifier/DeepNetwork.d.ts +13 -0
- package/dist/Classifier/DeepNetwork.js +31 -0
- package/dist/Classifier/DeepNetwork.js.map +1 -0
- package/dist/Classifier/Dummy.d.ts +13 -0
- package/dist/Classifier/Dummy.js +29 -0
- package/dist/Classifier/Dummy.js.map +1 -0
- package/dist/Classifier/KMeans.d.ts +12 -0
- package/dist/Classifier/KMeans.js +36 -0
- package/dist/Classifier/KMeans.js.map +1 -0
- package/dist/Classifier/Knn.d.ts +13 -0
- package/dist/Classifier/Knn.js +29 -0
- package/dist/Classifier/Knn.js.map +1 -0
- package/dist/Classifier/Lda.d.ts +12 -0
- package/dist/Classifier/Lda.js +52 -0
- package/dist/Classifier/Lda.js.map +1 -0
- package/dist/Classifier/LinearPerceptron.d.ts +14 -0
- package/dist/Classifier/LinearPerceptron.js +32 -0
- package/dist/Classifier/LinearPerceptron.js.map +1 -0
- package/dist/Classifier/MultiLayerPerceptron.d.ts +14 -0
- package/dist/Classifier/MultiLayerPerceptron.js +32 -0
- package/dist/Classifier/MultiLayerPerceptron.js.map +1 -0
- package/dist/Classifier/NaiveBayes.d.ts +25 -0
- package/dist/Classifier/NaiveBayes.js +67 -0
- package/dist/Classifier/NaiveBayes.js.map +1 -0
- package/dist/Classifier/Qda.d.ts +12 -0
- package/dist/Classifier/Qda.js +50 -0
- package/dist/Classifier/Qda.js.map +1 -0
- package/dist/Classifier/RandomClassifier.d.ts +12 -0
- package/dist/Classifier/RandomClassifier.js +32 -0
- package/dist/Classifier/RandomClassifier.js.map +1 -0
- package/dist/Classifier/RandomForest.d.ts +13 -0
- package/dist/Classifier/RandomForest.js +39 -0
- package/dist/Classifier/RandomForest.js.map +1 -0
- package/dist/DataSet/DataDefinition.d.ts +59 -0
- package/dist/DataSet/DataDefinition.js +108 -0
- package/dist/DataSet/DataDefinition.js.map +1 -0
- package/dist/DataSet/DataSet.d.ts +111 -0
- package/dist/DataSet/DataSet.js +286 -0
- package/dist/DataSet/DataSet.js.map +1 -0
- package/dist/DistanceMetric/DistanceMetric.d.ts +4 -0
- package/dist/DistanceMetric/DistanceMetric.js +13 -0
- package/dist/DistanceMetric/DistanceMetric.js.map +1 -0
- package/dist/DistanceMetric/EuclidianDistance.d.ts +13 -0
- package/dist/DistanceMetric/EuclidianDistance.js +43 -0
- package/dist/DistanceMetric/EuclidianDistance.js.map +1 -0
- package/dist/DistanceMetric/MahalanobisDistance.d.ts +20 -0
- package/dist/DistanceMetric/MahalanobisDistance.js +39 -0
- package/dist/DistanceMetric/MahalanobisDistance.js.map +1 -0
- package/dist/Experiment/BootstrapRun.d.ts +19 -0
- package/dist/Experiment/BootstrapRun.js +44 -0
- package/dist/Experiment/BootstrapRun.js.map +1 -0
- package/dist/Experiment/Experiment.d.ts +37 -0
- package/dist/Experiment/Experiment.js +57 -0
- package/dist/Experiment/Experiment.js.map +1 -0
- package/dist/Experiment/KFoldRun.d.ts +19 -0
- package/dist/Experiment/KFoldRun.js +43 -0
- package/dist/Experiment/KFoldRun.js.map +1 -0
- package/dist/Experiment/KFoldRunSeparateTest.d.ts +24 -0
- package/dist/Experiment/KFoldRunSeparateTest.js +51 -0
- package/dist/Experiment/KFoldRunSeparateTest.js.map +1 -0
- package/dist/Experiment/MultipleRun.d.ts +5 -0
- package/dist/Experiment/MultipleRun.js +13 -0
- package/dist/Experiment/MultipleRun.js.map +1 -0
- package/dist/Experiment/MxKFoldRun.d.ts +20 -0
- package/dist/Experiment/MxKFoldRun.js +44 -0
- package/dist/Experiment/MxKFoldRun.js.map +1 -0
- package/dist/Experiment/MxKFoldRunSeparateTest.d.ts +21 -0
- package/dist/Experiment/MxKFoldRunSeparateTest.js +48 -0
- package/dist/Experiment/MxKFoldRunSeparateTest.js.map +1 -0
- package/dist/Experiment/SingleRun.d.ts +5 -0
- package/dist/Experiment/SingleRun.js +13 -0
- package/dist/Experiment/SingleRun.js.map +1 -0
- package/dist/Experiment/SingleRunWithK.d.ts +19 -0
- package/dist/Experiment/SingleRunWithK.js +37 -0
- package/dist/Experiment/SingleRunWithK.js.map +1 -0
- package/dist/Experiment/StratifiedKFoldRun.d.ts +17 -0
- package/dist/Experiment/StratifiedKFoldRun.js +39 -0
- package/dist/Experiment/StratifiedKFoldRun.js.map +1 -0
- package/dist/Experiment/StratifiedKFoldRunSeparateTest.d.ts +18 -0
- package/dist/Experiment/StratifiedKFoldRunSeparateTest.js +43 -0
- package/dist/Experiment/StratifiedKFoldRunSeparateTest.js.map +1 -0
- package/dist/Experiment/StratifiedMxKFoldRun.d.ts +19 -0
- package/dist/Experiment/StratifiedMxKFoldRun.js +43 -0
- package/dist/Experiment/StratifiedMxKFoldRun.js.map +1 -0
- package/dist/Experiment/StratifiedMxKFoldRunSeparateTest.d.ts +20 -0
- package/dist/Experiment/StratifiedMxKFoldRunSeparateTest.js +47 -0
- package/dist/Experiment/StratifiedMxKFoldRunSeparateTest.js.map +1 -0
- package/dist/Experiment/StratifiedSingleRunWithK.d.ts +18 -0
- package/dist/Experiment/StratifiedSingleRunWithK.js +39 -0
- package/dist/Experiment/StratifiedSingleRunWithK.js.map +1 -0
- package/dist/FeatureSelection/BackwardSelection.d.ts +18 -0
- package/dist/FeatureSelection/BackwardSelection.js +39 -0
- package/dist/FeatureSelection/BackwardSelection.js.map +1 -0
- package/dist/FeatureSelection/FeatureSubSet.d.ts +47 -0
- package/dist/FeatureSelection/FeatureSubSet.js +89 -0
- package/dist/FeatureSelection/FeatureSubSet.js.map +1 -0
- package/dist/FeatureSelection/FloatingSelection.d.ts +16 -0
- package/dist/FeatureSelection/FloatingSelection.js +38 -0
- package/dist/FeatureSelection/FloatingSelection.js.map +1 -0
- package/dist/FeatureSelection/ForwardSelection.d.ts +17 -0
- package/dist/FeatureSelection/ForwardSelection.js +38 -0
- package/dist/FeatureSelection/ForwardSelection.js.map +1 -0
- package/dist/FeatureSelection/SubSetSelection.d.ts +37 -0
- package/dist/FeatureSelection/SubSetSelection.js +90 -0
- package/dist/FeatureSelection/SubSetSelection.js.map +1 -0
- package/dist/Filter/DiscreteToContinuous.d.ts +25 -0
- package/dist/Filter/DiscreteToContinuous.js +69 -0
- package/dist/Filter/DiscreteToContinuous.js.map +1 -0
- package/dist/Filter/DiscreteToIndexed.d.ts +21 -0
- package/dist/Filter/DiscreteToIndexed.js +56 -0
- package/dist/Filter/DiscreteToIndexed.js.map +1 -0
- package/dist/Filter/FeatureFilter.d.ts +18 -0
- package/dist/Filter/FeatureFilter.js +36 -0
- package/dist/Filter/FeatureFilter.js.map +1 -0
- package/dist/Filter/LaryFilter.d.ts +27 -0
- package/dist/Filter/LaryFilter.js +62 -0
- package/dist/Filter/LaryFilter.js.map +1 -0
- package/dist/Filter/LaryToBinary.d.ts +23 -0
- package/dist/Filter/LaryToBinary.js +67 -0
- package/dist/Filter/LaryToBinary.js.map +1 -0
- package/dist/Filter/Normalize.d.ts +21 -0
- package/dist/Filter/Normalize.js +47 -0
- package/dist/Filter/Normalize.js.map +1 -0
- package/dist/Filter/Pca.d.ts +44 -0
- package/dist/Filter/Pca.js +109 -0
- package/dist/Filter/Pca.js.map +1 -0
- package/dist/Filter/TrainedFeatureFilter.d.ts +11 -0
- package/dist/Filter/TrainedFeatureFilter.js +26 -0
- package/dist/Filter/TrainedFeatureFilter.js.map +1 -0
- package/dist/Instance/CompositeInstance.d.ts +32 -0
- package/dist/Instance/CompositeInstance.js +61 -0
- package/dist/Instance/CompositeInstance.js.map +1 -0
- package/dist/Instance/Instance.d.ts +89 -0
- package/dist/Instance/Instance.js +170 -0
- package/dist/Instance/Instance.js.map +1 -0
- package/dist/InstanceList/InstanceList.d.ts +188 -0
- package/dist/InstanceList/InstanceList.js +517 -0
- package/dist/InstanceList/InstanceList.js.map +1 -0
- package/dist/InstanceList/InstanceListOfSameClass.d.ts +16 -0
- package/dist/InstanceList/InstanceListOfSameClass.js +35 -0
- package/dist/InstanceList/InstanceListOfSameClass.js.map +1 -0
- package/dist/InstanceList/Partition.d.ts +31 -0
- package/dist/InstanceList/Partition.js +143 -0
- package/dist/InstanceList/Partition.js.map +1 -0
- package/dist/Model/DecisionTree/DecisionCondition.d.ts +34 -0
- package/dist/Model/DecisionTree/DecisionCondition.js +84 -0
- package/dist/Model/DecisionTree/DecisionCondition.js.map +1 -0
- package/dist/Model/DecisionTree/DecisionNode.d.ts +82 -0
- package/dist/Model/DecisionTree/DecisionNode.js +271 -0
- package/dist/Model/DecisionTree/DecisionNode.js.map +1 -0
- package/dist/Model/DecisionTree/DecisionTree.d.ts +37 -0
- package/dist/Model/DecisionTree/DecisionTree.js +75 -0
- package/dist/Model/DecisionTree/DecisionTree.js.map +1 -0
- package/dist/Model/DeepNetworkModel.d.ts +42 -0
- package/dist/Model/DeepNetworkModel.js +163 -0
- package/dist/Model/DeepNetworkModel.js.map +1 -0
- package/dist/Model/DummyModel.d.ts +20 -0
- package/dist/Model/DummyModel.js +46 -0
- package/dist/Model/DummyModel.js.map +1 -0
- package/dist/Model/GaussianModel.d.ts +24 -0
- package/dist/Model/GaussianModel.js +59 -0
- package/dist/Model/GaussianModel.js.map +1 -0
- package/dist/Model/KMeansModel.d.ts +27 -0
- package/dist/Model/KMeansModel.js +48 -0
- package/dist/Model/KMeansModel.js.map +1 -0
- package/dist/Model/KnnInstance.d.ts +14 -0
- package/dist/Model/KnnInstance.js +33 -0
- package/dist/Model/KnnInstance.js.map +1 -0
- package/dist/Model/KnnModel.d.ts +36 -0
- package/dist/Model/KnnModel.js +83 -0
- package/dist/Model/KnnModel.js.map +1 -0
- package/dist/Model/LdaModel.d.ts +25 -0
- package/dist/Model/LdaModel.js +45 -0
- package/dist/Model/LdaModel.js.map +1 -0
- package/dist/Model/LinearPerceptronModel.d.ts +21 -0
- package/dist/Model/LinearPerceptronModel.js +62 -0
- package/dist/Model/LinearPerceptronModel.js.map +1 -0
- package/dist/Model/Model.d.ts +12 -0
- package/dist/Model/Model.js +31 -0
- package/dist/Model/Model.js.map +1 -0
- package/dist/Model/MultiLayerPerceptronModel.d.ts +29 -0
- package/dist/Model/MultiLayerPerceptronModel.js +101 -0
- package/dist/Model/MultiLayerPerceptronModel.js.map +1 -0
- package/dist/Model/NaiveBayesModel.d.ts +47 -0
- package/dist/Model/NaiveBayesModel.js +95 -0
- package/dist/Model/NaiveBayesModel.js.map +1 -0
- package/dist/Model/NeuralNetworkModel.d.ts +99 -0
- package/dist/Model/NeuralNetworkModel.js +180 -0
- package/dist/Model/NeuralNetworkModel.js.map +1 -0
- package/dist/Model/QdaModel.d.ts +26 -0
- package/dist/Model/QdaModel.js +45 -0
- package/dist/Model/QdaModel.js.map +1 -0
- package/dist/Model/RandomModel.d.ts +16 -0
- package/dist/Model/RandomModel.js +51 -0
- package/dist/Model/RandomModel.js.map +1 -0
- package/dist/Model/TreeEnsembleModel.d.ts +21 -0
- package/dist/Model/TreeEnsembleModel.js +49 -0
- package/dist/Model/TreeEnsembleModel.js.map +1 -0
- package/dist/Model/ValidatedModel.d.ts +12 -0
- package/dist/Model/ValidatedModel.js +35 -0
- package/dist/Model/ValidatedModel.js.map +1 -0
- package/dist/Parameter/ActivationFunction.d.ts +5 -0
- package/dist/Parameter/ActivationFunction.js +20 -0
- package/dist/Parameter/ActivationFunction.js.map +1 -0
- package/dist/Parameter/BaggingParameter.d.ts +17 -0
- package/dist/Parameter/BaggingParameter.js +36 -0
- package/dist/Parameter/BaggingParameter.js.map +1 -0
- package/dist/Parameter/C45Parameter.d.ts +25 -0
- package/dist/Parameter/C45Parameter.js +46 -0
- package/dist/Parameter/C45Parameter.js.map +1 -0
- package/dist/Parameter/DeepNetworkParameter.d.ts +38 -0
- package/dist/Parameter/DeepNetworkParameter.js +60 -0
- package/dist/Parameter/DeepNetworkParameter.js.map +1 -0
- package/dist/Parameter/KMeansParameter.d.ts +18 -0
- package/dist/Parameter/KMeansParameter.js +42 -0
- package/dist/Parameter/KMeansParameter.js.map +1 -0
- package/dist/Parameter/KnnParameter.d.ts +19 -0
- package/dist/Parameter/KnnParameter.js +37 -0
- package/dist/Parameter/KnnParameter.js.map +1 -0
- package/dist/Parameter/LinearPerceptronParameter.d.ts +41 -0
- package/dist/Parameter/LinearPerceptronParameter.js +66 -0
- package/dist/Parameter/LinearPerceptronParameter.js.map +1 -0
- package/dist/Parameter/MultiLayerPerceptronParameter.d.ts +30 -0
- package/dist/Parameter/MultiLayerPerceptronParameter.js +50 -0
- package/dist/Parameter/MultiLayerPerceptronParameter.js.map +1 -0
- package/dist/Parameter/Parameter.d.ts +15 -0
- package/dist/Parameter/Parameter.js +33 -0
- package/dist/Parameter/Parameter.js.map +1 -0
- package/dist/Parameter/RandomForestParameter.d.ts +18 -0
- package/dist/Parameter/RandomForestParameter.js +37 -0
- package/dist/Parameter/RandomForestParameter.js.map +1 -0
- package/dist/Performance/ClassificationPerformance.d.ts +17 -0
- package/dist/Performance/ClassificationPerformance.js +36 -0
- package/dist/Performance/ClassificationPerformance.js.map +1 -0
- package/dist/Performance/ConfusionMatrix.d.ts +81 -0
- package/dist/Performance/ConfusionMatrix.js +178 -0
- package/dist/Performance/ConfusionMatrix.js.map +1 -0
- package/dist/Performance/DetailedClassificationPerformance.d.ts +17 -0
- package/dist/Performance/DetailedClassificationPerformance.js +35 -0
- package/dist/Performance/DetailedClassificationPerformance.js.map +1 -0
- package/dist/Performance/ExperimentPerformance.d.ts +88 -0
- package/dist/Performance/ExperimentPerformance.js +176 -0
- package/dist/Performance/ExperimentPerformance.js.map +1 -0
- package/dist/Performance/Performance.d.ts +15 -0
- package/dist/Performance/Performance.js +33 -0
- package/dist/Performance/Performance.js.map +1 -0
- package/dist/StatisticalTest/Combined5x2F.d.ts +7 -0
- package/dist/StatisticalTest/Combined5x2F.js +43 -0
- package/dist/StatisticalTest/Combined5x2F.js.map +1 -0
- package/dist/StatisticalTest/Combined5x2t.d.ts +7 -0
- package/dist/StatisticalTest/Combined5x2t.js +43 -0
- package/dist/StatisticalTest/Combined5x2t.js.map +1 -0
- package/dist/StatisticalTest/Paired5x2t.d.ts +7 -0
- package/dist/StatisticalTest/Paired5x2t.js +42 -0
- package/dist/StatisticalTest/Paired5x2t.js.map +1 -0
- package/dist/StatisticalTest/PairedTest.d.ts +6 -0
- package/dist/StatisticalTest/PairedTest.js +35 -0
- package/dist/StatisticalTest/PairedTest.js.map +1 -0
- package/dist/StatisticalTest/Pairedt.d.ts +7 -0
- package/dist/StatisticalTest/Pairedt.js +40 -0
- package/dist/StatisticalTest/Pairedt.js.map +1 -0
- package/dist/StatisticalTest/Sign.d.ts +8 -0
- package/dist/StatisticalTest/Sign.js +52 -0
- package/dist/StatisticalTest/Sign.js.map +1 -0
- package/dist/StatisticalTest/StatisticalTestResult.d.ts +9 -0
- package/dist/StatisticalTest/StatisticalTestResult.js +53 -0
- package/dist/StatisticalTest/StatisticalTestResult.js.map +1 -0
- package/dist/StatisticalTest/StatisticalTestResultType.d.ts +7 -0
- package/dist/StatisticalTest/StatisticalTestResultType.js +22 -0
- package/dist/StatisticalTest/StatisticalTestResultType.js.map +1 -0
- package/index.js +100 -0
- package/package.json +30 -0
- package/source/Attribute/Attribute.ts +6 -0
- package/source/Attribute/AttributeType.ts +18 -0
- package/source/Attribute/BinaryAttribute.ts +14 -0
- package/source/Attribute/ContinuousAttribute.ts +53 -0
- package/source/Attribute/DiscreteAttribute.ts +46 -0
- package/source/Attribute/DiscreteIndexedAttribute.ts +54 -0
- package/source/Classifier/Bagging.ts +32 -0
- package/source/Classifier/C45.ts +30 -0
- package/source/Classifier/C45Stump.ts +19 -0
- package/source/Classifier/Classifier.ts +71 -0
- package/source/Classifier/DeepNetwork.ts +22 -0
- package/source/Classifier/Dummy.ts +19 -0
- package/source/Classifier/KMeans.ts +26 -0
- package/source/Classifier/Knn.ts +21 -0
- package/source/Classifier/Lda.ts +43 -0
- package/source/Classifier/LinearPerceptron.ts +23 -0
- package/source/Classifier/MultiLayerPerceptron.ts +23 -0
- package/source/Classifier/NaiveBayes.ts +62 -0
- package/source/Classifier/Qda.ts +42 -0
- package/source/Classifier/RandomClassifier.ts +22 -0
- package/source/Classifier/RandomForest.ts +29 -0
- package/source/DataSet/DataDefinition.ts +106 -0
- package/source/DataSet/DataSet.ts +279 -0
- package/source/DistanceMetric/DistanceMetric.ts +6 -0
- package/source/DistanceMetric/EuclidianDistance.ts +32 -0
- package/source/DistanceMetric/MahalanobisDistance.ts +33 -0
- package/source/Experiment/BootstrapRun.ts +37 -0
- package/source/Experiment/Experiment.ts +57 -0
- package/source/Experiment/KFoldRun.ts +44 -0
- package/source/Experiment/KFoldRunSeparateTest.ts +50 -0
- package/source/Experiment/MultipleRun.ts +7 -0
- package/source/Experiment/MxKFoldRun.ts +37 -0
- package/source/Experiment/MxKFoldRunSeparateTest.ts +40 -0
- package/source/Experiment/SingleRun.ts +7 -0
- package/source/Experiment/SingleRunWithK.ts +39 -0
- package/source/Experiment/StratifiedKFoldRun.ts +30 -0
- package/source/Experiment/StratifiedKFoldRunSeparateTest.ts +33 -0
- package/source/Experiment/StratifiedMxKFoldRun.ts +34 -0
- package/source/Experiment/StratifiedMxKFoldRunSeparateTest.ts +40 -0
- package/source/Experiment/StratifiedSingleRunWithK.ts +33 -0
- package/source/FeatureSelection/BackwardSelection.ts +28 -0
- package/source/FeatureSelection/FeatureSubSet.ts +82 -0
- package/source/FeatureSelection/FloatingSelection.ts +27 -0
- package/source/FeatureSelection/ForwardSelection.ts +27 -0
- package/source/FeatureSelection/SubSetSelection.ts +88 -0
- package/source/Filter/DiscreteToContinuous.ts +59 -0
- package/source/Filter/DiscreteToIndexed.ts +48 -0
- package/source/Filter/FeatureFilter.ts +31 -0
- package/source/Filter/LaryFilter.ts +54 -0
- package/source/Filter/LaryToBinary.ts +57 -0
- package/source/Filter/Normalize.ts +42 -0
- package/source/Filter/Pca.ts +104 -0
- package/source/Filter/TrainedFeatureFilter.ts +17 -0
- package/source/Instance/CompositeInstance.ts +53 -0
- package/source/Instance/Instance.ts +170 -0
- package/source/InstanceList/InstanceList.ts +519 -0
- package/source/InstanceList/InstanceListOfSameClass.ts +25 -0
- package/source/InstanceList/Partition.ts +131 -0
- package/source/Model/DecisionTree/DecisionCondition.ts +74 -0
- package/source/Model/DecisionTree/DecisionNode.ts +257 -0
- package/source/Model/DecisionTree/DecisionTree.ts +71 -0
- package/source/Model/DeepNetworkModel.ts +156 -0
- package/source/Model/DummyModel.ts +40 -0
- package/source/Model/GaussianModel.ts +58 -0
- package/source/Model/KMeansModel.ts +44 -0
- package/source/Model/KnnInstance.ts +27 -0
- package/source/Model/KnnModel.ts +78 -0
- package/source/Model/LdaModel.ts +39 -0
- package/source/Model/LinearPerceptronModel.ts +55 -0
- package/source/Model/Model.ts +22 -0
- package/source/Model/MultiLayerPerceptronModel.ts +95 -0
- package/source/Model/NaiveBayesModel.ts +89 -0
- package/source/Model/NeuralNetworkModel.ts +187 -0
- package/source/Model/QdaModel.ts +39 -0
- package/source/Model/RandomModel.ts +44 -0
- package/source/Model/TreeEnsembleModel.ts +43 -0
- package/source/Model/ValidatedModel.ts +23 -0
- package/source/Parameter/ActivationFunction.ts +3 -0
- package/source/Parameter/BaggingParameter.ts +26 -0
- package/source/Parameter/C45Parameter.ts +38 -0
- package/source/Parameter/DeepNetworkParameter.ts +59 -0
- package/source/Parameter/KMeansParameter.ts +33 -0
- package/source/Parameter/KnnParameter.ts +28 -0
- package/source/Parameter/LinearPerceptronParameter.ts +66 -0
- package/source/Parameter/MultiLayerPerceptronParameter.ts +49 -0
- package/source/Parameter/Parameter.ts +22 -0
- package/source/Parameter/RandomForestParameter.ts +27 -0
- package/source/Performance/ClassificationPerformance.ts +26 -0
- package/source/Performance/ConfusionMatrix.ts +175 -0
- package/source/Performance/DetailedClassificationPerformance.ts +26 -0
- package/source/Performance/ExperimentPerformance.ts +175 -0
- package/source/Performance/Performance.ts +22 -0
- package/source/StatisticalTest/Combined5x2F.ts +33 -0
- package/source/StatisticalTest/Combined5x2t.ts +33 -0
- package/source/StatisticalTest/Paired5x2t.ts +32 -0
- package/source/StatisticalTest/PairedTest.ts +24 -0
- package/source/StatisticalTest/Pairedt.ts +30 -0
- package/source/StatisticalTest/Sign.ts +41 -0
- package/source/StatisticalTest/StatisticalTestResult.ts +42 -0
- package/source/StatisticalTest/StatisticalTestResultType.ts +6 -0
- package/source/tsconfig.json +13 -0
- package/tsconfig.json +15 -0
|
@@ -0,0 +1,33 @@
|
|
|
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"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Performance = void 0;
|
|
13
|
+
class Performance {
|
|
14
|
+
/**
|
|
15
|
+
* Constructor that sets the error rate.
|
|
16
|
+
*
|
|
17
|
+
* @param errorRate Double input.
|
|
18
|
+
*/
|
|
19
|
+
constructor(errorRate) {
|
|
20
|
+
this.errorRate = errorRate;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Accessor for the error rate.
|
|
24
|
+
*
|
|
25
|
+
* @return Double errorRate.
|
|
26
|
+
*/
|
|
27
|
+
getErrorRate() {
|
|
28
|
+
return this.errorRate;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Performance = Performance;
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=Performance.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Performance.js","sourceRoot":"","sources":["../../source/Performance/Performance.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,MAAa,WAAW;QAIpB;;;;WAIG;QACH,YAAY,SAAiB;YACzB,IAAI,CAAC,SAAS,GAAG,SAAS,CAAA;QAC9B,CAAC;QAED;;;;WAIG;QACH,YAAY;YACR,OAAO,IAAI,CAAC,SAAS,CAAA;QACzB,CAAC;KACJ;IArBD,kCAqBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PairedTest } from "./PairedTest";
|
|
2
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
3
|
+
import { StatisticalTestResult } from "./StatisticalTestResult";
|
|
4
|
+
export declare class Combined5x2F extends PairedTest {
|
|
5
|
+
private testStatistic;
|
|
6
|
+
compareClassifiers(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance): StatisticalTestResult;
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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", "./PairedTest", "./StatisticalTestResult", "nlptoolkit-math/dist/Distribution"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Combined5x2F = void 0;
|
|
13
|
+
const PairedTest_1 = require("./PairedTest");
|
|
14
|
+
const StatisticalTestResult_1 = require("./StatisticalTestResult");
|
|
15
|
+
const Distribution_1 = require("nlptoolkit-math/dist/Distribution");
|
|
16
|
+
class Combined5x2F extends PairedTest_1.PairedTest {
|
|
17
|
+
testStatistic(classifier1, classifier2) {
|
|
18
|
+
let difference = new Array();
|
|
19
|
+
let numerator = 0;
|
|
20
|
+
for (let i = 0; i < classifier1.numberOfExperiments(); i++) {
|
|
21
|
+
difference.push(classifier1.getErrorRate(i) - classifier2.getErrorRate(i));
|
|
22
|
+
numerator += difference[i] * difference[i];
|
|
23
|
+
}
|
|
24
|
+
let denominator = 0;
|
|
25
|
+
for (let i = 0; i < classifier1.numberOfExperiments() / 2; i++) {
|
|
26
|
+
let mean = (difference[2 * i] + difference[2 * i + 1]) / 2;
|
|
27
|
+
let variance = (difference[2 * i] - mean) * (difference[2 * i] - mean) +
|
|
28
|
+
(difference[2 * i + 1] - mean) * (difference[2 * i + 1] - mean);
|
|
29
|
+
denominator += variance;
|
|
30
|
+
}
|
|
31
|
+
denominator *= 2;
|
|
32
|
+
return numerator / denominator;
|
|
33
|
+
}
|
|
34
|
+
compareClassifiers(classifier1, classifier2) {
|
|
35
|
+
let statistic = this.testStatistic(classifier1, classifier2);
|
|
36
|
+
let degreeOfFreedom1 = classifier1.numberOfExperiments();
|
|
37
|
+
let degreeOfFreedom2 = classifier1.numberOfExperiments() / 2;
|
|
38
|
+
return new StatisticalTestResult_1.StatisticalTestResult(Distribution_1.Distribution.fDistribution(statistic, degreeOfFreedom1, degreeOfFreedom2), true);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Combined5x2F = Combined5x2F;
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=Combined5x2F.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combined5x2F.js","sourceRoot":"","sources":["../../source/StatisticalTest/Combined5x2F.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mEAA8D;IAC9D,oEAA+D;IAE/D,MAAa,YAAa,SAAQ,uBAAU;QAEhC,aAAa,CAAC,WAAkC,EAAE,WAAkC;YACxF,IAAI,UAAU,GAAG,IAAI,KAAK,EAAU,CAAC;YACrC,IAAI,SAAS,GAAG,CAAC,CAAA;YACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;gBACvD,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3E,SAAS,IAAI,UAAU,CAAC,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,CAAC,CAAC;aAC9C;YACD,IAAI,WAAW,GAAG,CAAC,CAAC;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAC;gBAC3D,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC3D,IAAI,QAAQ,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;oBAClE,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;gBACpE,WAAW,IAAI,QAAQ,CAAC;aAC3B;YACD,WAAW,IAAI,CAAC,CAAC;YACjB,OAAO,SAAS,GAAG,WAAW,CAAC;QACnC,CAAC;QAED,kBAAkB,CAAC,WAAkC,EAAE,WAAkC;YACrF,IAAI,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC7D,IAAI,gBAAgB,GAAG,WAAW,CAAC,mBAAmB,EAAE,CAAC;YACzD,IAAI,gBAAgB,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;YAC7D,OAAO,IAAI,6CAAqB,CAAC,2BAAY,CAAC,aAAa,CAAC,SAAS,EAAE,gBAAgB,EAAE,gBAAgB,CAAC,EAAE,IAAI,CAAC,CAAC;QACtH,CAAC;KAEJ;IA3BD,oCA2BC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PairedTest } from "./PairedTest";
|
|
2
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
3
|
+
import { StatisticalTestResult } from "./StatisticalTestResult";
|
|
4
|
+
export declare class Combined5x2t extends PairedTest {
|
|
5
|
+
private testStatistic;
|
|
6
|
+
compareClassifiers(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance): StatisticalTestResult;
|
|
7
|
+
}
|
|
@@ -0,0 +1,43 @@
|
|
|
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", "./PairedTest", "./StatisticalTestResult", "nlptoolkit-math/dist/Distribution"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Combined5x2t = void 0;
|
|
13
|
+
const PairedTest_1 = require("./PairedTest");
|
|
14
|
+
const StatisticalTestResult_1 = require("./StatisticalTestResult");
|
|
15
|
+
const Distribution_1 = require("nlptoolkit-math/dist/Distribution");
|
|
16
|
+
class Combined5x2t extends PairedTest_1.PairedTest {
|
|
17
|
+
testStatistic(classifier1, classifier2) {
|
|
18
|
+
let difference = new Array();
|
|
19
|
+
for (let i = 0; i < classifier1.numberOfExperiments(); i++) {
|
|
20
|
+
difference.push(classifier1.getErrorRate(i) - classifier2.getErrorRate(i));
|
|
21
|
+
}
|
|
22
|
+
let denominator = 0;
|
|
23
|
+
let numerator = 0;
|
|
24
|
+
for (let i = 0; i < classifier1.numberOfExperiments() / 2; i++) {
|
|
25
|
+
let mean = (difference[2 * i] + difference[2 * i + 1]) / 2;
|
|
26
|
+
numerator += mean;
|
|
27
|
+
let variance = (difference[2 * i] - mean) * (difference[2 * i] - mean) +
|
|
28
|
+
(difference[2 * i + 1] - mean) * (difference[2 * i + 1] - mean);
|
|
29
|
+
denominator += variance;
|
|
30
|
+
}
|
|
31
|
+
numerator = Math.sqrt(10) * numerator / 5;
|
|
32
|
+
denominator = Math.sqrt(denominator / 5);
|
|
33
|
+
return numerator / denominator;
|
|
34
|
+
}
|
|
35
|
+
compareClassifiers(classifier1, classifier2) {
|
|
36
|
+
let statistic = this.testStatistic(classifier1, classifier2);
|
|
37
|
+
let degreeOfFreedom = classifier1.numberOfExperiments() / 2;
|
|
38
|
+
return new StatisticalTestResult_1.StatisticalTestResult(Distribution_1.Distribution.tDistribution(statistic, degreeOfFreedom), false);
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.Combined5x2t = Combined5x2t;
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=Combined5x2t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Combined5x2t.js","sourceRoot":"","sources":["../../source/StatisticalTest/Combined5x2t.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mEAA8D;IAC9D,oEAA+D;IAE/D,MAAa,YAAa,SAAQ,uBAAU;QAEhC,aAAa,CAAC,WAAkC,EAAE,WAAkC;YACxF,IAAI,UAAU,GAAG,IAAI,KAAK,EAAU,CAAC;YACrC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;gBACvD,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;aAC9E;YACD,IAAI,WAAW,GAAG,CAAC,CAAC;YACpB,IAAI,SAAS,GAAG,CAAC,CAAC;YAClB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAC;gBAC3D,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC3D,SAAS,IAAI,IAAI,CAAC;gBAClB,IAAI,QAAQ,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;oBAClE,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;gBACpE,WAAW,IAAI,QAAQ,CAAC;aAC3B;YACD,SAAS,GAAG,IAAI,CAAC,IAAI,CAAC,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC;YAC1C,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;YACzC,OAAO,SAAS,GAAG,WAAW,CAAC;QACnC,CAAC;QAED,kBAAkB,CAAC,WAAkC,EAAE,WAAkC;YACrF,IAAI,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC7D,IAAI,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;YAC5D,OAAO,IAAI,6CAAqB,CAAC,2BAAY,CAAC,aAAa,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC;QACpG,CAAC;KAEJ;IA3BD,oCA2BC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PairedTest } from "./PairedTest";
|
|
2
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
3
|
+
import { StatisticalTestResult } from "./StatisticalTestResult";
|
|
4
|
+
export declare class Paired5x2t extends PairedTest {
|
|
5
|
+
private testStatistic;
|
|
6
|
+
compareClassifiers(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance): StatisticalTestResult;
|
|
7
|
+
}
|
|
@@ -0,0 +1,42 @@
|
|
|
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", "./PairedTest", "./StatisticalTestResult", "nlptoolkit-math/dist/Distribution"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Paired5x2t = void 0;
|
|
13
|
+
const PairedTest_1 = require("./PairedTest");
|
|
14
|
+
const StatisticalTestResult_1 = require("./StatisticalTestResult");
|
|
15
|
+
const Distribution_1 = require("nlptoolkit-math/dist/Distribution");
|
|
16
|
+
class Paired5x2t extends PairedTest_1.PairedTest {
|
|
17
|
+
testStatistic(classifier1, classifier2) {
|
|
18
|
+
let difference = new Array();
|
|
19
|
+
let sum = 0.0;
|
|
20
|
+
for (let i = 0; i < classifier1.numberOfExperiments(); i++) {
|
|
21
|
+
difference.push(classifier1.getErrorRate(i) - classifier2.getErrorRate(i));
|
|
22
|
+
sum += difference[i];
|
|
23
|
+
}
|
|
24
|
+
let denominator = 0;
|
|
25
|
+
for (let i = 0; i < classifier1.numberOfExperiments() / 2; i++) {
|
|
26
|
+
let mean = (difference[2 * i] + difference[2 * i + 1]) / 2;
|
|
27
|
+
let variance = (difference[2 * i] - mean) * (difference[2 * i] - mean) +
|
|
28
|
+
(difference[2 * i + 1] - mean) * (difference[2 * i + 1] - mean);
|
|
29
|
+
denominator += variance;
|
|
30
|
+
}
|
|
31
|
+
denominator = Math.sqrt(denominator / 5);
|
|
32
|
+
return difference[0] / denominator;
|
|
33
|
+
}
|
|
34
|
+
compareClassifiers(classifier1, classifier2) {
|
|
35
|
+
let statistic = this.testStatistic(classifier1, classifier2);
|
|
36
|
+
let degreeOfFreedom = classifier1.numberOfExperiments() / 2;
|
|
37
|
+
return new StatisticalTestResult_1.StatisticalTestResult(Distribution_1.Distribution.tDistribution(statistic, degreeOfFreedom), false);
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.Paired5x2t = Paired5x2t;
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=Paired5x2t.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Paired5x2t.js","sourceRoot":"","sources":["../../source/StatisticalTest/Paired5x2t.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mEAA8D;IAC9D,oEAA+D;IAE/D,MAAa,UAAW,SAAQ,uBAAU;QAE9B,aAAa,CAAC,WAAkC,EAAE,WAAkC;YACxF,IAAI,UAAU,GAAG,IAAI,KAAK,EAAU,CAAC;YACrC,IAAI,GAAG,GAAG,GAAG,CAAC;YACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;gBACvD,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3E,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;aACxB;YACD,IAAI,WAAW,GAAG,CAAC,CAAC;YACpB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,EAAE,CAAC,EAAE,EAAC;gBAC3D,IAAI,IAAI,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC;gBAC3D,IAAI,QAAQ,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC;oBAClE,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,GAAG,CAAC,GAAG,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;gBACpE,WAAW,IAAI,QAAQ,CAAC;aAC3B;YACD,WAAW,GAAG,IAAI,CAAC,IAAI,CAAC,WAAW,GAAG,CAAC,CAAC,CAAC;YACzC,OAAO,UAAU,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC;QACvC,CAAC;QAED,kBAAkB,CAAC,WAAkC,EAAE,WAAkC;YACrF,IAAI,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC7D,IAAI,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;YAC5D,OAAO,IAAI,6CAAqB,CAAC,2BAAY,CAAC,aAAa,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC;QACpG,CAAC;KAEJ;IA1BD,gCA0BC"}
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
2
|
+
import { StatisticalTestResult } from "./StatisticalTestResult";
|
|
3
|
+
export declare abstract class PairedTest {
|
|
4
|
+
abstract compareClassifiers(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance): StatisticalTestResult;
|
|
5
|
+
compare(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance, alpha: number): number;
|
|
6
|
+
}
|
|
@@ -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", "./StatisticalTestResultType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.PairedTest = void 0;
|
|
13
|
+
const StatisticalTestResultType_1 = require("./StatisticalTestResultType");
|
|
14
|
+
class PairedTest {
|
|
15
|
+
compare(classifier1, classifier2, alpha) {
|
|
16
|
+
let testResult1 = this.compareClassifiers(classifier1, classifier2);
|
|
17
|
+
let testResult2 = this.compareClassifiers(classifier2, classifier1);
|
|
18
|
+
let testResultType1 = testResult1.oneTailed(alpha);
|
|
19
|
+
let testResultType2 = testResult2.oneTailed(alpha);
|
|
20
|
+
if (testResultType1 == StatisticalTestResultType_1.StatisticalTestResultType.REJECT) {
|
|
21
|
+
return 1;
|
|
22
|
+
}
|
|
23
|
+
else {
|
|
24
|
+
if (testResultType2 == StatisticalTestResultType_1.StatisticalTestResultType.REJECT) {
|
|
25
|
+
return -1;
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
return 0;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
exports.PairedTest = PairedTest;
|
|
34
|
+
});
|
|
35
|
+
//# sourceMappingURL=PairedTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"PairedTest.js","sourceRoot":"","sources":["../../source/StatisticalTest/PairedTest.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,2EAAsE;IAEtE,MAAsB,UAAU;QAI5B,OAAO,CAAC,WAAkC,EAAE,WAAkC,EAAE,KAAa;YACzF,IAAI,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YACpE,IAAI,WAAW,GAAG,IAAI,CAAC,kBAAkB,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YACpE,IAAI,eAAe,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnD,IAAI,eAAe,GAAG,WAAW,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;YACnD,IAAI,eAAe,IAAI,qDAAyB,CAAC,MAAM,EAAC;gBACpD,OAAO,CAAC,CAAC;aACZ;iBAAM;gBACH,IAAI,eAAe,IAAI,qDAAyB,CAAC,MAAM,EAAC;oBACpD,OAAO,CAAC,CAAC,CAAC;iBACb;qBAAM;oBACH,OAAO,CAAC,CAAC;iBACZ;aACJ;QACL,CAAC;KACJ;IAnBD,gCAmBC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { PairedTest } from "./PairedTest";
|
|
2
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
3
|
+
import { StatisticalTestResult } from "./StatisticalTestResult";
|
|
4
|
+
export declare class Pairedt extends PairedTest {
|
|
5
|
+
private testStatistic;
|
|
6
|
+
compareClassifiers(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance): StatisticalTestResult;
|
|
7
|
+
}
|
|
@@ -0,0 +1,40 @@
|
|
|
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", "./PairedTest", "./StatisticalTestResult", "nlptoolkit-math/dist/Distribution"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Pairedt = void 0;
|
|
13
|
+
const PairedTest_1 = require("./PairedTest");
|
|
14
|
+
const StatisticalTestResult_1 = require("./StatisticalTestResult");
|
|
15
|
+
const Distribution_1 = require("nlptoolkit-math/dist/Distribution");
|
|
16
|
+
class Pairedt extends PairedTest_1.PairedTest {
|
|
17
|
+
testStatistic(classifier1, classifier2) {
|
|
18
|
+
let difference = new Array();
|
|
19
|
+
let sum = 0.0;
|
|
20
|
+
for (let i = 0; i < classifier1.numberOfExperiments(); i++) {
|
|
21
|
+
difference.push(classifier1.getErrorRate(i) - classifier2.getErrorRate(i));
|
|
22
|
+
sum += difference[i];
|
|
23
|
+
}
|
|
24
|
+
let mean = sum / classifier1.numberOfExperiments();
|
|
25
|
+
sum = 0.0;
|
|
26
|
+
for (let i = 0; i < classifier1.numberOfExperiments(); i++) {
|
|
27
|
+
sum += (difference[i] - mean) * (difference[i] - mean);
|
|
28
|
+
}
|
|
29
|
+
let standardDeviation = Math.sqrt(sum / (classifier1.numberOfExperiments() - 1));
|
|
30
|
+
return Math.sqrt(classifier1.numberOfExperiments()) * mean / standardDeviation;
|
|
31
|
+
}
|
|
32
|
+
compareClassifiers(classifier1, classifier2) {
|
|
33
|
+
let statistic = this.testStatistic(classifier1, classifier2);
|
|
34
|
+
let degreeOfFreedom = classifier1.numberOfExperiments() - 1;
|
|
35
|
+
return new StatisticalTestResult_1.StatisticalTestResult(Distribution_1.Distribution.tDistribution(statistic, degreeOfFreedom), false);
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
exports.Pairedt = Pairedt;
|
|
39
|
+
});
|
|
40
|
+
//# sourceMappingURL=Pairedt.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Pairedt.js","sourceRoot":"","sources":["../../source/StatisticalTest/Pairedt.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mEAA8D;IAC9D,oEAA+D;IAE/D,MAAa,OAAQ,SAAQ,uBAAU;QAE3B,aAAa,CAAC,WAAkC,EAAE,WAAkC;YACxF,IAAI,UAAU,GAAG,IAAI,KAAK,EAAU,CAAC;YACrC,IAAI,GAAG,GAAG,GAAG,CAAC;YACd,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;gBACvD,UAAU,CAAC,IAAI,CAAC,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;gBAC3E,GAAG,IAAI,UAAU,CAAC,CAAC,CAAC,CAAC;aACxB;YACD,IAAI,IAAI,GAAG,GAAG,GAAG,WAAW,CAAC,mBAAmB,EAAE,CAAC;YACnD,GAAG,GAAG,GAAG,CAAC;YACV,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;gBACvD,GAAG,IAAI,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,UAAU,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,CAAC;aAC1D;YACD,IAAI,iBAAiB,GAAG,IAAI,CAAC,IAAI,CAAC,GAAG,GAAG,CAAC,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC,CAAC,CAAC;YACjF,OAAO,IAAI,CAAC,IAAI,CAAC,WAAW,CAAC,mBAAmB,EAAE,CAAC,GAAG,IAAI,GAAG,iBAAiB,CAAC;QACnF,CAAC;QAED,kBAAkB,CAAC,WAAkC,EAAE,WAAkC;YACrF,IAAI,SAAS,GAAG,IAAI,CAAC,aAAa,CAAC,WAAW,EAAE,WAAW,CAAC,CAAC;YAC7D,IAAI,eAAe,GAAG,WAAW,CAAC,mBAAmB,EAAE,GAAG,CAAC,CAAC;YAC5D,OAAO,IAAI,6CAAqB,CAAC,2BAAY,CAAC,aAAa,CAAC,SAAS,EAAE,eAAe,CAAC,EAAE,KAAK,CAAC,CAAC;QACpG,CAAC;KAEJ;IAxBD,0BAwBC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { PairedTest } from "./PairedTest";
|
|
2
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
3
|
+
import { StatisticalTestResult } from "./StatisticalTestResult";
|
|
4
|
+
export declare class Sign extends PairedTest {
|
|
5
|
+
private factorial;
|
|
6
|
+
private binomial;
|
|
7
|
+
compareClassifiers(classifier1: ExperimentPerformance, classifier2: ExperimentPerformance): StatisticalTestResult;
|
|
8
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
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", "./PairedTest", "./StatisticalTestResult"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.Sign = void 0;
|
|
13
|
+
const PairedTest_1 = require("./PairedTest");
|
|
14
|
+
const StatisticalTestResult_1 = require("./StatisticalTestResult");
|
|
15
|
+
class Sign extends PairedTest_1.PairedTest {
|
|
16
|
+
factorial(n) {
|
|
17
|
+
let result = 1;
|
|
18
|
+
for (let i = 2; i <= n; i++)
|
|
19
|
+
result *= i;
|
|
20
|
+
return result;
|
|
21
|
+
}
|
|
22
|
+
binomial(m, n) {
|
|
23
|
+
if (n == 0 || m == n) {
|
|
24
|
+
return 1;
|
|
25
|
+
}
|
|
26
|
+
else {
|
|
27
|
+
return this.factorial(m) / (this.factorial(n) * this.factorial(m - n));
|
|
28
|
+
}
|
|
29
|
+
}
|
|
30
|
+
compareClassifiers(classifier1, classifier2) {
|
|
31
|
+
let plus = 0, minus = 0;
|
|
32
|
+
for (let i = 0; i < classifier1.numberOfExperiments(); i++) {
|
|
33
|
+
if (classifier1.getErrorRate(i) < classifier2.getErrorRate(i)) {
|
|
34
|
+
plus++;
|
|
35
|
+
}
|
|
36
|
+
else {
|
|
37
|
+
if (classifier1.getErrorRate(i) > classifier2.getErrorRate(i)) {
|
|
38
|
+
minus++;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
let total = plus + minus;
|
|
43
|
+
let pValue = 0.0;
|
|
44
|
+
for (let i = 0; i <= plus; i++) {
|
|
45
|
+
pValue += this.binomial(total, i) / Math.pow(2, total);
|
|
46
|
+
}
|
|
47
|
+
return new StatisticalTestResult_1.StatisticalTestResult(pValue, false);
|
|
48
|
+
}
|
|
49
|
+
}
|
|
50
|
+
exports.Sign = Sign;
|
|
51
|
+
});
|
|
52
|
+
//# sourceMappingURL=Sign.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Sign.js","sourceRoot":"","sources":["../../source/StatisticalTest/Sign.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,mEAA8D;IAE9D,MAAa,IAAK,SAAQ,uBAAU;QAExB,SAAS,CAAC,CAAS;YACvB,IAAI,MAAM,GAAG,CAAC,CAAC;YACf,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,CAAC,EAAE,CAAC,EAAE;gBACvB,MAAM,IAAI,CAAC,CAAC;YAChB,OAAO,MAAM,CAAC;QAClB,CAAC;QAEO,QAAQ,CAAC,CAAS,EAAE,CAAS;YACjC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,IAAI,CAAC,EAAC;gBACjB,OAAO,CAAC,CAAC;aACZ;iBAAM;gBACH,OAAO,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC;aAC1E;QACL,CAAC;QAED,kBAAkB,CAAC,WAAkC,EAAE,WAAkC;YACrF,IAAI,IAAI,GAAG,CAAC,EAAE,KAAK,GAAG,CAAC,CAAC;YACxB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,WAAW,CAAC,mBAAmB,EAAE,EAAE,CAAC,EAAE,EAAC;gBACvD,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,EAAC;oBAC1D,IAAI,EAAE,CAAC;iBACV;qBAAM;oBACH,IAAI,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,GAAG,WAAW,CAAC,YAAY,CAAC,CAAC,CAAC,EAAC;wBAC1D,KAAK,EAAE,CAAC;qBACX;iBACJ;aACJ;YACD,IAAI,KAAK,GAAG,IAAI,GAAG,KAAK,CAAC;YACzB,IAAI,MAAM,GAAG,GAAG,CAAC;YACjB,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,IAAI,IAAI,EAAE,CAAC,EAAE,EAAC;gBAC3B,MAAM,IAAI,IAAI,CAAC,QAAQ,CAAC,KAAK,EAAE,CAAC,CAAC,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,EAAE,KAAK,CAAC,CAAC;aAC1D;YACD,OAAO,IAAI,6CAAqB,CAAC,MAAM,EAAE,KAAK,CAAC,CAAC;QACpD,CAAC;KAEJ;IApCD,oBAoCC"}
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { StatisticalTestResultType } from "./StatisticalTestResultType";
|
|
2
|
+
export declare class StatisticalTestResult {
|
|
3
|
+
private readonly pValue;
|
|
4
|
+
private readonly onlyTwoTailed;
|
|
5
|
+
constructor(pValue: number, onlyTwoTailed: boolean);
|
|
6
|
+
oneTailed(alpha: number): StatisticalTestResultType;
|
|
7
|
+
twoTailed(alpha: number): StatisticalTestResultType;
|
|
8
|
+
getPValue(): number;
|
|
9
|
+
}
|
|
@@ -0,0 +1,53 @@
|
|
|
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", "./StatisticalTestResultType"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StatisticalTestResult = void 0;
|
|
13
|
+
const StatisticalTestResultType_1 = require("./StatisticalTestResultType");
|
|
14
|
+
class StatisticalTestResult {
|
|
15
|
+
constructor(pValue, onlyTwoTailed) {
|
|
16
|
+
this.pValue = pValue;
|
|
17
|
+
this.onlyTwoTailed = onlyTwoTailed;
|
|
18
|
+
}
|
|
19
|
+
oneTailed(alpha) {
|
|
20
|
+
if (!this.onlyTwoTailed) {
|
|
21
|
+
if (this.pValue < alpha) {
|
|
22
|
+
return StatisticalTestResultType_1.StatisticalTestResultType.REJECT;
|
|
23
|
+
}
|
|
24
|
+
else {
|
|
25
|
+
return StatisticalTestResultType_1.StatisticalTestResultType.FAILED_TO_REJECT;
|
|
26
|
+
}
|
|
27
|
+
}
|
|
28
|
+
}
|
|
29
|
+
twoTailed(alpha) {
|
|
30
|
+
if (this.onlyTwoTailed) {
|
|
31
|
+
if (this.pValue < alpha) {
|
|
32
|
+
return StatisticalTestResultType_1.StatisticalTestResultType.REJECT;
|
|
33
|
+
}
|
|
34
|
+
else {
|
|
35
|
+
return StatisticalTestResultType_1.StatisticalTestResultType.FAILED_TO_REJECT;
|
|
36
|
+
}
|
|
37
|
+
}
|
|
38
|
+
else {
|
|
39
|
+
if (this.pValue < alpha / 2 || this.pValue > 1 - alpha / 2) {
|
|
40
|
+
return StatisticalTestResultType_1.StatisticalTestResultType.REJECT;
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
return StatisticalTestResultType_1.StatisticalTestResultType.FAILED_TO_REJECT;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
}
|
|
47
|
+
getPValue() {
|
|
48
|
+
return this.pValue;
|
|
49
|
+
}
|
|
50
|
+
}
|
|
51
|
+
exports.StatisticalTestResult = StatisticalTestResult;
|
|
52
|
+
});
|
|
53
|
+
//# sourceMappingURL=StatisticalTestResult.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatisticalTestResult.js","sourceRoot":"","sources":["../../source/StatisticalTest/StatisticalTestResult.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2EAAsE;IAEtE,MAAa,qBAAqB;QAK9B,YAAY,MAAc,EAAE,aAAsB;YAC9C,IAAI,CAAC,MAAM,GAAG,MAAM,CAAA;YACpB,IAAI,CAAC,aAAa,GAAG,aAAa,CAAA;QACtC,CAAC;QAED,SAAS,CAAC,KAAa;YACnB,IAAI,CAAC,IAAI,CAAC,aAAa,EAAC;gBACpB,IAAI,IAAI,CAAC,MAAM,GAAG,KAAK,EAAC;oBACpB,OAAO,qDAAyB,CAAC,MAAM,CAAC;iBAC3C;qBAAM;oBACH,OAAO,qDAAyB,CAAC,gBAAgB,CAAC;iBACrD;aACJ;QACL,CAAC;QAED,SAAS,CAAC,KAAa;YACnB,IAAI,IAAI,CAAC,aAAa,EAAC;gBACnB,IAAI,IAAI,CAAC,MAAM,GAAG,KAAK,EAAC;oBACpB,OAAO,qDAAyB,CAAC,MAAM,CAAC;iBAC3C;qBAAM;oBACH,OAAO,qDAAyB,CAAC,gBAAgB,CAAC;iBACrD;aACJ;iBAAM;gBACH,IAAI,IAAI,CAAC,MAAM,GAAG,KAAK,GAAG,CAAC,IAAI,IAAI,CAAC,MAAM,GAAG,CAAC,GAAG,KAAK,GAAG,CAAC,EAAC;oBACvD,OAAO,qDAAyB,CAAC,MAAM,CAAC;iBAC3C;qBAAM;oBACH,OAAO,qDAAyB,CAAC,gBAAgB,CAAC;iBACrD;aACJ;QACL,CAAC;QAED,SAAS;YACL,OAAO,IAAI,CAAC,MAAM,CAAA;QACtB,CAAC;KACJ;IAvCD,sDAuCC"}
|
|
@@ -0,0 +1,22 @@
|
|
|
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"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StatisticalTestResultType = void 0;
|
|
13
|
+
/***
|
|
14
|
+
* Enumerator class for statistical test results.
|
|
15
|
+
*/
|
|
16
|
+
var StatisticalTestResultType;
|
|
17
|
+
(function (StatisticalTestResultType) {
|
|
18
|
+
StatisticalTestResultType[StatisticalTestResultType["FAILED_TO_REJECT"] = 0] = "FAILED_TO_REJECT";
|
|
19
|
+
StatisticalTestResultType[StatisticalTestResultType["REJECT"] = 1] = "REJECT";
|
|
20
|
+
})(StatisticalTestResultType = exports.StatisticalTestResultType || (exports.StatisticalTestResultType = {}));
|
|
21
|
+
});
|
|
22
|
+
//# sourceMappingURL=StatisticalTestResultType.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StatisticalTestResultType.js","sourceRoot":"","sources":["../../source/StatisticalTest/StatisticalTestResultType.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA;;OAEG;IACH,IAAY,yBAEX;IAFD,WAAY,yBAAyB;QACjC,iGAAgB,CAAA;QAAE,6EAAM,CAAA;IAC5B,CAAC,EAFW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAEpC"}
|
package/index.js
ADDED
|
@@ -0,0 +1,100 @@
|
|
|
1
|
+
export * from "./dist/Attribute/Attribute"
|
|
2
|
+
export * from "./dist/Attribute/AttributeType"
|
|
3
|
+
export * from "./dist/Attribute/BinaryAttribute"
|
|
4
|
+
export * from "./dist/Attribute/ContinuousAttribute"
|
|
5
|
+
export * from "./dist/Attribute/DiscreteAttribute"
|
|
6
|
+
export * from "./dist/Attribute/DiscreteIndexedAttribute"
|
|
7
|
+
export * from "./dist/Classifier/Bagging"
|
|
8
|
+
export * from "./dist/Classifier/C45"
|
|
9
|
+
export * from "./dist/Classifier/C45Stump"
|
|
10
|
+
export * from "./dist/Classifier/Classifier"
|
|
11
|
+
export * from "./dist/Classifier/DeepNetwork"
|
|
12
|
+
export * from "./dist/Classifier/Dummy"
|
|
13
|
+
export * from "./dist/Classifier/KMeans"
|
|
14
|
+
export * from "./dist/Classifier/Knn"
|
|
15
|
+
export * from "./dist/Classifier/Lda"
|
|
16
|
+
export * from "./dist/Classifier/LinearPerceptron"
|
|
17
|
+
export * from "./dist/Classifier/MultiLayerPerceptron"
|
|
18
|
+
export * from "./dist/Classifier/NaiveBayes"
|
|
19
|
+
export * from "./dist/Classifier/Qda"
|
|
20
|
+
export * from "./dist/Classifier/RandomClassifier"
|
|
21
|
+
export * from "./dist/Classifier/RandomForest"
|
|
22
|
+
export * from "./dist/DataSet/DataDefinition"
|
|
23
|
+
export * from "./dist/DataSet/DataSet"
|
|
24
|
+
export * from "./dist/DistanceMetric/DistanceMetric"
|
|
25
|
+
export * from "./dist/DistanceMetric/EuclidianDistance"
|
|
26
|
+
export * from "./dist/DistanceMetric/MahalanobisDistance"
|
|
27
|
+
export * from "./dist/Experiment/BootstrapRun"
|
|
28
|
+
export * from "./dist/Experiment/Experiment"
|
|
29
|
+
export * from "./dist/Experiment/KFoldRun"
|
|
30
|
+
export * from "./dist/Experiment/KFoldRunSeparateTest"
|
|
31
|
+
export * from "./dist/Experiment/MultipleRun"
|
|
32
|
+
export * from "./dist/Experiment/MxKFoldRun"
|
|
33
|
+
export * from "./dist/Experiment/MxKFoldRunSeparateTest"
|
|
34
|
+
export * from "./dist/Experiment/SingleRun"
|
|
35
|
+
export * from "./dist/Experiment/SingleRunWithK"
|
|
36
|
+
export * from "./dist/Experiment/StratifiedKFoldRun"
|
|
37
|
+
export * from "./dist/Experiment/StratifiedKFoldRunSeparateTest"
|
|
38
|
+
export * from "./dist/Experiment/StratifiedMxKFoldRun"
|
|
39
|
+
export * from "./dist/Experiment/StratifiedMxKFoldRunSeparateTest"
|
|
40
|
+
export * from "./dist/Experiment/StratifiedSingleRunWithK"
|
|
41
|
+
export * from "./dist/FeatureSelection/BackwardSelection"
|
|
42
|
+
export * from "./dist/FeatureSelection/FeatureSubSet"
|
|
43
|
+
export * from "./dist/FeatureSelection/FloatingSelection"
|
|
44
|
+
export * from "./dist/FeatureSelection/ForwardSelection"
|
|
45
|
+
export * from "./dist/FeatureSelection/SubSetSelection"
|
|
46
|
+
export * from "./dist/Filter/DiscreteToContinuous"
|
|
47
|
+
export * from "./dist/Filter/DiscreteToIndexed"
|
|
48
|
+
export * from "./dist/Filter/FeatureFilter"
|
|
49
|
+
export * from "./dist/Filter/LaryFilter"
|
|
50
|
+
export * from "./dist/Filter/LaryToBinary"
|
|
51
|
+
export * from "./dist/Filter/Normalize"
|
|
52
|
+
export * from "./dist/Filter/Pca"
|
|
53
|
+
export * from "./dist/Filter/TrainedFeatureFilter"
|
|
54
|
+
export * from "./dist/Instance/CompositeInstance"
|
|
55
|
+
export * from "./dist/Instance/Instance"
|
|
56
|
+
export * from "./dist/InstanceList/InstanceList"
|
|
57
|
+
export * from "./dist/InstanceList/InstanceListOfSameClass"
|
|
58
|
+
export * from "./dist/InstanceList/Partition"
|
|
59
|
+
export * from "./dist/Model/DecisionTree/DecisionCondition"
|
|
60
|
+
export * from "./dist/Model/DecisionTree/DecisionNode"
|
|
61
|
+
export * from "./dist/Model/DecisionTree/DecisionTree"
|
|
62
|
+
export * from "./dist/Model/DeepNetworkModel"
|
|
63
|
+
export * from "./dist/Model/DummyModel"
|
|
64
|
+
export * from "./dist/Model/GaussianModel"
|
|
65
|
+
export * from "./dist/Model/KMeansModel"
|
|
66
|
+
export * from "./dist/Model/KnnInstance"
|
|
67
|
+
export * from "./dist/Model/KnnModel"
|
|
68
|
+
export * from "./dist/Model/LdaModel"
|
|
69
|
+
export * from "./dist/Model/LinearPerceptronModel"
|
|
70
|
+
export * from "./dist/Model/Model"
|
|
71
|
+
export * from "./dist/Model/MultiLayerPerceptronModel"
|
|
72
|
+
export * from "./dist/Model/NaiveBayesModel"
|
|
73
|
+
export * from "./dist/Model/NeuralNetworkModel"
|
|
74
|
+
export * from "./dist/Model/QdaModel"
|
|
75
|
+
export * from "./dist/Model/RandomModel"
|
|
76
|
+
export * from "./dist/Model/TreeEnsembleModel"
|
|
77
|
+
export * from "./dist/Model/ValidatedModel"
|
|
78
|
+
export * from "./dist/Parameter/ActivationFunction"
|
|
79
|
+
export * from "./dist/Parameter/BaggingParameter"
|
|
80
|
+
export * from "./dist/Parameter/C45Parameter"
|
|
81
|
+
export * from "./dist/Parameter/DeepNetworkParameter"
|
|
82
|
+
export * from "./dist/Parameter/KMeansParameter"
|
|
83
|
+
export * from "./dist/Parameter/KnnParameter"
|
|
84
|
+
export * from "./dist/Parameter/LinearPerceptronParameter"
|
|
85
|
+
export * from "./dist/Parameter/MultiLayerPerceptronParameter"
|
|
86
|
+
export * from "./dist/Parameter/Parameter"
|
|
87
|
+
export * from "./dist/Parameter/RandomForestParameter"
|
|
88
|
+
export * from "./dist/Performance/ClassificationPerformance"
|
|
89
|
+
export * from "./dist/Performance/ConfusionMatrix"
|
|
90
|
+
export * from "./dist/Performance/DetailedClassificationPerformance"
|
|
91
|
+
export * from "./dist/Performance/ExperimentPerformance"
|
|
92
|
+
export * from "./dist/Performance/Performance"
|
|
93
|
+
export * from "./dist/StatisticalTest/Combined5x2F"
|
|
94
|
+
export * from "./dist/StatisticalTest/Combined5x2t"
|
|
95
|
+
export * from "./dist/StatisticalTest/Paired5x2t"
|
|
96
|
+
export * from "./dist/StatisticalTest/Pairedt"
|
|
97
|
+
export * from "./dist/StatisticalTest/PairedTest"
|
|
98
|
+
export * from "./dist/StatisticalTest/Sign"
|
|
99
|
+
export * from "./dist/StatisticalTest/StatisticalTestResult"
|
|
100
|
+
export * from "./dist/StatisticalTest/StatisticalTestResultType"
|
package/package.json
ADDED
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "nlptoolkit-classification",
|
|
3
|
+
"version": "1.0.0",
|
|
4
|
+
"description": "Classification Library",
|
|
5
|
+
"main": "index.js",
|
|
6
|
+
"types": "index.js",
|
|
7
|
+
"scripts": {
|
|
8
|
+
"test": "Mocha"
|
|
9
|
+
},
|
|
10
|
+
"repository": {
|
|
11
|
+
"type": "git",
|
|
12
|
+
"url": "git+https://github.com/StarlangSoftware/Classification-Js.git"
|
|
13
|
+
},
|
|
14
|
+
"author": "Olcay Taner Yıldız",
|
|
15
|
+
"license": "ISC",
|
|
16
|
+
"bugs": {
|
|
17
|
+
"url": "https://github.com/StarlangSoftware/Classification-Js/issues"
|
|
18
|
+
},
|
|
19
|
+
"homepage": "https://github.com/StarlangSoftware/Classification-Js#readme",
|
|
20
|
+
"devDependencies": {
|
|
21
|
+
"@types/mocha": "^9.0.0",
|
|
22
|
+
"mocha": "^9.1.3",
|
|
23
|
+
"nlptoolkit-datastructure": "^1.0.0",
|
|
24
|
+
"nlptoolkit-math": "^1.0.0",
|
|
25
|
+
"nlptoolkit-sampling": "^1.0.0",
|
|
26
|
+
"nlptoolkit-util": "^1.0.2",
|
|
27
|
+
"ts-node": "^10.4.0",
|
|
28
|
+
"typescript": "^4.5.4"
|
|
29
|
+
}
|
|
30
|
+
}
|