diff options
author | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-14 14:37:06 +0000 |
---|---|---|
committer | pdlotko <pdlotko@636b058d-ea47-450e-bf9e-a15bfbe3eedb> | 2016-11-14 14:37:06 +0000 |
commit | d29709e9ab62873e6f2795fb6025ebd3b388a78d (patch) | |
tree | f5d1142e7d1a5df61d0b288cd4aabaa1e73063d5 /src | |
parent | 6daf7a4c27cc4e62b8e20ad5f5872716cc938fe9 (diff) |
A few minor crrections to bootstrap procedures.
git-svn-id: svn+ssh://scm.gforge.inria.fr/svnroot/gudhi/branches/gudhi_stat@1753 636b058d-ea47-450e-bf9e-a15bfbe3eedb
Former-commit-id: afcd32a0ac4292b8369ffdda6afb71cbd3a5b97a
Diffstat (limited to 'src')
-rw-r--r-- | src/Gudhi_stat/utilities/CMakeLists.txt | 4 | ||||
-rw-r--r-- | src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp | 8 | ||||
-rw-r--r-- | src/Gudhi_stat/utilities/Landscape_bootstrap.cpp | 6 |
3 files changed, 11 insertions, 7 deletions
diff --git a/src/Gudhi_stat/utilities/CMakeLists.txt b/src/Gudhi_stat/utilities/CMakeLists.txt index bda54e49..f98bcecb 100644 --- a/src/Gudhi_stat/utilities/CMakeLists.txt +++ b/src/Gudhi_stat/utilities/CMakeLists.txt @@ -110,8 +110,8 @@ target_link_libraries(topological_process ${Boost_SYSTEM_LIBRARY}) add_executable ( topological_process_2 topological_process_2.cpp ) target_link_libraries(topological_process_2 ${Boost_SYSTEM_LIBRARY}) -#add_executable ( Hausdorff_bootstrap Hausdorff_bootstrap.cpp ) -#target_link_libraries(Hausdorff_bootstrap ${Boost_SYSTEM_LIBRARY}) +add_executable ( Hausdorff_bootstrap Hausdorff_bootstrap.cpp ) +target_link_libraries(Hausdorff_bootstrap ${Boost_SYSTEM_LIBRARY}) add_executable ( Landscape_bootstrap Landscape_bootstrap.cpp ) diff --git a/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp b/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp index f4a86dff..95e1aa99 100644 --- a/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Hausdorff_bootstrap.cpp @@ -37,8 +37,9 @@ int main( int argc , char** argv ) std::cout << "The parameters of this program are : " << std::endl; std::cout << "(a) a name of a file with points," << std:: endl; std::cout << "(b) a number of repetitions of bootstrap (integer)," << std::endl; - std::cout << "(c) a size of subsample (integer, smaller than the number of points. \n"; - if ( argc != 4 ) + std::cout << "(c) a size of subsample (integer, smaller than the number of points," << std::endl; + std::cout << "(d) a squantile (real number between 0 and 1. If you do not know what to set, set it to 0.95." << std::endl; + if ( argc != 5 ) { std::cerr << "Wrong number of parameters, the program will now terminate.\n"; return 1; @@ -47,6 +48,7 @@ int main( int argc , char** argv ) const char* filename = argv[1]; size_t number_of_repetitions_of_bootstrap = (size_t)atoi( argv[2] ); size_t size_of_subsample = (size_t)atoi( argv[3] ); + double quantile = atof( argv[4] ); std::cout << "Now we will read points from the file : " << filename << " and then perform " << number_of_repetitions_of_bootstrap << " times the bootstrap on it by choosing subsample of a size " << size_of_subsample << std::endl; @@ -70,7 +72,7 @@ int main( int argc , char** argv ) identity< std::vector<size_t> > , //CharacteristicFunction Hausdorff_distance_between_subspace_and_the_whole_metric_space //DistanceBetweenPointsCharacteristics. This function have the information about point's coordinates. > - ( points.size() , identity_char , distance , number_of_repetitions_of_bootstrap , size_of_subsample ); + ( points.size() , identity_char , distance , number_of_repetitions_of_bootstrap , size_of_subsample , quantile ); std::cout << "result of bootstrap : " << result << std::endl; diff --git a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp index b1364c0c..e9e39e50 100644 --- a/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp +++ b/src/Gudhi_stat/utilities/Landscape_bootstrap.cpp @@ -143,7 +143,8 @@ int main( int argc , char** argv ) std::cout << "(4) An real value p such that L^p distance is going to be computed. \n"; std::cout << "(5) A dimension of persistence that is to be taken into account (positive integer) \n"; std::cout << "(6) A maximal diameter to which complex is to be grown (positive integer) \n"; - if ( argc != 7 ) + std::cout << "(d) a squantile (real number between 0 and 1. If you do not know what to set, set it to 0.95." << std::endl; + if ( argc != 8 ) { std::cerr << "Wrong number of parameters, the program will now terminate.\n"; return 1; @@ -155,6 +156,7 @@ int main( int argc , char** argv ) double p = atoi( argv[4] ); int dimension = atoi( argv[5] ); double threshold = atof( argv[6] ); + double quantile = atof( argv[7] ); std::cout << "Now we will read points from the file : " << filename << " and then perform " << number_of_repetitions_of_bootstrap << " times the bootstrap on it by choosing subsample of a size " << size_of_subsample << std::endl; @@ -178,7 +180,7 @@ int main( int argc , char** argv ) compute_persistence_landscape_of_a_point_cloud_in_certain_dimension , //CharacteristicFunction, in this case, we will need to compute persistence in a certain dimension. distance_between_landscapes //DistanceBetweenPointsCharacteristics. In this case > - ( points.size() , characteristic_fun , distance , number_of_repetitions_of_bootstrap , size_of_subsample ); + ( points.size() , characteristic_fun , distance , number_of_repetitions_of_bootstrap , size_of_subsample , quantile ); std::cout << "result of bootstrap : " << result << std::endl; |