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 @@
|
|
|
1
|
+
{"version":3,"file":"BaggingParameter.js","sourceRoot":"","sources":["../../source/Parameter/BaggingParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2CAAsC;IAEtC,MAAa,gBAAiB,SAAQ,qBAAS;QAI3C;;;;;WAKG;QACH,YAAY,IAAY,EAAE,YAAoB;YAC1C,KAAK,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;QACpC,CAAC;QAED;;;;WAIG;QACH,eAAe;YACX,OAAO,IAAI,CAAC,YAAY,CAAA;QAC5B,CAAC;KACJ;IAvBD,4CAuBC"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import { Parameter } from "./Parameter";
|
|
2
|
+
export declare class C45Parameter extends Parameter {
|
|
3
|
+
private prune;
|
|
4
|
+
private crossValidationRatio;
|
|
5
|
+
/**
|
|
6
|
+
* Parameters of the C4.5 univariate decision tree classifier.
|
|
7
|
+
*
|
|
8
|
+
* @param seed Seed is used for random number generation.
|
|
9
|
+
* @param prune Boolean value for prune.
|
|
10
|
+
* @param crossValidationRatio Double value for cross crossValidationRatio ratio.
|
|
11
|
+
*/
|
|
12
|
+
constructor(seed: number, prune: boolean, crossValidationRatio: number);
|
|
13
|
+
/**
|
|
14
|
+
* Accessor for the prune.
|
|
15
|
+
*
|
|
16
|
+
* @return Prune.
|
|
17
|
+
*/
|
|
18
|
+
isPrune(): boolean;
|
|
19
|
+
/**
|
|
20
|
+
* Accessor for the crossValidationRatio.
|
|
21
|
+
*
|
|
22
|
+
* @return crossValidationRatio.
|
|
23
|
+
*/
|
|
24
|
+
getCrossValidationRatio(): number;
|
|
25
|
+
}
|
|
@@ -0,0 +1,46 @@
|
|
|
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", "./Parameter"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.C45Parameter = void 0;
|
|
13
|
+
const Parameter_1 = require("./Parameter");
|
|
14
|
+
class C45Parameter extends Parameter_1.Parameter {
|
|
15
|
+
/**
|
|
16
|
+
* Parameters of the C4.5 univariate decision tree classifier.
|
|
17
|
+
*
|
|
18
|
+
* @param seed Seed is used for random number generation.
|
|
19
|
+
* @param prune Boolean value for prune.
|
|
20
|
+
* @param crossValidationRatio Double value for cross crossValidationRatio ratio.
|
|
21
|
+
*/
|
|
22
|
+
constructor(seed, prune, crossValidationRatio) {
|
|
23
|
+
super(seed);
|
|
24
|
+
this.prune = prune;
|
|
25
|
+
this.crossValidationRatio = crossValidationRatio;
|
|
26
|
+
}
|
|
27
|
+
/**
|
|
28
|
+
* Accessor for the prune.
|
|
29
|
+
*
|
|
30
|
+
* @return Prune.
|
|
31
|
+
*/
|
|
32
|
+
isPrune() {
|
|
33
|
+
return this.prune;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* Accessor for the crossValidationRatio.
|
|
37
|
+
*
|
|
38
|
+
* @return crossValidationRatio.
|
|
39
|
+
*/
|
|
40
|
+
getCrossValidationRatio() {
|
|
41
|
+
return this.crossValidationRatio;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
exports.C45Parameter = C45Parameter;
|
|
45
|
+
});
|
|
46
|
+
//# sourceMappingURL=C45Parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"C45Parameter.js","sourceRoot":"","sources":["../../source/Parameter/C45Parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2CAAsC;IAEtC,MAAa,YAAa,SAAQ,qBAAS;QAKvC;;;;;;WAMG;QACH,YAAY,IAAY,EAAE,KAAc,EAAE,oBAA4B;YAClE,KAAK,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;YAClB,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;QACpD,CAAC;QAED;;;;WAIG;QACH,OAAO;YACH,OAAO,IAAI,CAAC,KAAK,CAAA;QACrB,CAAC;QAED;;;;WAIG;QACH,uBAAuB;YACnB,OAAO,IAAI,CAAC,oBAAoB,CAAA;QACpC,CAAC;KACJ;IAnCD,oCAmCC"}
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import { LinearPerceptronParameter } from "./LinearPerceptronParameter";
|
|
2
|
+
import { ActivationFunction } from "./ActivationFunction";
|
|
3
|
+
export declare class DeepNetworkParameter extends LinearPerceptronParameter {
|
|
4
|
+
private hiddenLayers;
|
|
5
|
+
private activationFunction;
|
|
6
|
+
/**
|
|
7
|
+
* Parameters of the deep network classifier.
|
|
8
|
+
*
|
|
9
|
+
* @param seed Seed is used for random number generation.
|
|
10
|
+
* @param learningRate Double value for learning rate of the algorithm.
|
|
11
|
+
* @param etaDecrease Double value for decrease in eta of the algorithm.
|
|
12
|
+
* @param crossValidationRatio Double value for cross validation ratio of the algorithm.
|
|
13
|
+
* @param epoch Integer value for epoch number of the algorithm.
|
|
14
|
+
* @param hiddenLayers An integer {@link Array} for hidden layers of the algorithm.
|
|
15
|
+
* @param activationFunction Activation function
|
|
16
|
+
*/
|
|
17
|
+
constructor(seed: number, learningRate: number, etaDecrease: number, crossValidationRatio: number, epoch: number, hiddenLayers: Array<number>, activationFunction: ActivationFunction);
|
|
18
|
+
/**
|
|
19
|
+
* The layerSize method returns the size of the hiddenLayers {@link Array}.
|
|
20
|
+
*
|
|
21
|
+
* @return The size of the hiddenLayers {@link Array}.
|
|
22
|
+
*/
|
|
23
|
+
layerSize(): number;
|
|
24
|
+
/**
|
|
25
|
+
* The getHiddenNodes method takes a layer index as an input and returns the element at the given index of hiddenLayers
|
|
26
|
+
* {@link Array}.
|
|
27
|
+
*
|
|
28
|
+
* @param layerIndex Index of the layer.
|
|
29
|
+
* @return The element at the layerIndex of hiddenLayers {@link Array}.
|
|
30
|
+
*/
|
|
31
|
+
getHiddenNodes(layerIndex: number): number;
|
|
32
|
+
/**
|
|
33
|
+
* Accessor for the activation function.
|
|
34
|
+
*
|
|
35
|
+
* @return The activation function.
|
|
36
|
+
*/
|
|
37
|
+
getActivationFunction(): ActivationFunction;
|
|
38
|
+
}
|
|
@@ -0,0 +1,60 @@
|
|
|
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", "./LinearPerceptronParameter"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.DeepNetworkParameter = void 0;
|
|
13
|
+
const LinearPerceptronParameter_1 = require("./LinearPerceptronParameter");
|
|
14
|
+
class DeepNetworkParameter extends LinearPerceptronParameter_1.LinearPerceptronParameter {
|
|
15
|
+
/**
|
|
16
|
+
* Parameters of the deep network classifier.
|
|
17
|
+
*
|
|
18
|
+
* @param seed Seed is used for random number generation.
|
|
19
|
+
* @param learningRate Double value for learning rate of the algorithm.
|
|
20
|
+
* @param etaDecrease Double value for decrease in eta of the algorithm.
|
|
21
|
+
* @param crossValidationRatio Double value for cross validation ratio of the algorithm.
|
|
22
|
+
* @param epoch Integer value for epoch number of the algorithm.
|
|
23
|
+
* @param hiddenLayers An integer {@link Array} for hidden layers of the algorithm.
|
|
24
|
+
* @param activationFunction Activation function
|
|
25
|
+
*/
|
|
26
|
+
constructor(seed, learningRate, etaDecrease, crossValidationRatio, epoch, hiddenLayers, activationFunction) {
|
|
27
|
+
super(seed, learningRate, etaDecrease, crossValidationRatio, epoch);
|
|
28
|
+
this.hiddenLayers = hiddenLayers;
|
|
29
|
+
this.activationFunction = activationFunction;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* The layerSize method returns the size of the hiddenLayers {@link Array}.
|
|
33
|
+
*
|
|
34
|
+
* @return The size of the hiddenLayers {@link Array}.
|
|
35
|
+
*/
|
|
36
|
+
layerSize() {
|
|
37
|
+
return this.hiddenLayers.length;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* The getHiddenNodes method takes a layer index as an input and returns the element at the given index of hiddenLayers
|
|
41
|
+
* {@link Array}.
|
|
42
|
+
*
|
|
43
|
+
* @param layerIndex Index of the layer.
|
|
44
|
+
* @return The element at the layerIndex of hiddenLayers {@link Array}.
|
|
45
|
+
*/
|
|
46
|
+
getHiddenNodes(layerIndex) {
|
|
47
|
+
return this.hiddenLayers[layerIndex];
|
|
48
|
+
}
|
|
49
|
+
/**
|
|
50
|
+
* Accessor for the activation function.
|
|
51
|
+
*
|
|
52
|
+
* @return The activation function.
|
|
53
|
+
*/
|
|
54
|
+
getActivationFunction() {
|
|
55
|
+
return this.activationFunction;
|
|
56
|
+
}
|
|
57
|
+
}
|
|
58
|
+
exports.DeepNetworkParameter = DeepNetworkParameter;
|
|
59
|
+
});
|
|
60
|
+
//# sourceMappingURL=DeepNetworkParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"DeepNetworkParameter.js","sourceRoot":"","sources":["../../source/Parameter/DeepNetworkParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2EAAsE;IAGtE,MAAa,oBAAqB,SAAQ,qDAAyB;QAI/D;;;;;;;;;;WAUG;QACH,YAAY,IAAY,EACZ,YAAoB,EACpB,WAAmB,EACnB,oBAA4B,EAC5B,KAAa,EACb,YAA2B,EAC3B,kBAAsC;YAC9C,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;YACpE,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;YAChC,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAA;QAChD,CAAC;QAED;;;;WAIG;QACH,SAAS;YACL,OAAO,IAAI,CAAC,YAAY,CAAC,MAAM,CAAA;QACnC,CAAC;QAED;;;;;;WAMG;QACH,cAAc,CAAC,UAAkB;YAC7B,OAAO,IAAI,CAAC,YAAY,CAAC,UAAU,CAAC,CAAA;QACxC,CAAC;QAED;;;;WAIG;QACH,qBAAqB;YACjB,OAAO,IAAI,CAAC,kBAAkB,CAAA;QAClC,CAAC;KACJ;IAvDD,oDAuDC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Parameter } from "./Parameter";
|
|
2
|
+
import { DistanceMetric } from "../DistanceMetric/DistanceMetric";
|
|
3
|
+
export declare class KMeansParameter extends Parameter {
|
|
4
|
+
protected distanceMetric: DistanceMetric;
|
|
5
|
+
/**
|
|
6
|
+
* * Parameters of the K Means classifier.
|
|
7
|
+
*
|
|
8
|
+
* @param seed Seed is used for random number generation.
|
|
9
|
+
* @param distanceMetric distance metric used to calculate the distance between two instances.
|
|
10
|
+
*/
|
|
11
|
+
constructor(seed: number, distanceMetric?: DistanceMetric);
|
|
12
|
+
/**
|
|
13
|
+
* Accessor for the distanceMetric.
|
|
14
|
+
*
|
|
15
|
+
* @return The distanceMetric.
|
|
16
|
+
*/
|
|
17
|
+
getDistanceMetric(): DistanceMetric;
|
|
18
|
+
}
|
|
@@ -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", "./Parameter", "../DistanceMetric/EuclidianDistance"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.KMeansParameter = void 0;
|
|
13
|
+
const Parameter_1 = require("./Parameter");
|
|
14
|
+
const EuclidianDistance_1 = require("../DistanceMetric/EuclidianDistance");
|
|
15
|
+
class KMeansParameter extends Parameter_1.Parameter {
|
|
16
|
+
/**
|
|
17
|
+
* * Parameters of the K Means classifier.
|
|
18
|
+
*
|
|
19
|
+
* @param seed Seed is used for random number generation.
|
|
20
|
+
* @param distanceMetric distance metric used to calculate the distance between two instances.
|
|
21
|
+
*/
|
|
22
|
+
constructor(seed, distanceMetric) {
|
|
23
|
+
super(seed);
|
|
24
|
+
if (distanceMetric == undefined) {
|
|
25
|
+
this.distanceMetric = new EuclidianDistance_1.EuclidianDistance();
|
|
26
|
+
}
|
|
27
|
+
else {
|
|
28
|
+
this.distanceMetric = distanceMetric;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Accessor for the distanceMetric.
|
|
33
|
+
*
|
|
34
|
+
* @return The distanceMetric.
|
|
35
|
+
*/
|
|
36
|
+
getDistanceMetric() {
|
|
37
|
+
return this.distanceMetric;
|
|
38
|
+
}
|
|
39
|
+
}
|
|
40
|
+
exports.KMeansParameter = KMeansParameter;
|
|
41
|
+
});
|
|
42
|
+
//# sourceMappingURL=KMeansParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KMeansParameter.js","sourceRoot":"","sources":["../../source/Parameter/KMeansParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2CAAsC;IAEtC,2EAAsE;IAEtE,MAAa,eAAgB,SAAQ,qBAAS;QAI1C;;;;;WAKG;QACH,YAAY,IAAY,EAAE,cAA+B;YACrD,KAAK,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,cAAc,IAAI,SAAS,EAAC;gBAC5B,IAAI,CAAC,cAAc,GAAG,IAAI,qCAAiB,EAAE,CAAA;aAChD;iBAAM;gBACH,IAAI,CAAC,cAAc,GAAG,cAAc,CAAA;aACvC;QACL,CAAC;QAED;;;;WAIG;QACH,iBAAiB;YACb,OAAO,IAAI,CAAC,cAAc,CAAA;QAC9B,CAAC;KAEJ;IA5BD,0CA4BC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { KMeansParameter } from "./KMeansParameter";
|
|
2
|
+
import { DistanceMetric } from "../DistanceMetric/DistanceMetric";
|
|
3
|
+
export declare class KnnParameter extends KMeansParameter {
|
|
4
|
+
private k;
|
|
5
|
+
/**
|
|
6
|
+
* Parameters of the K-nearest neighbor classifier.
|
|
7
|
+
*
|
|
8
|
+
* @param seed Seed is used for random number generation.
|
|
9
|
+
* @param k Parameter of the K-nearest neighbor algorithm.
|
|
10
|
+
* @param distanceMetric Used to calculate the distance between two instances.
|
|
11
|
+
*/
|
|
12
|
+
constructor(seed: number, k: number, distanceMetric?: DistanceMetric);
|
|
13
|
+
/**
|
|
14
|
+
* Accessor for the k.
|
|
15
|
+
*
|
|
16
|
+
* @return Value of the k.
|
|
17
|
+
*/
|
|
18
|
+
getK(): number;
|
|
19
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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", "./KMeansParameter"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.KnnParameter = void 0;
|
|
13
|
+
const KMeansParameter_1 = require("./KMeansParameter");
|
|
14
|
+
class KnnParameter extends KMeansParameter_1.KMeansParameter {
|
|
15
|
+
/**
|
|
16
|
+
* Parameters of the K-nearest neighbor classifier.
|
|
17
|
+
*
|
|
18
|
+
* @param seed Seed is used for random number generation.
|
|
19
|
+
* @param k Parameter of the K-nearest neighbor algorithm.
|
|
20
|
+
* @param distanceMetric Used to calculate the distance between two instances.
|
|
21
|
+
*/
|
|
22
|
+
constructor(seed, k, distanceMetric) {
|
|
23
|
+
super(seed, distanceMetric);
|
|
24
|
+
this.k = k;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Accessor for the k.
|
|
28
|
+
*
|
|
29
|
+
* @return Value of the k.
|
|
30
|
+
*/
|
|
31
|
+
getK() {
|
|
32
|
+
return this.k;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.KnnParameter = KnnParameter;
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=KnnParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"KnnParameter.js","sourceRoot":"","sources":["../../source/Parameter/KnnParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uDAAkD;IAGlD,MAAa,YAAa,SAAQ,iCAAe;QAI7C;;;;;;WAMG;QACH,YAAY,IAAY,EAAE,CAAS,EAAE,cAA+B;YAChE,KAAK,CAAC,IAAI,EAAE,cAAc,CAAC,CAAC;YAC5B,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACd,CAAC;QAED;;;;WAIG;QACH,IAAI;YACA,OAAO,IAAI,CAAC,CAAC,CAAA;QACjB,CAAC;KACJ;IAxBD,oCAwBC"}
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { Parameter } from "./Parameter";
|
|
2
|
+
export declare class LinearPerceptronParameter extends Parameter {
|
|
3
|
+
private learningRate;
|
|
4
|
+
private etaDecrease;
|
|
5
|
+
private crossValidationRatio;
|
|
6
|
+
private epoch;
|
|
7
|
+
/**
|
|
8
|
+
* Parameters of the linear perceptron algorithm.
|
|
9
|
+
*
|
|
10
|
+
* @param seed Seed is used for random number generation.
|
|
11
|
+
* @param learningRate Double value for learning rate of the algorithm.
|
|
12
|
+
* @param etaDecrease Double value for decrease in eta of the algorithm.
|
|
13
|
+
* @param crossValidationRatio Double value for cross validation ratio of the algorithm.
|
|
14
|
+
* @param epoch Integer value for epoch number of the algorithm.
|
|
15
|
+
*/
|
|
16
|
+
constructor(seed: number, learningRate: number, etaDecrease: number, crossValidationRatio: number, epoch: number);
|
|
17
|
+
/**
|
|
18
|
+
* Accessor for the learningRate.
|
|
19
|
+
*
|
|
20
|
+
* @return The learningRate.
|
|
21
|
+
*/
|
|
22
|
+
getLearningRate(): number;
|
|
23
|
+
/**
|
|
24
|
+
* Accessor for the etaDecrease.
|
|
25
|
+
*
|
|
26
|
+
* @return The etaDecrease.
|
|
27
|
+
*/
|
|
28
|
+
getEtaDecrease(): number;
|
|
29
|
+
/**
|
|
30
|
+
* Accessor for the crossValidationRatio.
|
|
31
|
+
*
|
|
32
|
+
* @return The crossValidationRatio.
|
|
33
|
+
*/
|
|
34
|
+
getCrossValidationRatio(): number;
|
|
35
|
+
/**
|
|
36
|
+
* Accessor for the epoch.
|
|
37
|
+
*
|
|
38
|
+
* @return The epoch.
|
|
39
|
+
*/
|
|
40
|
+
getEpoch(): number;
|
|
41
|
+
}
|
|
@@ -0,0 +1,66 @@
|
|
|
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", "./Parameter"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.LinearPerceptronParameter = void 0;
|
|
13
|
+
const Parameter_1 = require("./Parameter");
|
|
14
|
+
class LinearPerceptronParameter extends Parameter_1.Parameter {
|
|
15
|
+
/**
|
|
16
|
+
* Parameters of the linear perceptron algorithm.
|
|
17
|
+
*
|
|
18
|
+
* @param seed Seed is used for random number generation.
|
|
19
|
+
* @param learningRate Double value for learning rate of the algorithm.
|
|
20
|
+
* @param etaDecrease Double value for decrease in eta of the algorithm.
|
|
21
|
+
* @param crossValidationRatio Double value for cross validation ratio of the algorithm.
|
|
22
|
+
* @param epoch Integer value for epoch number of the algorithm.
|
|
23
|
+
*/
|
|
24
|
+
constructor(seed, learningRate, etaDecrease, crossValidationRatio, epoch) {
|
|
25
|
+
super(seed);
|
|
26
|
+
this.learningRate = learningRate;
|
|
27
|
+
this.etaDecrease = etaDecrease;
|
|
28
|
+
this.crossValidationRatio = crossValidationRatio;
|
|
29
|
+
this.epoch = epoch;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Accessor for the learningRate.
|
|
33
|
+
*
|
|
34
|
+
* @return The learningRate.
|
|
35
|
+
*/
|
|
36
|
+
getLearningRate() {
|
|
37
|
+
return this.learningRate;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Accessor for the etaDecrease.
|
|
41
|
+
*
|
|
42
|
+
* @return The etaDecrease.
|
|
43
|
+
*/
|
|
44
|
+
getEtaDecrease() {
|
|
45
|
+
return this.etaDecrease;
|
|
46
|
+
}
|
|
47
|
+
/**
|
|
48
|
+
* Accessor for the crossValidationRatio.
|
|
49
|
+
*
|
|
50
|
+
* @return The crossValidationRatio.
|
|
51
|
+
*/
|
|
52
|
+
getCrossValidationRatio() {
|
|
53
|
+
return this.crossValidationRatio;
|
|
54
|
+
}
|
|
55
|
+
/**
|
|
56
|
+
* Accessor for the epoch.
|
|
57
|
+
*
|
|
58
|
+
* @return The epoch.
|
|
59
|
+
*/
|
|
60
|
+
getEpoch() {
|
|
61
|
+
return this.epoch;
|
|
62
|
+
}
|
|
63
|
+
}
|
|
64
|
+
exports.LinearPerceptronParameter = LinearPerceptronParameter;
|
|
65
|
+
});
|
|
66
|
+
//# sourceMappingURL=LinearPerceptronParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"LinearPerceptronParameter.js","sourceRoot":"","sources":["../../source/Parameter/LinearPerceptronParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2CAAsC;IAEtC,MAAa,yBAA0B,SAAQ,qBAAS;QAOpD;;;;;;;;WAQG;QACH,YAAY,IAAY,EACZ,YAAoB,EACpB,WAAmB,EACnB,oBAA4B,EAC5B,KAAa;YACrB,KAAK,CAAC,IAAI,CAAC,CAAC;YACZ,IAAI,CAAC,YAAY,GAAG,YAAY,CAAA;YAChC,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;YAC9B,IAAI,CAAC,oBAAoB,GAAG,oBAAoB,CAAA;YAChD,IAAI,CAAC,KAAK,GAAG,KAAK,CAAA;QACtB,CAAC;QAED;;;;WAIG;QACH,eAAe;YACX,OAAO,IAAI,CAAC,YAAY,CAAA;QAC5B,CAAC;QAED;;;;WAIG;QACH,cAAc;YACV,OAAO,IAAI,CAAC,WAAW,CAAA;QAC3B,CAAC;QAED;;;;WAIG;QACH,uBAAuB;YACnB,OAAO,IAAI,CAAC,oBAAoB,CAAA;QACpC,CAAC;QAED;;;;WAIG;QACH,QAAQ;YACJ,OAAO,IAAI,CAAC,KAAK,CAAA;QACrB,CAAC;KACJ;IA/DD,8DA+DC"}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import { LinearPerceptronParameter } from "./LinearPerceptronParameter";
|
|
2
|
+
import { ActivationFunction } from "./ActivationFunction";
|
|
3
|
+
export declare class MultiLayerPerceptronParameter extends LinearPerceptronParameter {
|
|
4
|
+
private hiddenNodes;
|
|
5
|
+
private activationFunction;
|
|
6
|
+
/**
|
|
7
|
+
* Parameters of the multi layer perceptron algorithm.
|
|
8
|
+
*
|
|
9
|
+
* @param seed Seed is used for random number generation.
|
|
10
|
+
* @param learningRate Double value for learning rate of the algorithm.
|
|
11
|
+
* @param etaDecrease Double value for decrease in eta of the algorithm.
|
|
12
|
+
* @param crossValidationRatio Double value for cross validation ratio of the algorithm.
|
|
13
|
+
* @param epoch Integer value for epoch number of the algorithm.
|
|
14
|
+
* @param hiddenNodes Integer value for the number of hidden nodes.
|
|
15
|
+
* @param activationFunction Activation function
|
|
16
|
+
*/
|
|
17
|
+
constructor(seed: number, learningRate: number, etaDecrease: number, crossValidationRatio: number, epoch: number, hiddenNodes: number, activationFunction: ActivationFunction);
|
|
18
|
+
/**
|
|
19
|
+
* Accessor for the hiddenNodes.
|
|
20
|
+
*
|
|
21
|
+
* @return The hiddenNodes.
|
|
22
|
+
*/
|
|
23
|
+
getHiddenNodes(): number;
|
|
24
|
+
/**
|
|
25
|
+
* Accessor for the activation function.
|
|
26
|
+
*
|
|
27
|
+
* @return The activation function.
|
|
28
|
+
*/
|
|
29
|
+
getActivationFunction(): ActivationFunction;
|
|
30
|
+
}
|
|
@@ -0,0 +1,50 @@
|
|
|
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", "./LinearPerceptronParameter"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MultiLayerPerceptronParameter = void 0;
|
|
13
|
+
const LinearPerceptronParameter_1 = require("./LinearPerceptronParameter");
|
|
14
|
+
class MultiLayerPerceptronParameter extends LinearPerceptronParameter_1.LinearPerceptronParameter {
|
|
15
|
+
/**
|
|
16
|
+
* Parameters of the multi layer perceptron algorithm.
|
|
17
|
+
*
|
|
18
|
+
* @param seed Seed is used for random number generation.
|
|
19
|
+
* @param learningRate Double value for learning rate of the algorithm.
|
|
20
|
+
* @param etaDecrease Double value for decrease in eta of the algorithm.
|
|
21
|
+
* @param crossValidationRatio Double value for cross validation ratio of the algorithm.
|
|
22
|
+
* @param epoch Integer value for epoch number of the algorithm.
|
|
23
|
+
* @param hiddenNodes Integer value for the number of hidden nodes.
|
|
24
|
+
* @param activationFunction Activation function
|
|
25
|
+
*/
|
|
26
|
+
constructor(seed, learningRate, etaDecrease, crossValidationRatio, epoch, hiddenNodes, activationFunction) {
|
|
27
|
+
super(seed, learningRate, etaDecrease, crossValidationRatio, epoch);
|
|
28
|
+
this.hiddenNodes = hiddenNodes;
|
|
29
|
+
this.activationFunction = activationFunction;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Accessor for the hiddenNodes.
|
|
33
|
+
*
|
|
34
|
+
* @return The hiddenNodes.
|
|
35
|
+
*/
|
|
36
|
+
getHiddenNodes() {
|
|
37
|
+
return this.hiddenNodes;
|
|
38
|
+
}
|
|
39
|
+
/**
|
|
40
|
+
* Accessor for the activation function.
|
|
41
|
+
*
|
|
42
|
+
* @return The activation function.
|
|
43
|
+
*/
|
|
44
|
+
getActivationFunction() {
|
|
45
|
+
return this.activationFunction;
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
exports.MultiLayerPerceptronParameter = MultiLayerPerceptronParameter;
|
|
49
|
+
});
|
|
50
|
+
//# sourceMappingURL=MultiLayerPerceptronParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MultiLayerPerceptronParameter.js","sourceRoot":"","sources":["../../source/Parameter/MultiLayerPerceptronParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,2EAAsE;IAGtE,MAAa,6BAA8B,SAAQ,qDAAyB;QAKxE;;;;;;;;;;WAUG;QACH,YAAY,IAAY,EACZ,YAAoB,EACpB,WAAmB,EACnB,oBAA4B,EAC5B,KAAa,EACb,WAAmB,EACnB,kBAAsC;YAC9C,KAAK,CAAC,IAAI,EAAE,YAAY,EAAE,WAAW,EAAE,oBAAoB,EAAE,KAAK,CAAC,CAAC;YACpE,IAAI,CAAC,WAAW,GAAG,WAAW,CAAA;YAC9B,IAAI,CAAC,kBAAkB,GAAG,kBAAkB,CAAA;QAChD,CAAC;QAED;;;;WAIG;QACH,cAAc;YACV,OAAO,IAAI,CAAC,WAAW,CAAA;QAC3B,CAAC;QAED;;;;WAIG;QACH,qBAAqB;YACjB,OAAO,IAAI,CAAC,kBAAkB,CAAA;QAClC,CAAC;KACJ;IA7CD,sEA6CC"}
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
export declare class Parameter {
|
|
2
|
+
private seed;
|
|
3
|
+
/**
|
|
4
|
+
* Constructor of {@link Parameter} class which assigns given seed value to seed.
|
|
5
|
+
*
|
|
6
|
+
* @param seed Seed is used for random number generation.
|
|
7
|
+
*/
|
|
8
|
+
constructor(seed: number);
|
|
9
|
+
/**
|
|
10
|
+
* Accessor for the seed.
|
|
11
|
+
*
|
|
12
|
+
* @return The seed.
|
|
13
|
+
*/
|
|
14
|
+
getSeed(): number;
|
|
15
|
+
}
|
|
@@ -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.Parameter = void 0;
|
|
13
|
+
class Parameter {
|
|
14
|
+
/**
|
|
15
|
+
* Constructor of {@link Parameter} class which assigns given seed value to seed.
|
|
16
|
+
*
|
|
17
|
+
* @param seed Seed is used for random number generation.
|
|
18
|
+
*/
|
|
19
|
+
constructor(seed) {
|
|
20
|
+
this.seed = seed;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* Accessor for the seed.
|
|
24
|
+
*
|
|
25
|
+
* @return The seed.
|
|
26
|
+
*/
|
|
27
|
+
getSeed() {
|
|
28
|
+
return this.seed;
|
|
29
|
+
}
|
|
30
|
+
}
|
|
31
|
+
exports.Parameter = Parameter;
|
|
32
|
+
});
|
|
33
|
+
//# sourceMappingURL=Parameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Parameter.js","sourceRoot":"","sources":["../../source/Parameter/Parameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,MAAa,SAAS;QAIlB;;;;WAIG;QACH,YAAY,IAAY;YACpB,IAAI,CAAC,IAAI,GAAG,IAAI,CAAA;QACpB,CAAC;QAED;;;;WAIG;QACH,OAAO;YACH,OAAO,IAAI,CAAC,IAAI,CAAA;QACpB,CAAC;KACJ;IArBD,8BAqBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { BaggingParameter } from "./BaggingParameter";
|
|
2
|
+
export declare class RandomForestParameter extends BaggingParameter {
|
|
3
|
+
attributeSubsetSize: number;
|
|
4
|
+
/**
|
|
5
|
+
* Parameters of the random forest classifier.
|
|
6
|
+
*
|
|
7
|
+
* @param seed Seed is used for random number generation.
|
|
8
|
+
* @param ensembleSize The number of trees in the bagged forest.
|
|
9
|
+
* @param attributeSubsetSize Integer value for the size of attribute subset.
|
|
10
|
+
*/
|
|
11
|
+
constructor(seed: number, ensembleSize: number, attributeSubsetSize: number);
|
|
12
|
+
/**
|
|
13
|
+
* Accessor for the attributeSubsetSize.
|
|
14
|
+
*
|
|
15
|
+
* @return The attributeSubsetSize.
|
|
16
|
+
*/
|
|
17
|
+
getAttributeSubsetSize(): number;
|
|
18
|
+
}
|
|
@@ -0,0 +1,37 @@
|
|
|
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", "./BaggingParameter"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.RandomForestParameter = void 0;
|
|
13
|
+
const BaggingParameter_1 = require("./BaggingParameter");
|
|
14
|
+
class RandomForestParameter extends BaggingParameter_1.BaggingParameter {
|
|
15
|
+
/**
|
|
16
|
+
* Parameters of the random forest classifier.
|
|
17
|
+
*
|
|
18
|
+
* @param seed Seed is used for random number generation.
|
|
19
|
+
* @param ensembleSize The number of trees in the bagged forest.
|
|
20
|
+
* @param attributeSubsetSize Integer value for the size of attribute subset.
|
|
21
|
+
*/
|
|
22
|
+
constructor(seed, ensembleSize, attributeSubsetSize) {
|
|
23
|
+
super(seed, ensembleSize);
|
|
24
|
+
this.attributeSubsetSize = attributeSubsetSize;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Accessor for the attributeSubsetSize.
|
|
28
|
+
*
|
|
29
|
+
* @return The attributeSubsetSize.
|
|
30
|
+
*/
|
|
31
|
+
getAttributeSubsetSize() {
|
|
32
|
+
return this.attributeSubsetSize;
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.RandomForestParameter = RandomForestParameter;
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=RandomForestParameter.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"RandomForestParameter.js","sourceRoot":"","sources":["../../source/Parameter/RandomForestParameter.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,yDAAoD;IAEpD,MAAa,qBAAsB,SAAQ,mCAAgB;QAIvD;;;;;;WAMG;QACH,YAAY,IAAY,EAAE,YAAoB,EAAE,mBAA2B;YACvE,KAAK,CAAC,IAAI,EAAE,YAAY,CAAC,CAAC;YAC1B,IAAI,CAAC,mBAAmB,GAAG,mBAAmB,CAAA;QAClD,CAAC;QAED;;;;WAIG;QACH,sBAAsB;YAClB,OAAO,IAAI,CAAC,mBAAmB,CAAA;QACnC,CAAC;KACJ;IAxBD,sDAwBC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { Performance } from "./Performance";
|
|
2
|
+
export declare class ClassificationPerformance extends Performance {
|
|
3
|
+
private readonly accuracy;
|
|
4
|
+
/**
|
|
5
|
+
* A constructor that sets the accuracy and errorRate via given input.
|
|
6
|
+
*
|
|
7
|
+
* @param accuracy Double value input.
|
|
8
|
+
* @param errorRate Double value input.
|
|
9
|
+
*/
|
|
10
|
+
constructor(accuracy: number, errorRate?: number);
|
|
11
|
+
/**
|
|
12
|
+
* Accessor for the accuracy.
|
|
13
|
+
*
|
|
14
|
+
* @return Accuracy value.
|
|
15
|
+
*/
|
|
16
|
+
getAccuracy(): number;
|
|
17
|
+
}
|