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,48 @@
|
|
|
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", "./KFoldRunSeparateTest", "../Performance/ExperimentPerformance", "../InstanceList/Partition", "nlptoolkit-sampling/dist/KFoldCrossValidation"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.MxKFoldRunSeparateTest = void 0;
|
|
13
|
+
const KFoldRunSeparateTest_1 = require("./KFoldRunSeparateTest");
|
|
14
|
+
const ExperimentPerformance_1 = require("../Performance/ExperimentPerformance");
|
|
15
|
+
const Partition_1 = require("../InstanceList/Partition");
|
|
16
|
+
const KFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/KFoldCrossValidation");
|
|
17
|
+
class MxKFoldRunSeparateTest extends KFoldRunSeparateTest_1.KFoldRunSeparateTest {
|
|
18
|
+
/**
|
|
19
|
+
* Constructor for KFoldRunSeparateTest class. Basically sets K parameter of the K-fold cross-validation and M for
|
|
20
|
+
* the number of times.
|
|
21
|
+
*
|
|
22
|
+
* @param M number of cross-validation times.
|
|
23
|
+
* @param K K of the K-fold cross-validation.
|
|
24
|
+
*/
|
|
25
|
+
constructor(M, K) {
|
|
26
|
+
super(K);
|
|
27
|
+
this.M = M;
|
|
28
|
+
}
|
|
29
|
+
/**
|
|
30
|
+
* Execute the MxKFold run with separate test set with the given classifier on the given data set using the given parameters.
|
|
31
|
+
*
|
|
32
|
+
* @param experiment Experiment to be run.
|
|
33
|
+
* @return An ExperimentPerformance instance.
|
|
34
|
+
*/
|
|
35
|
+
execute(experiment) {
|
|
36
|
+
let result = new ExperimentPerformance_1.ExperimentPerformance();
|
|
37
|
+
let instanceList = experiment.getDataSet().getInstanceList();
|
|
38
|
+
let partition = new Partition_1.Partition(instanceList, 0.25, true);
|
|
39
|
+
for (let j = 0; j < this.M; j++) {
|
|
40
|
+
let crossValidation = new KFoldCrossValidation_1.KFoldCrossValidation(partition.get(1).getInstances(), this.K, experiment.getParameter().getSeed());
|
|
41
|
+
this.runExperiment(experiment.getClassifier(), experiment.getParameter(), result, crossValidation, partition.get(0));
|
|
42
|
+
}
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
}
|
|
46
|
+
exports.MxKFoldRunSeparateTest = MxKFoldRunSeparateTest;
|
|
47
|
+
});
|
|
48
|
+
//# sourceMappingURL=MxKFoldRunSeparateTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"MxKFoldRunSeparateTest.js","sourceRoot":"","sources":["../../source/Experiment/MxKFoldRunSeparateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,iEAA4D;IAC5D,gFAA2E;IAE3E,yDAAoD;IACpD,wFAAmF;IAGnF,MAAa,sBAAuB,SAAQ,2CAAoB;QAI5D;;;;;;WAMG;QACH,YAAY,CAAS,EAAE,CAAS;YAC5B,KAAK,CAAC,CAAC,CAAC,CAAC;YACT,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACd,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,MAAM,GAAG,IAAI,6CAAqB,EAAE,CAAC;YACzC,IAAI,YAAY,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,eAAe,EAAE,CAAC;YAC7D,IAAI,SAAS,GAAG,IAAI,qBAAS,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACxD,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC7B,IAAI,eAAe,GAAG,IAAI,2CAAoB,CAAW,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;gBACvI,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACxH;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;KACJ;IAhCD,wDAgCC"}
|
|
@@ -0,0 +1,13 @@
|
|
|
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
|
+
});
|
|
13
|
+
//# sourceMappingURL=SingleRun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleRun.js","sourceRoot":"","sources":["../../source/Experiment/SingleRun.ts"],"names":[],"mappings":""}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { SingleRun } from "./SingleRun";
|
|
2
|
+
import { Experiment } from "./Experiment";
|
|
3
|
+
import { Instance } from "../Instance/Instance";
|
|
4
|
+
import { Performance } from "../Performance/Performance";
|
|
5
|
+
import { Classifier } from "../Classifier/Classifier";
|
|
6
|
+
import { Parameter } from "../Parameter/Parameter";
|
|
7
|
+
import { CrossValidation } from "nlptoolkit-sampling/dist/CrossValidation";
|
|
8
|
+
export declare class SingleRunWithK implements SingleRun {
|
|
9
|
+
private K;
|
|
10
|
+
constructor(K: number);
|
|
11
|
+
runExperiment(classifier: Classifier, parameter: Parameter, crossValidation: CrossValidation<Instance>): Performance;
|
|
12
|
+
/**
|
|
13
|
+
* Execute Single K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
14
|
+
*
|
|
15
|
+
* @param experiment Experiment to be run.
|
|
16
|
+
* @return A Performance instance
|
|
17
|
+
*/
|
|
18
|
+
execute(experiment: Experiment): Performance;
|
|
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", "nlptoolkit-sampling/dist/KFoldCrossValidation", "../InstanceList/InstanceList"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.SingleRunWithK = void 0;
|
|
13
|
+
const KFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/KFoldCrossValidation");
|
|
14
|
+
const InstanceList_1 = require("../InstanceList/InstanceList");
|
|
15
|
+
class SingleRunWithK {
|
|
16
|
+
constructor(K) {
|
|
17
|
+
this.K = K;
|
|
18
|
+
}
|
|
19
|
+
runExperiment(classifier, parameter, crossValidation) {
|
|
20
|
+
let trainSet = new InstanceList_1.InstanceList(crossValidation.getTrainFold(0));
|
|
21
|
+
let testSet = new InstanceList_1.InstanceList(crossValidation.getTestFold(0));
|
|
22
|
+
return classifier.singleRun(parameter, trainSet, testSet);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Execute Single K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
26
|
+
*
|
|
27
|
+
* @param experiment Experiment to be run.
|
|
28
|
+
* @return A Performance instance
|
|
29
|
+
*/
|
|
30
|
+
execute(experiment) {
|
|
31
|
+
let crossValidation = new KFoldCrossValidation_1.KFoldCrossValidation(experiment.getDataSet().getInstances(), this.K, experiment.getParameter().getSeed());
|
|
32
|
+
return this.runExperiment(experiment.getClassifier(), experiment.getParameter(), crossValidation);
|
|
33
|
+
}
|
|
34
|
+
}
|
|
35
|
+
exports.SingleRunWithK = SingleRunWithK;
|
|
36
|
+
});
|
|
37
|
+
//# sourceMappingURL=SingleRunWithK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"SingleRunWithK.js","sourceRoot":"","sources":["../../source/Experiment/SingleRunWithK.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,wFAAmF;IAGnF,+DAA0D;IAK1D,MAAa,cAAc;QAIvB,YAAY,CAAS;YACjB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACd,CAAC;QAED,aAAa,CAAC,UAAsB,EACtB,SAAoB,EACpB,eAA0C;YACpD,IAAI,QAAQ,GAAG,IAAI,2BAAY,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACjE,IAAI,OAAO,GAAG,IAAI,2BAAY,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/D,OAAO,UAAU,CAAC,SAAS,CAAC,SAAS,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9D,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,eAAe,GAAG,IAAI,2CAAoB,CAAW,UAAU,CAAC,UAAU,EAAE,CAAC,YAAY,EAAE,EAAE,IAAI,CAAC,CAAC,EACnG,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YACzC,OAAO,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,YAAY,EAAE,EAAE,eAAe,CAAC,CAAC;QACtG,CAAC;KAEJ;IA5BD,wCA4BC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { KFoldRun } from "./KFoldRun";
|
|
2
|
+
import { Experiment } from "./Experiment";
|
|
3
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
4
|
+
export declare class StratifiedKFoldRun extends KFoldRun {
|
|
5
|
+
/**
|
|
6
|
+
* Constructor for KFoldRun class. Basically sets K parameter of the K-fold cross-validation.
|
|
7
|
+
* @param K K of the K-fold cross-validation.
|
|
8
|
+
*/
|
|
9
|
+
constructor(K: number);
|
|
10
|
+
/**
|
|
11
|
+
* Execute Stratified K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
12
|
+
*
|
|
13
|
+
* @param experiment Experiment to be run.
|
|
14
|
+
* @return An ExperimentPerformance instance.
|
|
15
|
+
*/
|
|
16
|
+
execute(experiment: Experiment): ExperimentPerformance;
|
|
17
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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", "./KFoldRun", "../Performance/ExperimentPerformance", "nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StratifiedKFoldRun = void 0;
|
|
13
|
+
const KFoldRun_1 = require("./KFoldRun");
|
|
14
|
+
const ExperimentPerformance_1 = require("../Performance/ExperimentPerformance");
|
|
15
|
+
const StratifiedKFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation");
|
|
16
|
+
class StratifiedKFoldRun extends KFoldRun_1.KFoldRun {
|
|
17
|
+
/**
|
|
18
|
+
* Constructor for KFoldRun class. Basically sets K parameter of the K-fold cross-validation.
|
|
19
|
+
* @param K K of the K-fold cross-validation.
|
|
20
|
+
*/
|
|
21
|
+
constructor(K) {
|
|
22
|
+
super(K);
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Execute Stratified K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
26
|
+
*
|
|
27
|
+
* @param experiment Experiment to be run.
|
|
28
|
+
* @return An ExperimentPerformance instance.
|
|
29
|
+
*/
|
|
30
|
+
execute(experiment) {
|
|
31
|
+
let result = new ExperimentPerformance_1.ExperimentPerformance();
|
|
32
|
+
let crossValidation = new StratifiedKFoldCrossValidation_1.StratifiedKFoldCrossValidation(experiment.getDataSet().getClassInstances(), this.K, experiment.getParameter().getSeed());
|
|
33
|
+
this.runExperiment(experiment.getClassifier(), experiment.getParameter(), result, crossValidation);
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.StratifiedKFoldRun = StratifiedKFoldRun;
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=StratifiedKFoldRun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StratifiedKFoldRun.js","sourceRoot":"","sources":["../../source/Experiment/StratifiedKFoldRun.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,yCAAoC;IAEpC,gFAA2E;IAC3E,4GAAuG;IAGvG,MAAa,kBAAmB,SAAQ,mBAAQ;QAE5C;;;WAGG;QACH,YAAY,CAAS;YACjB,KAAK,CAAC,CAAC,CAAC,CAAC;QACb,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,MAAM,GAAG,IAAI,6CAAqB,EAAE,CAAC;YACzC,IAAI,eAAe,GAAG,IAAI,+DAA8B,CAAW,UAAU,CAAC,UAAU,EAAE,CAAC,iBAAiB,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAC7J,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;YACnG,OAAO,MAAM,CAAC;QAClB,CAAC;KAEJ;IAvBD,gDAuBC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { KFoldRunSeparateTest } from "./KFoldRunSeparateTest";
|
|
2
|
+
import { Experiment } from "./Experiment";
|
|
3
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
4
|
+
export declare class StratifiedKFoldRunSeparateTest extends KFoldRunSeparateTest {
|
|
5
|
+
/**
|
|
6
|
+
* Constructor for StratifiedKFoldRunSeparateTest class. Basically sets K parameter of the K-fold cross-validation.
|
|
7
|
+
*
|
|
8
|
+
* @param K K of the K-fold cross-validation.
|
|
9
|
+
*/
|
|
10
|
+
constructor(K: number);
|
|
11
|
+
/**
|
|
12
|
+
* Execute Stratified K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
13
|
+
*
|
|
14
|
+
* @param experiment Experiment to be run.
|
|
15
|
+
* @return An ExperimentPerformance instance.
|
|
16
|
+
*/
|
|
17
|
+
execute(experiment: Experiment): ExperimentPerformance;
|
|
18
|
+
}
|
|
@@ -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", "./KFoldRunSeparateTest", "../Performance/ExperimentPerformance", "../InstanceList/Partition", "nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StratifiedKFoldRunSeparateTest = void 0;
|
|
13
|
+
const KFoldRunSeparateTest_1 = require("./KFoldRunSeparateTest");
|
|
14
|
+
const ExperimentPerformance_1 = require("../Performance/ExperimentPerformance");
|
|
15
|
+
const Partition_1 = require("../InstanceList/Partition");
|
|
16
|
+
const StratifiedKFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation");
|
|
17
|
+
class StratifiedKFoldRunSeparateTest extends KFoldRunSeparateTest_1.KFoldRunSeparateTest {
|
|
18
|
+
/**
|
|
19
|
+
* Constructor for StratifiedKFoldRunSeparateTest class. Basically sets K parameter of the K-fold cross-validation.
|
|
20
|
+
*
|
|
21
|
+
* @param K K of the K-fold cross-validation.
|
|
22
|
+
*/
|
|
23
|
+
constructor(K) {
|
|
24
|
+
super(K);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Execute Stratified K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
28
|
+
*
|
|
29
|
+
* @param experiment Experiment to be run.
|
|
30
|
+
* @return An ExperimentPerformance instance.
|
|
31
|
+
*/
|
|
32
|
+
execute(experiment) {
|
|
33
|
+
let result = new ExperimentPerformance_1.ExperimentPerformance();
|
|
34
|
+
let instanceList = experiment.getDataSet().getInstanceList();
|
|
35
|
+
let partition = new Partition_1.Partition(instanceList, 0.25, true);
|
|
36
|
+
let crossValidation = new StratifiedKFoldCrossValidation_1.StratifiedKFoldCrossValidation(new Partition_1.Partition(partition.get(1)).getLists(), this.K, experiment.getParameter().getSeed());
|
|
37
|
+
this.runExperiment(experiment.getClassifier(), experiment.getParameter(), result, crossValidation, partition.get(0));
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.StratifiedKFoldRunSeparateTest = StratifiedKFoldRunSeparateTest;
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=StratifiedKFoldRunSeparateTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StratifiedKFoldRunSeparateTest.js","sourceRoot":"","sources":["../../source/Experiment/StratifiedKFoldRunSeparateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,iEAA4D;IAE5D,gFAA2E;IAC3E,yDAAoD;IACpD,4GAAuG;IAGvG,MAAa,8BAA+B,SAAQ,2CAAoB;QAEpE;;;;WAIG;QACH,YAAY,CAAS;YACjB,KAAK,CAAC,CAAC,CAAC,CAAC;QACb,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,MAAM,GAAG,IAAI,6CAAqB,EAAE,CAAC;YACzC,IAAI,YAAY,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,eAAe,EAAE,CAAC;YAC7D,IAAI,SAAS,GAAG,IAAI,qBAAS,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;YACxD,IAAI,eAAe,GAAG,IAAI,+DAA8B,CAAW,IAAI,qBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EAAE,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YAC5J,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;YACrH,OAAO,MAAM,CAAC;QAClB,CAAC;KACJ;IAzBD,wEAyBC"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
import { MxKFoldRun } from "./MxKFoldRun";
|
|
2
|
+
import { Experiment } from "./Experiment";
|
|
3
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
4
|
+
export declare class StratifiedMxKFoldRun extends MxKFoldRun {
|
|
5
|
+
/**
|
|
6
|
+
* Constructor for StratifiedMxKFoldRun class. Basically sets K parameter of the K-fold cross-validation and M for the number of times.
|
|
7
|
+
*
|
|
8
|
+
* @param M number of cross-validation times.
|
|
9
|
+
* @param K K of the K-fold cross-validation.
|
|
10
|
+
*/
|
|
11
|
+
constructor(M: number, K: number);
|
|
12
|
+
/**
|
|
13
|
+
* Execute the Stratified MxK-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
14
|
+
*
|
|
15
|
+
* @param experiment Experiment to be run.
|
|
16
|
+
* @return An ExperimentPerformance instance.
|
|
17
|
+
*/
|
|
18
|
+
execute(experiment: Experiment): ExperimentPerformance;
|
|
19
|
+
}
|
|
@@ -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", "./MxKFoldRun", "../Performance/ExperimentPerformance", "nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StratifiedMxKFoldRun = void 0;
|
|
13
|
+
const MxKFoldRun_1 = require("./MxKFoldRun");
|
|
14
|
+
const ExperimentPerformance_1 = require("../Performance/ExperimentPerformance");
|
|
15
|
+
const StratifiedKFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation");
|
|
16
|
+
class StratifiedMxKFoldRun extends MxKFoldRun_1.MxKFoldRun {
|
|
17
|
+
/**
|
|
18
|
+
* Constructor for StratifiedMxKFoldRun class. Basically sets K parameter of the K-fold cross-validation and M for the number of times.
|
|
19
|
+
*
|
|
20
|
+
* @param M number of cross-validation times.
|
|
21
|
+
* @param K K of the K-fold cross-validation.
|
|
22
|
+
*/
|
|
23
|
+
constructor(M, K) {
|
|
24
|
+
super(M, K);
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Execute the Stratified MxK-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
28
|
+
*
|
|
29
|
+
* @param experiment Experiment to be run.
|
|
30
|
+
* @return An ExperimentPerformance instance.
|
|
31
|
+
*/
|
|
32
|
+
execute(experiment) {
|
|
33
|
+
let result = new ExperimentPerformance_1.ExperimentPerformance();
|
|
34
|
+
for (let j = 0; j < this.M; j++) {
|
|
35
|
+
let crossValidation = new StratifiedKFoldCrossValidation_1.StratifiedKFoldCrossValidation(experiment.getDataSet().getClassInstances(), this.K, experiment.getParameter().getSeed());
|
|
36
|
+
this.runExperiment(experiment.getClassifier(), experiment.getParameter(), result, crossValidation);
|
|
37
|
+
}
|
|
38
|
+
return result;
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
exports.StratifiedMxKFoldRun = StratifiedMxKFoldRun;
|
|
42
|
+
});
|
|
43
|
+
//# sourceMappingURL=StratifiedMxKFoldRun.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StratifiedMxKFoldRun.js","sourceRoot":"","sources":["../../source/Experiment/StratifiedMxKFoldRun.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,6CAAwC;IAExC,gFAA2E;IAC3E,4GAAuG;IAGvG,MAAa,oBAAqB,SAAQ,uBAAU;QAEhD;;;;;WAKG;QACH,YAAY,CAAS,EAAE,CAAS;YAC5B,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC;QAChB,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,MAAM,GAAG,IAAI,6CAAqB,EAAE,CAAC;YACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC7B,IAAI,eAAe,GAAG,IAAI,+DAA8B,CAAW,UAAU,CAAC,UAAU,EAAE,CAAC,iBAAiB,EAAE,EAC1G,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;gBACjD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,CAAC,CAAC;aACtG;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;KACJ;IA3BD,oDA2BC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { StratifiedKFoldRunSeparateTest } from "./StratifiedKFoldRunSeparateTest";
|
|
2
|
+
import { Experiment } from "./Experiment";
|
|
3
|
+
import { ExperimentPerformance } from "../Performance/ExperimentPerformance";
|
|
4
|
+
export declare class StratifiedMxKFoldRunSeparateTest extends StratifiedKFoldRunSeparateTest {
|
|
5
|
+
protected M: number;
|
|
6
|
+
/**
|
|
7
|
+
* Constructor for StratifiedMxKFoldRunSeparateTest class. Basically sets K parameter of the K-fold cross-validation and M for the number of times.
|
|
8
|
+
*
|
|
9
|
+
* @param M number of cross-validation times.
|
|
10
|
+
* @param K K of the K-fold cross-validation.
|
|
11
|
+
*/
|
|
12
|
+
constructor(M: number, K: number);
|
|
13
|
+
/**
|
|
14
|
+
* Execute the Stratified MxK-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
15
|
+
*
|
|
16
|
+
* @param experiment Experiment to be run.
|
|
17
|
+
* @return An ExperimentPerformance instance.
|
|
18
|
+
*/
|
|
19
|
+
execute(experiment: Experiment): ExperimentPerformance;
|
|
20
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
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", "./StratifiedKFoldRunSeparateTest", "../Performance/ExperimentPerformance", "../InstanceList/Partition", "nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StratifiedMxKFoldRunSeparateTest = void 0;
|
|
13
|
+
const StratifiedKFoldRunSeparateTest_1 = require("./StratifiedKFoldRunSeparateTest");
|
|
14
|
+
const ExperimentPerformance_1 = require("../Performance/ExperimentPerformance");
|
|
15
|
+
const Partition_1 = require("../InstanceList/Partition");
|
|
16
|
+
const StratifiedKFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation");
|
|
17
|
+
class StratifiedMxKFoldRunSeparateTest extends StratifiedKFoldRunSeparateTest_1.StratifiedKFoldRunSeparateTest {
|
|
18
|
+
/**
|
|
19
|
+
* Constructor for StratifiedMxKFoldRunSeparateTest class. Basically sets K parameter of the K-fold cross-validation and M for the number of times.
|
|
20
|
+
*
|
|
21
|
+
* @param M number of cross-validation times.
|
|
22
|
+
* @param K K of the K-fold cross-validation.
|
|
23
|
+
*/
|
|
24
|
+
constructor(M, K) {
|
|
25
|
+
super(K);
|
|
26
|
+
this.M = M;
|
|
27
|
+
}
|
|
28
|
+
/**
|
|
29
|
+
* Execute the Stratified MxK-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
30
|
+
*
|
|
31
|
+
* @param experiment Experiment to be run.
|
|
32
|
+
* @return An ExperimentPerformance instance.
|
|
33
|
+
*/
|
|
34
|
+
execute(experiment) {
|
|
35
|
+
let result = new ExperimentPerformance_1.ExperimentPerformance();
|
|
36
|
+
for (let j = 0; j < this.M; j++) {
|
|
37
|
+
let instanceList = experiment.getDataSet().getInstanceList();
|
|
38
|
+
let partition = new Partition_1.Partition(instanceList, 0.25, true);
|
|
39
|
+
let crossValidation = new StratifiedKFoldCrossValidation_1.StratifiedKFoldCrossValidation(new Partition_1.Partition(partition.get(1)).getLists(), this.K, experiment.getParameter().getSeed());
|
|
40
|
+
this.runExperiment(experiment.getClassifier(), experiment.getParameter(), result, crossValidation, partition.get(0));
|
|
41
|
+
}
|
|
42
|
+
return result;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
exports.StratifiedMxKFoldRunSeparateTest = StratifiedMxKFoldRunSeparateTest;
|
|
46
|
+
});
|
|
47
|
+
//# sourceMappingURL=StratifiedMxKFoldRunSeparateTest.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StratifiedMxKFoldRunSeparateTest.js","sourceRoot":"","sources":["../../source/Experiment/StratifiedMxKFoldRunSeparateTest.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,qFAAgF;IAEhF,gFAA2E;IAC3E,yDAAoD;IAEpD,4GAAuG;IAEvG,MAAa,gCAAiC,SAAQ,+DAA8B;QAIhF;;;;;WAKG;QACH,YAAY,CAAS,EAAE,CAAS;YAC5B,KAAK,CAAC,CAAC,CAAC,CAAC;YACT,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACd,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,MAAM,GAAG,IAAI,6CAAqB,EAAE,CAAC;YACzC,KAAK,IAAI,CAAC,GAAG,CAAC,EAAE,CAAC,GAAG,IAAI,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;gBAC7B,IAAI,YAAY,GAAG,UAAU,CAAC,UAAU,EAAE,CAAC,eAAe,EAAE,CAAC;gBAC7D,IAAI,SAAS,GAAG,IAAI,qBAAS,CAAC,YAAY,EAAE,IAAI,EAAE,IAAI,CAAC,CAAC;gBACxD,IAAI,eAAe,GAAG,IAAI,+DAA8B,CAAW,IAAI,qBAAS,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC,QAAQ,EAAE,EACzG,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;gBACjD,IAAI,CAAC,aAAa,CAAC,UAAU,CAAC,aAAa,EAAE,EAAE,UAAU,CAAC,YAAY,EAAE,EAAE,MAAM,EAAE,eAAe,EAAE,SAAS,CAAC,GAAG,CAAC,CAAC,CAAC,CAAC,CAAC;aACxH;YACD,OAAO,MAAM,CAAC;QAClB,CAAC;KACJ;IAhCD,4EAgCC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Experiment } from "./Experiment";
|
|
2
|
+
import { Performance } from "../Performance/Performance";
|
|
3
|
+
export declare class StratifiedSingleRunWithK {
|
|
4
|
+
private readonly K;
|
|
5
|
+
/**
|
|
6
|
+
* Constructor for StratifiedSingleRunWithK class. Basically sets K parameter of the K-fold cross-validation.
|
|
7
|
+
*
|
|
8
|
+
* @param K K of the K-fold cross-validation.
|
|
9
|
+
*/
|
|
10
|
+
constructor(K: number);
|
|
11
|
+
/**
|
|
12
|
+
* Execute Stratified Single K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
13
|
+
*
|
|
14
|
+
* @param experiment Experiment to be run.
|
|
15
|
+
* @return A Performance instance.
|
|
16
|
+
*/
|
|
17
|
+
execute(experiment: Experiment): Performance;
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
(function (factory) {
|
|
2
|
+
if (typeof module === "object" && typeof module.exports === "object") {
|
|
3
|
+
var v = factory(require, exports);
|
|
4
|
+
if (v !== undefined) module.exports = v;
|
|
5
|
+
}
|
|
6
|
+
else if (typeof define === "function" && define.amd) {
|
|
7
|
+
define(["require", "exports", "nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation", "../InstanceList/InstanceList"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.StratifiedSingleRunWithK = void 0;
|
|
13
|
+
const StratifiedKFoldCrossValidation_1 = require("nlptoolkit-sampling/dist/StratifiedKFoldCrossValidation");
|
|
14
|
+
const InstanceList_1 = require("../InstanceList/InstanceList");
|
|
15
|
+
class StratifiedSingleRunWithK {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor for StratifiedSingleRunWithK class. Basically sets K parameter of the K-fold cross-validation.
|
|
18
|
+
*
|
|
19
|
+
* @param K K of the K-fold cross-validation.
|
|
20
|
+
*/
|
|
21
|
+
constructor(K) {
|
|
22
|
+
this.K = K;
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* Execute Stratified Single K-fold cross-validation with the given classifier on the given data set using the given parameters.
|
|
26
|
+
*
|
|
27
|
+
* @param experiment Experiment to be run.
|
|
28
|
+
* @return A Performance instance.
|
|
29
|
+
*/
|
|
30
|
+
execute(experiment) {
|
|
31
|
+
let crossValidation = new StratifiedKFoldCrossValidation_1.StratifiedKFoldCrossValidation(experiment.getDataSet().getClassInstances(), this.K, experiment.getParameter().getSeed());
|
|
32
|
+
let trainSet = new InstanceList_1.InstanceList(crossValidation.getTrainFold(0));
|
|
33
|
+
let testSet = new InstanceList_1.InstanceList(crossValidation.getTestFold(0));
|
|
34
|
+
return experiment.getClassifier().singleRun(experiment.getParameter(), trainSet, testSet);
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.StratifiedSingleRunWithK = StratifiedSingleRunWithK;
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=StratifiedSingleRunWithK.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"StratifiedSingleRunWithK.js","sourceRoot":"","sources":["../../source/Experiment/StratifiedSingleRunWithK.ts"],"names":[],"mappings":";;;;;;;;;;;;IAEA,4GAAuG;IAEvG,+DAA0D;IAE1D,MAAa,wBAAwB;QAIjC;;;;WAIG;QACH,YAAY,CAAS;YACjB,IAAI,CAAC,CAAC,GAAG,CAAC,CAAA;QACd,CAAC;QAED;;;;;WAKG;QACH,OAAO,CAAC,UAAsB;YAC1B,IAAI,eAAe,GAAG,IAAI,+DAA8B,CAAW,UAAU,CAAC,UAAU,EAAE,CAAC,iBAAiB,EAAE,EAC1G,IAAI,CAAC,CAAC,EAAE,UAAU,CAAC,YAAY,EAAE,CAAC,OAAO,EAAE,CAAC,CAAC;YACjD,IAAI,QAAQ,GAAG,IAAI,2BAAY,CAAC,eAAe,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,CAAC;YACjE,IAAI,OAAO,GAAG,IAAI,2BAAY,CAAC,eAAe,CAAC,WAAW,CAAC,CAAC,CAAC,CAAC,CAAC;YAC/D,OAAO,UAAU,CAAC,aAAa,EAAE,CAAC,SAAS,CAAC,UAAU,CAAC,YAAY,EAAE,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC;QAC9F,CAAC;KACJ;IA1BD,4DA0BC"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { SubSetSelection } from "./SubSetSelection";
|
|
2
|
+
import { FeatureSubSet } from "./FeatureSubSet";
|
|
3
|
+
export declare class BackwardSelection extends SubSetSelection {
|
|
4
|
+
/**
|
|
5
|
+
* Constructor that creates a new {@link FeatureSubSet} and initializes indexList with given number of features.
|
|
6
|
+
*
|
|
7
|
+
* @param numberOfFeatures Indicates the indices of indexList.
|
|
8
|
+
*/
|
|
9
|
+
constructor(numberOfFeatures: number);
|
|
10
|
+
/**
|
|
11
|
+
* The operator method calls backward method which starts with all the features and removes the least significant feature at each iteration.
|
|
12
|
+
*
|
|
13
|
+
* @param current FeatureSubset that will be added to new ArrayList.
|
|
14
|
+
* @param numberOfFeatures Indicates the indices of indexList.
|
|
15
|
+
* @return ArrayList of FeatureSubSets created from backward.
|
|
16
|
+
*/
|
|
17
|
+
protected operator(current: FeatureSubSet, numberOfFeatures: number): Array<FeatureSubSet>;
|
|
18
|
+
}
|
|
@@ -0,0 +1,39 @@
|
|
|
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", "./SubSetSelection", "./FeatureSubSet"], factory);
|
|
8
|
+
}
|
|
9
|
+
})(function (require, exports) {
|
|
10
|
+
"use strict";
|
|
11
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
12
|
+
exports.BackwardSelection = void 0;
|
|
13
|
+
const SubSetSelection_1 = require("./SubSetSelection");
|
|
14
|
+
const FeatureSubSet_1 = require("./FeatureSubSet");
|
|
15
|
+
class BackwardSelection extends SubSetSelection_1.SubSetSelection {
|
|
16
|
+
/**
|
|
17
|
+
* Constructor that creates a new {@link FeatureSubSet} and initializes indexList with given number of features.
|
|
18
|
+
*
|
|
19
|
+
* @param numberOfFeatures Indicates the indices of indexList.
|
|
20
|
+
*/
|
|
21
|
+
constructor(numberOfFeatures) {
|
|
22
|
+
super(new FeatureSubSet_1.FeatureSubSet(numberOfFeatures));
|
|
23
|
+
}
|
|
24
|
+
/**
|
|
25
|
+
* The operator method calls backward method which starts with all the features and removes the least significant feature at each iteration.
|
|
26
|
+
*
|
|
27
|
+
* @param current FeatureSubset that will be added to new ArrayList.
|
|
28
|
+
* @param numberOfFeatures Indicates the indices of indexList.
|
|
29
|
+
* @return ArrayList of FeatureSubSets created from backward.
|
|
30
|
+
*/
|
|
31
|
+
operator(current, numberOfFeatures) {
|
|
32
|
+
let result = new Array();
|
|
33
|
+
this.backward(result, current);
|
|
34
|
+
return result;
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
exports.BackwardSelection = BackwardSelection;
|
|
38
|
+
});
|
|
39
|
+
//# sourceMappingURL=BackwardSelection.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"BackwardSelection.js","sourceRoot":"","sources":["../../source/FeatureSelection/BackwardSelection.ts"],"names":[],"mappings":";;;;;;;;;;;;IAAA,uDAAkD;IAClD,mDAA8C;IAE9C,MAAa,iBAAkB,SAAQ,iCAAe;QAElD;;;;WAIG;QACH,YAAY,gBAAwB;YAChC,KAAK,CAAC,IAAI,6BAAa,CAAC,gBAAgB,CAAC,CAAC,CAAC;QAC/C,CAAC;QAED;;;;;;WAMG;QACO,QAAQ,CAAC,OAAsB,EAAE,gBAAwB;YAC/D,IAAI,MAAM,GAAG,IAAI,KAAK,EAAiB,CAAC;YACxC,IAAI,CAAC,QAAQ,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;YAC/B,OAAO,MAAM,CAAC;QAClB,CAAC;KAEJ;IAxBD,8CAwBC"}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
export declare class FeatureSubSet {
|
|
2
|
+
private readonly indexList;
|
|
3
|
+
/**
|
|
4
|
+
* A constructor that takes number of features as input and initializes indexList with these numbers.
|
|
5
|
+
*
|
|
6
|
+
* @param numberOfFeaturesOrList Indicates the indices of indexList.
|
|
7
|
+
*/
|
|
8
|
+
constructor(numberOfFeaturesOrList?: any);
|
|
9
|
+
/**
|
|
10
|
+
* The clone method creates a new ArrayList with the elements of indexList and returns it as a new FeatureSubSet.
|
|
11
|
+
*
|
|
12
|
+
* @return A new ArrayList with the elements of indexList and returns it as a new FeatureSubSet.
|
|
13
|
+
*/
|
|
14
|
+
clone(): FeatureSubSet;
|
|
15
|
+
/**
|
|
16
|
+
* The size method returns the size of the indexList.
|
|
17
|
+
*
|
|
18
|
+
* @return The size of the indexList.
|
|
19
|
+
*/
|
|
20
|
+
size(): number;
|
|
21
|
+
/**
|
|
22
|
+
* The get method returns the item of indexList at given index.
|
|
23
|
+
*
|
|
24
|
+
* @param index Index of the indexList to be accessed.
|
|
25
|
+
* @return The item of indexList at given index.
|
|
26
|
+
*/
|
|
27
|
+
get(index: number): number;
|
|
28
|
+
/**
|
|
29
|
+
* The contains method returns True, if indexList contains given input number and False otherwise.
|
|
30
|
+
*
|
|
31
|
+
* @param featureNo Feature number that will be checked.
|
|
32
|
+
* @return True, if indexList contains given input number.
|
|
33
|
+
*/
|
|
34
|
+
contains(featureNo: number): boolean;
|
|
35
|
+
/**
|
|
36
|
+
* The add method adds given Integer to the indexList.
|
|
37
|
+
*
|
|
38
|
+
* @param featureNo Integer that will be added to indexList.
|
|
39
|
+
*/
|
|
40
|
+
add(featureNo: number): void;
|
|
41
|
+
/**
|
|
42
|
+
* The remove method removes the item of indexList at the given index.
|
|
43
|
+
*
|
|
44
|
+
* @param index Index of the item that will be removed.
|
|
45
|
+
*/
|
|
46
|
+
remove(index: number): void;
|
|
47
|
+
}
|