Changeset 779 for trunk/test
- Timestamp:
- Mar 5, 2007, 7:58:30 PM (16 years ago)
- Location:
- trunk/test
- Files:
-
- 1 added
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/test/Makefile.am
r723 r779 7 7 # Copyright (C) 2005 Jari Häkkinen, Peter Johansson 8 8 # Copyright (C) 2006 Jari Häkkinen, Peter Johansson, Markus Ringnér 9 # Copyright (C) 2007 Peter Johansson 9 10 # 10 11 # This file is part of the yat library, http://lev.thep.lu.se/trac/yat … … 29 30 ensemble_test feature_selection_test fileutil_test inputranker_test \ 30 31 kernel_test kernel_lookup_test matrix_test matrix_lookup_test \ 31 ncc_test nni_test pca_test regression_test rnd_test score_test \ 32 ncc_test nni_test pca_test regression_test rnd_test roc_test \ 33 score_test \ 32 34 statistics_test subset_generator_test svd_test svm_test target_test \ 33 35 utility_test vector_test … … 60 62 regression_test_SOURCES = regression_test.cc 61 63 rnd_test_SOURCES = rnd_test.cc 64 roc_test_SOURCES = roc_test.cc 62 65 score_test_SOURCES = score_test.cc 63 66 statistics_test_SOURCES = statistics_test.cc -
trunk/test/consensus_inputranker_test.cc
r680 r779 23 23 24 24 #include "yat/classifier/ConsensusInputRanker.h" 25 #include "yat/statistics/ROC .h"25 #include "yat/statistics/ROCscore.h" 26 26 #include "yat/utility/matrix.h" 27 27 #include "yat/classifier/MatrixLookup.h" … … 59 59 60 60 61 theplu::yat::statistics::ROC roc;61 theplu::yat::statistics::ROCscore roc; 62 62 theplu::yat::classifier::CrossValidationSampler sampler(target,30,3); 63 63 *error << "Building Consensus_Inputranker" << std::endl; -
trunk/test/feature_selection_test.cc
r680 r779 24 24 #include "yat/classifier/FeatureSelectorIR.h" 25 25 #include "yat/classifier/FeatureSelectorRandom.h" 26 #include "yat/statistics/ROC .h"26 #include "yat/statistics/ROCscore.h" 27 27 28 28 #include <fstream> … … 45 45 bool ok = true; 46 46 47 statistics::ROC roc;47 statistics::ROCscore roc; 48 48 classifier::FeatureSelectorIR f(roc, 12); 49 49 classifier::FeatureSelectorRandom f2(12); -
trunk/test/inputranker_test.cc
r680 r779 23 23 24 24 #include "yat/classifier/InputRanker.h" 25 #include "yat/statistics/ROC .h"25 #include "yat/statistics/ROCscore.h" 26 26 #include "yat/utility/matrix.h" 27 27 #include "yat/classifier/MatrixLookup.h" … … 57 57 is.close(); 58 58 59 statistics::ROC roc;59 statistics::ROCscore roc; 60 60 classifier::InputRanker ir(data,target,roc); 61 61 if (ir.id()[0]!=2 || ir.id()[1]!=0 || ir.id()[2]!=1){ -
trunk/test/score_test.cc
r747 r779 25 25 #include "yat/statistics/FoldChange.h" 26 26 #include "yat/statistics/Pearson.h" 27 #include "yat/statistics/ROC .h"28 #include "yat/statistics/SAM .h"27 #include "yat/statistics/ROCscore.h" 28 #include "yat/statistics/SAMScore.h" 29 29 #include "yat/statistics/tScore.h" 30 30 #include "yat/statistics/WilcoxonFoldChange.h" … … 52 52 bool ok = true; 53 53 54 *error << "testing ROC " << std::endl;54 *error << "testing ROCscore" << std::endl; 55 55 utility::vector value(31); 56 56 std::vector<std::string> label(31,"negative"); … … 60 60 for (size_t i=0; i<value.size(); i++) 61 61 value(i)=i; 62 statistics::ROC roc;62 statistics::ROCscore roc; 63 63 double area = roc.score(target, value); 64 64 if (area!=1.0){ … … 73 73 *error << "test_roc: area is " << area << " should be 1.0" 74 74 << std::endl; 75 ok = false;76 }77 78 double p = roc.p_value();79 double p_matlab = 0.00000115;80 if (p/p_matlab > 1.01 | p/p_matlab < 0.99){81 *error << "get_p_approx: p-value not correct" << std::endl;82 ok = false;83 }84 roc.minimum_size() = 20;85 p = roc.p_value();86 if (p > pow(10, -8.0) | p < pow(10, -9.0)){87 *error << "get_p_exact: p-value not correct" << std::endl;88 75 ok = false; 89 76 } … … 141 128 statistics::WilcoxonFoldChange wfc(true); 142 129 143 *error << "testing SAM " << std::endl;144 statistics::SAM sam(1.0,true);130 *error << "testing SAMScore" << std::endl; 131 statistics::SAMScore sam(1.0,true); 145 132 146 133 -
trunk/test/subset_generator_test.cc
r722 r779 32 32 #include "yat/classifier/SVM.h" 33 33 #include "yat/classifier/NCC.h" 34 #include "yat/statistics/ROC .h"34 #include "yat/statistics/ROCscore.h" 35 35 #include "yat/statistics/PearsonDistance.h" 36 36 #include "yat/utility/matrix.h" … … 78 78 classifier::CrossValidationSampler sampler(target, 30, 3); 79 79 80 statistics::ROC score;80 statistics::ROCscore score; 81 81 classifier::FeatureSelectorIR fs(score, 96, 0); 82 82 *error << "building SubsetGenerator" << std::endl; … … 96 96 for (size_t i = 0; i<out.size(); ++i) 97 97 out(i)=ensemble_svm.validate()[0][i].mean(); 98 statistics::ROC roc;98 statistics::ROCscore roc; 99 99 *error << roc.score(target,out) << std::endl; 100 100
Note: See TracChangeset
for help on using the changeset viewer.