planc
Parallel Lowrank Approximation with Non-negativity Constraints
Public Member Functions | List of all members
planc::DistNTFNES Class Reference

#include <distntfnes.hpp>

Public Member Functions

 DistNTFNES (const Tensor &i_tensor, const int i_k, algotype i_algo, const UVEC &i_global_dims, const UVEC &i_local_dims, const UVEC &i_nls_sizes, const UVEC &i_nls_idxs, const NTFMPICommunicator &i_mpicomm)
 
 ~DistNTFNES ()
 
void num_iterations (const int i_n)
 Returns number of iterations. More...
 
size_t modes () const
 Returns the numbers of modes of the tensor. More...
 
size_t rank () const
 Low Rank. More...
 
void regularizers (const FVEC i_regs)
 L1 and L2 Regularization for every mode. More...
 
void compute_error (bool i_error)
 Sets whether to compute the error or not. More...
 
VEC lambda ()
 Returns the lambda of the NCP factors. More...
 
int current_it () const
 Returns the current outer iteration of the computeNTF. More...
 
double current_error () const
 Returns the current error. More...
 
void dim_tree (bool i_dim_tree)
 MTTKRP can be computed with or without dimension trees. More...
 
void accelerated (const bool &set_acceleration)
 Does the algorithm need acceleration? More...
 
bool is_stale_mttkrp (const int &current_mode) const
 
void reset (const NCPFactors &new_factors, bool trans=false)
 This function will completely reset all the factors and the state of AUNTF. More...
 
void factor (int mode, double *factor_matrix)
 Returns the factor matrix by collected it across all the processors. More...
 
void computeNTF ()
 The main computeNTF loop. More...
 

Detailed Description

Definition at line 10 of file distntfnes.hpp.

Inheritance diagram for planc::DistNTFNES:
planc::DistAUNTF

Constructor & Destructor Documentation

◆ DistNTFNES()

planc::DistNTFNES::DistNTFNES ( const Tensor i_tensor,
const int  i_k,
algotype  i_algo,
const UVEC i_global_dims,
const UVEC i_local_dims,
const UVEC i_nls_sizes,
const UVEC i_nls_idxs,
const NTFMPICommunicator i_mpicomm 
)
inline

Definition at line 202 of file distntfnes.hpp.

◆ ~DistNTFNES()

planc::DistNTFNES::~DistNTFNES ( )
inline

Definition at line 230 of file distntfnes.hpp.

Member Function Documentation

◆ accelerated()

void planc::DistAUNTF::accelerated ( const bool &  set_acceleration)
inlineinherited

Does the algorithm need acceleration?

Definition at line 513 of file distauntf.hpp.

◆ compute_error()

void planc::DistAUNTF::compute_error ( bool  i_error)
inlineinherited

Sets whether to compute the error or not.

Definition at line 488 of file distauntf.hpp.

◆ computeNTF()

void planc::DistAUNTF::computeNTF ( )
inlineinherited

The main computeNTF loop.

Definition at line 578 of file distauntf.hpp.

◆ current_error()

double planc::DistAUNTF::current_error ( ) const
inlineinherited

Returns the current error.

Definition at line 498 of file distauntf.hpp.

◆ current_it()

int planc::DistAUNTF::current_it ( ) const
inlineinherited

Returns the current outer iteration of the computeNTF.

Definition at line 496 of file distauntf.hpp.

◆ dim_tree()

void planc::DistAUNTF::dim_tree ( bool  i_dim_tree)
inlineinherited

MTTKRP can be computed with or without dimension trees.

Dimtree is default.

Definition at line 501 of file distauntf.hpp.

◆ factor()

void planc::DistAUNTF::factor ( int  mode,
double *  factor_matrix 
)
inlineinherited

Returns the factor matrix by collected it across all the processors.

Don't call this during the computeNTF loop. It is right now called after all the iterations to dump the factor matrix.

Parameters
[in]modeof the factor matrix to be collected across processors
[in]factor_matrix.To be allocated and freed by the caller.

Definition at line 552 of file distauntf.hpp.

◆ is_stale_mttkrp()

bool planc::DistAUNTF::is_stale_mttkrp ( const int &  current_mode) const
inlineinherited

Definition at line 518 of file distauntf.hpp.

◆ lambda()

VEC planc::DistAUNTF::lambda ( )
inlineinherited

Returns the lambda of the NCP factors.

Definition at line 494 of file distauntf.hpp.

◆ modes()

size_t planc::DistAUNTF::modes ( ) const
inlineinherited

Returns the numbers of modes of the tensor.

Definition at line 482 of file distauntf.hpp.

◆ num_iterations()

void planc::DistAUNTF::num_iterations ( const int  i_n)
inlineinherited

Returns number of iterations.

Definition at line 480 of file distauntf.hpp.

◆ rank()

size_t planc::DistAUNTF::rank ( ) const
inlineinherited

Low Rank.

Definition at line 484 of file distauntf.hpp.

◆ regularizers()

void planc::DistAUNTF::regularizers ( const FVEC  i_regs)
inlineinherited

L1 and L2 Regularization for every mode.

Definition at line 486 of file distauntf.hpp.

◆ reset()

void planc::DistAUNTF::reset ( const NCPFactors new_factors,
bool  trans = false 
)
inlineinherited

This function will completely reset all the factors and the state of AUNTF.

Use it with caution!!! It is the responsibility of the caller to preserve the current factor states and other relevant computations

Definition at line 529 of file distauntf.hpp.


The documentation for this class was generated from the following file: