DiSMEC++
prediction.cpp File Reference
#include "io/prediction.h"
#include "io/common.h"
#include "io/numpy.h"
#include <fstream>
#include "doctest.h"

Go to the source code of this file.

Functions

 TEST_CASE ("save_load_sparse_predictions")
 
 TEST_CASE ("save_sparse_predictions checking")
 
 TEST_CASE ("read_sparse_prediction check")
 
 TEST_CASE ("save_dense_predictions")
 

Function Documentation

◆ TEST_CASE() [1/4]

TEST_CASE ( "read_sparse_prediction check"  )
Test:
This test case verifies that (certain) erroneous prediction files are rejected.

Definition at line 184 of file prediction.cpp.

References dismec::io::prediction::read_sparse_prediction().

◆ TEST_CASE() [2/4]

TEST_CASE ( "save_dense_predictions"  )
Test:
Checks in an example that dense predictions writes as expected.

Definition at line 221 of file prediction.cpp.

References dismec::io::prediction::save_dense_predictions_as_txt().

◆ TEST_CASE() [3/4]

TEST_CASE ( "save_load_sparse_predictions"  )
Test:
Checks in an example that sparse predictions writes as expected. It also checks that the reading back gives the same result.

Definition at line 129 of file prediction.cpp.

References dismec::io::prediction::read_sparse_prediction(), and dismec::io::prediction::save_sparse_predictions().

◆ TEST_CASE() [4/4]

TEST_CASE ( "save_sparse_predictions checking"  )
Test:
The test case checks that save_sparse_predictions verifies the compatibility of value and index matrices.

Definition at line 168 of file prediction.cpp.

References dismec::io::prediction::save_sparse_predictions().