Skip to content

Commit d716829

Browse files
committed
[ML] Disable creation of debug files from tests by default (#85)
1 parent 3a93157 commit d716829

File tree

4 files changed

+52
-52
lines changed

4 files changed

+52
-52
lines changed

lib/maths/unittest/CGammaRateConjugateTest.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -906,8 +906,8 @@ void CGammaRateConjugateTest::testAnomalyScore() {
906906

907907
unsigned int test = 0;
908908

909-
std::ofstream file;
910-
file.open("results.m");
909+
//std::ofstream file;
910+
//file.open("results.m");
911911

912912
double totalFalsePositiveRate = 0.0;
913913
std::size_t totalPositives[] = {0u, 0u, 0u};
@@ -927,10 +927,10 @@ void CGammaRateConjugateTest::testAnomalyScore() {
927927

928928
++test;
929929

930-
std::ostringstream x;
931-
std::ostringstream scores;
932-
x << "x" << test << " = [";
933-
scores << "score" << test << " = [";
930+
//std::ostringstream x;
931+
//std::ostringstream scores;
932+
//x << "x" << test << " = [";
933+
//scores << "score" << test << " = [";
934934

935935
TUIntVec candidateAnomalies;
936936
for (unsigned int time = 0; time < samples.size(); ++time) {
@@ -951,15 +951,15 @@ void CGammaRateConjugateTest::testAnomalyScore() {
951951

952952
filter.propagateForwardsByTime(1.0);
953953

954-
x << time << " ";
955-
scores << score << " ";
954+
//x << time << " ";
955+
//scores << score << " ";
956956
}
957957

958-
x << "];\n";
959-
scores << "];\n";
960-
file << x.str() << scores.str() << "plot(x" << test << ", score"
961-
<< test << ");\n"
962-
<< "input(\"Hit any key for next test\");\n\n";
958+
//x << "];\n";
959+
//scores << "];\n";
960+
//file << x.str() << scores.str() << "plot(x" << test << ", score"
961+
// << test << ");\n"
962+
// << "input(\"Hit any key for next test\");\n\n";
963963

964964
TUIntVec falsePositives;
965965
std::set_difference(candidateAnomalies.begin(),

lib/maths/unittest/CLogNormalMeanPrecConjugateTest.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -937,8 +937,8 @@ void CLogNormalMeanPrecConjugateTest::testAnomalyScore() {
937937

938938
unsigned int test = 0;
939939

940-
std::ofstream file;
941-
file.open("results.m");
940+
//std::ofstream file;
941+
//file.open("results.m");
942942

943943
double totalFalsePositiveRate = 0.0;
944944
std::size_t totalPositives[] = {0u, 0u, 0u};
@@ -960,10 +960,10 @@ void CLogNormalMeanPrecConjugateTest::testAnomalyScore() {
960960

961961
++test;
962962

963-
std::ostringstream x;
964-
std::ostringstream scores;
965-
x << "x" << test << " = [";
966-
scores << "score" << test << " = [";
963+
//std::ostringstream x;
964+
//std::ostringstream scores;
965+
//x << "x" << test << " = [";
966+
//scores << "score" << test << " = [";
967967

968968
TUIntVec candidateAnomalies;
969969
for (unsigned int time = 0; time < samples.size(); ++time) {
@@ -984,15 +984,15 @@ void CLogNormalMeanPrecConjugateTest::testAnomalyScore() {
984984

985985
filter.propagateForwardsByTime(1.0);
986986

987-
x << time << " ";
988-
scores << score << " ";
987+
//x << time << " ";
988+
//scores << score << " ";
989989
}
990990

991-
x << "];\n";
992-
scores << "];\n";
993-
file << x.str() << scores.str() << "plot(x" << test << ", score"
994-
<< test << ");\n"
995-
<< "input(\"Hit any key for next test\");\n\n";
991+
//x << "];\n";
992+
//scores << "];\n";
993+
//file << x.str() << scores.str() << "plot(x" << test << ", score"
994+
// << test << ");\n"
995+
// << "input(\"Hit any key for next test\");\n\n";
996996

997997
TUIntVec falsePositives;
998998
std::set_difference(candidateAnomalies.begin(),

lib/maths/unittest/CNormalMeanPrecConjugateTest.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -891,8 +891,8 @@ void CNormalMeanPrecConjugateTest::testAnomalyScore() {
891891

892892
unsigned int test = 0;
893893

894-
std::ofstream file;
895-
file.open("results.m");
894+
//std::ofstream file;
895+
//file.open("results.m");
896896

897897
double totalFalsePositiveRate = 0.0;
898898
std::size_t totalPositives[] = {0u, 0u, 0u};
@@ -912,10 +912,10 @@ void CNormalMeanPrecConjugateTest::testAnomalyScore() {
912912

913913
++test;
914914

915-
std::ostringstream x;
916-
std::ostringstream scores;
917-
x << "x" << test << " = [";
918-
scores << "score" << test << " = [";
915+
//std::ostringstream x;
916+
//std::ostringstream scores;
917+
//x << "x" << test << " = [";
918+
//scores << "score" << test << " = [";
919919

920920
TUIntVec candidateAnomalies;
921921
for (unsigned int time = 0; time < samples.size(); ++time) {
@@ -936,15 +936,15 @@ void CNormalMeanPrecConjugateTest::testAnomalyScore() {
936936

937937
filter.propagateForwardsByTime(1.0);
938938

939-
x << time << " ";
940-
scores << score << " ";
939+
//x << time << " ";
940+
//scores << score << " ";
941941
}
942942

943-
x << "];\n";
944-
scores << "];\n";
945-
file << x.str() << scores.str() << "plot(x" << test << ", score"
946-
<< test << ");\n"
947-
<< "input(\"Hit any key for next test\");\n\n";
943+
//x << "];\n";
944+
//scores << "];\n";
945+
//file << x.str() << scores.str() << "plot(x" << test << ", score"
946+
// << test << ");\n"
947+
// << "input(\"Hit any key for next test\");\n\n";
948948

949949
TUIntVec falsePositives;
950950
std::set_difference(candidateAnomalies.begin(),

lib/maths/unittest/CPoissonMeanConjugateTest.cc

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -694,8 +694,8 @@ void CPoissonMeanConjugateTest::testAnomalyScore() {
694694

695695
unsigned int test = 0;
696696

697-
std::ofstream file;
698-
file.open("results.m");
697+
//std::ofstream file;
698+
//file.open("results.m");
699699

700700
double totalFalsePositiveRate = 0.0;
701701
std::size_t totalPositives[] = {0u, 0u, 0u};
@@ -714,10 +714,10 @@ void CPoissonMeanConjugateTest::testAnomalyScore() {
714714

715715
++test;
716716

717-
std::ostringstream x;
718-
std::ostringstream scores;
719-
x << "x" << test << " = [";
720-
scores << "score" << test << " = [";
717+
//std::ostringstream x;
718+
//std::ostringstream scores;
719+
//x << "x" << test << " = [";
720+
//scores << "score" << test << " = [";
721721

722722
TUIntVec candidateAnomalies;
723723
for (unsigned int time = 0; time < samples.size(); ++time) {
@@ -738,15 +738,15 @@ void CPoissonMeanConjugateTest::testAnomalyScore() {
738738

739739
filter.propagateForwardsByTime(1.0);
740740

741-
x << time << " ";
742-
scores << score << " ";
741+
//x << time << " ";
742+
//scores << score << " ";
743743
}
744744

745-
x << "];\n";
746-
scores << "];\n";
747-
file << x.str() << scores.str() << "plot(x" << test << ", score"
748-
<< test << ");\n"
749-
<< "input(\"Hit any key for next test\");\n\n";
745+
//x << "];\n";
746+
//scores << "];\n";
747+
//file << x.str() << scores.str() << "plot(x" << test << ", score"
748+
// << test << ");\n"
749+
// << "input(\"Hit any key for next test\");\n\n";
750750

751751
TUIntVec falsePositives;
752752
std::set_difference(candidateAnomalies.begin(), candidateAnomalies.end(),

0 commit comments

Comments
 (0)