47     SG_REF(m_computation_engine);
 
   58         eig_solver,linear_solver,accuracy);
 
   62     m_trace_sampler=
new CProbingSampler(op,1,NATURAL,DISTANCE_TWO);
 
   69     SG_INFO(
"LogDetEstimator:Using %s, %s with 1E-5 accuracy, %s as default\n",
 
   83     m_trace_sampler=trace_sampler;
 
   86     m_operator_log=operator_log;
 
   89     m_computation_engine=computation_engine;
 
   90     SG_REF(m_computation_engine);
 
   93 void CLogDetEstimator::init()
 
   97     m_computation_engine=NULL;
 
  119     return m_trace_sampler;
 
  124     SG_REF(m_computation_engine);
 
  125     return m_computation_engine;
 
  131     return m_operator_log;
 
  137     SG_INFO(
"Computing %d log-det estimates\n", num_estimates);
 
  139     REQUIRE(m_operator_log, 
"Operator function is NULL\n");
 
  143     REQUIRE(m_trace_sampler, 
"Trace sampler is NULL\n");
 
  149         "Mismatch in dimensions of the operator and trace-sampler, %d vs %d!\n",
 
  157     for (
index_t i=0; i<num_estimates; ++i)
 
  159         for (
index_t j=0; j<num_trace_samples; ++j)
 
  161             SG_INFO(
"Computing log-determinant trace sample %d/%d\n", j,
 
  164             SG_DEBUG(
"Creating job for estimate %d, trace sample %d/%d\n", i, j,
 
  170             aggregators->append_element(agg);
 
  175     REQUIRE(m_computation_engine, 
"Computation engine is NULL\n");
 
  178     SG_INFO(
"Waiting for jobs to finish\n");
 
  180     SG_INFO(
"All jobs finished, aggregating results\n");
 
  188     int32_t num_aggregates=aggregators->get_num_elements();
 
  191     for (int32_t i=0; i<num_aggregates; ++i)
 
  195             (aggregators->get_element(i));
 
  207         if (idx_row>=num_trace_samples)
 
  219     SG_INFO(
"Finished computing %d log-det estimates\n", num_estimates);
 
  230     REQUIRE(m_operator_log, 
"Operator function is NULL\n");
 
  234     REQUIRE(m_trace_sampler, 
"Trace sampler is NULL\n");
 
  242     for (
index_t i=0; i<num_estimates; ++i)
 
  244         for (
index_t j=0; j<num_trace_samples; ++j)
 
  255     REQUIRE(m_computation_engine, 
"Computation engine is NULL\n");
 
  265     for (int32_t i=0; i<num_aggregates; ++i)
 
  270             SG_ERROR(
"Element is not CJobResultAggregator type!\n");
 
  277             SG_ERROR(
"Result is not CScalarResult type!\n");
 
  280         index_t idx_row=i%num_trace_samples;
 
  281         index_t idx_col=i/num_trace_samples;
 
Base class that stores the result of an independent job when the result is a scalar. 
virtual const index_t get_dimension() const 
CTraceSampler * get_trace_sampler(void) const 
const index_t get_dimension() const 
SGVector< float64_t > sample(index_t num_estimates)
Class that computes multiple independent instances of computation jobs sequentially. 
Implementaion of rational approximation of a operator-function times vector where the operator functi...
virtual void wait_for_all()=0
class that uses conjugate gradient method for solving a shifted linear system family where the linear...
virtual void finalize()=0
virtual SGVector< float64_t > sample(index_t idx) const =0
virtual void precompute()=0
virtual ~CLogDetEstimator()
virtual const index_t get_num_samples() const 
int32_t get_num_elements() const 
SGMatrix< float64_t > sample_without_averaging(index_t num_estimates)
CJobResult * get_final_result() const 
virtual void precompute()=0
Class SGObject is the base class of all shogun objects. 
Class that computes eigenvalues of a real valued, self-adjoint linear operator using Lanczos algorith...
virtual const char * get_name() const 
CLinearOperator< T > * get_operator() const 
CIndependentComputationEngine * get_computation_engine(void) const 
virtual const char * get_name() const 
virtual const char * get_name() const 
Dynamic array class for CSGObject pointers that creates an array that can be used like a list or an a...
Abstract base class that provides an interface for computing an aggeregation of the job results of in...
COperatorFunction< float64_t > * get_operator_function(void) const 
all of classes and functions are contained in the shogun namespace 
Class that represents a sparse-matrix linear operator. It computes matrix-vector product  in its appl...
Class that provides a sample method for Gaussian samples. 
Abstract base class for solving multiple independent instances of CIndependentJob. It has one method, submit_job, which may add the job to an internal queue and might block if there is yet not space in the queue. After jobs are submitted, it might not yet be ready. wait_for_all waits until all jobs are completed, which must be called to guarantee that all jobs are finished. 
const T get_result() const 
CSGObject * get_element(int32_t index) const 
Abstract template base class that provides an interface for sampling the trace of a linear operator u...
virtual CJobResultAggregator * submit_jobs(SGVector< T > sample)=0
bool append_element(CSGObject *e)