22 template <
class NTFTYPE>
25 UVEC dimensions(test_modes);
27 std::string rand_prefix(
"rand_");
29 std::cout <<
"Input filename = " << filename << std::endl;
30 if (!filename.empty() &&
31 filename.compare(0, rand_prefix.size(), rand_prefix) != 0) {
39 ntfsolver.dim_tree(
true);
41 ntfsolver.computeNTF();
49 int main(
int argc,
char* argv[]) {
70 ERR <<
"Wrong algorithm choice. Quitting.." << pc.
lucalgo() << std::endl;
algotype lucalgo()
Returns the NMF algorithm to run. Passed as parameter –algo or -a.
Data is stored such that the unfolding is column major.
int num_modes()
Returns number of modes in tensors. For matrix it is two.
bool compute_error()
Returns whether to compute error not. Passed as parameter -e or –error.
int main(int argc, char *argv[])
int iterations()
Returns number of iterations. passed as -t or –iter.
void callNTF(planc::ParseCommandLine pc)
void parseplancopts()
parses the command line parameters
UWORD lowrankk()
returns the low rank. Passed as parameter –lowrank or -k
std::string input_file_name()
Returns input file name. Passed as -i or –input.
ncp_factors contains the factors of the ncp every ith factor is of size n_i * k number of factors is ...
UVEC dimensions()
Returns vector of dimensions for every mode.
bool dim_tree()
Enable dimension tree or not.