36#ifndef STK_GAMMAPARAMETERS_H
37#define STK_GAMMAPARAMETERS_H
39#include "../STK_Clust_Util.h"
97 inline Real const&
shape(
int k,
int j)
const {
return shape_;}
99 inline Real const&
scale(
int k,
int j)
const {
return scale_[k][
j];}
104 void resize(
Range const& range);
107 void updateStatistics();
109 void setStatistics();
111 void releaseStatistics();
118 template<
class Array>
122 for(
int k=scale_.begin(),
kp=
params.beginRows(); k<scale_.end(); ++k,
kp+=2)
127 shape_ /= scale_.size();
158 inline Real const&
shape(
int k,
int j)
const {
return shape_;}
160 inline Real const&
scale(
int k,
int j)
const {
return scale_[k];}
165 void resize(
Range const& range);
168 void updateStatistics();
170 void setStatistics();
172 void releaseStatistics();
179 template<
class Array>
183 for(
int k=scale_.begin(),
kp=
params.beginRows(); k<scale_.end(); ++k,
kp+=2)
186 scale_[k] =
params.row(
kp+1).mean();
188 shape_ /= scale_.size();
219 inline Real const&
shape(
int k,
int j)
const {
return shape_[k];}
221 inline Real const&
scale(
int k,
int j)
const {
return scale_[k][
j];}
226 void resize(
Range const& range);
229 void updateStatistics();
231 void setStatistics();
233 void releaseStatistics();
240 template<
class Array>
244 for(
int k=scale_.begin(),
kp=
params.beginRows(); k<scale_.end(); ++k,
kp+=2)
249 shape_ /= scale_.size();
282 inline Real const&
scale(
int k,
int j)
const {
return scale_[k];}
287 void resize(
Range const& range);
290 void updateStatistics();
292 void setStatistics();
294 void releaseStatistics();
301 template<
class Array>
305 for(
int k=scale_.begin(),
kp=
params.beginRows(); k<scale_.end(); ++k,
kp+=2)
308 scale_[k] =
params.row(
kp+1).mean();
310 shape_ /= scale_.size();
341 inline Real const&
shape(
int k,
int j)
const {
return shape_[k][
j];}
343 inline Real const&
scale(
int k,
int j)
const {
return scale_;}
348 void resize(
Range const& range);
351 void updateStatistics();
353 void setStatistics();
355 void releaseStatistics();
362 template<
class Array>
366 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
371 scale_ /= shape_.size();
402 inline Real const&
shape(
int k,
int j)
const {
return shape_[k][
j];}
409 void resize(
Range const& range);
412 void updateStatistics();
414 void setStatistics();
416 void releaseStatistics();
423 template<
class Array>
427 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
432 scale_ /= shape_.size();
463 inline Real const&
shape(
int k,
int j)
const {
return shape_[k][
j];}
465 inline Real const&
scale(
int k,
int j)
const {
return scale_[k][
j];}
470 void resize(
Range const& range);
473 void updateStatistics();
475 void setStatistics();
477 void releaseStatistics();
484 template<
class Array>
487 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
522 inline Real const&
shape(
int k,
int j)
const {
return shape_[k][
j];}
524 inline Real const&
scale(
int k,
int j)
const {
return scale_[k];}
529 void resize(
Range const& range);
532 void updateStatistics();
534 void setStatistics();
536 void releaseStatistics();
543 template<
class Array>
546 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
549 scale_[k] =
params.row(
kp+1).mean();
581 inline Real const&
shape(
int k,
int j)
const {
return shape_[k];}
583 inline Real const&
scale(
int k,
int j)
const {
return scale_;}
588 void resize(
Range const& range);
591 void updateStatistics();
593 void setStatistics();
595 void releaseStatistics();
602 template<
class Array>
606 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
611 scale_ /= shape_.size();
642 inline Real const&
shape(
int k,
int j)
const {
return shape_[k];}
649 void resize(
Range const& range);
652 void updateStatistics();
654 void setStatistics();
656 void releaseStatistics();
663 template<
class Array>
667 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
672 scale_ /= shape_.size();
703 inline Real const&
shape(
int k,
int j)
const {
return shape_[k];}
705 inline Real const&
scale(
int k,
int j)
const {
return scale_[k][
j];}
710 void resize(
Range const& range);
713 void updateStatistics();
715 void setStatistics();
717 void releaseStatistics();
724 template<
class Array>
727 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
762 inline Real const&
shape(
int k,
int j)
const {
return shape_[k];}
764 inline Real const&
scale(
int k,
int j)
const {
return scale_[k];}
769 void resize(
Range const& range);
772 void updateStatistics();
774 void setStatistics();
776 void releaseStatistics();
783 template<
class Array>
786 for(
int k=shape_.begin(),
kp=
params.beginRows(); k<shape_.end(); ++k,
kp+=2)
789 scale_[k] =
params.row(
kp+1).mean();
In this file we define and implement the final class Array1D.
In this file we implement the final class CArrayPoint.
This file contain the definition and implementation of the Online classes.
The MultidimRegression class allows to regress a multidimensional output variable among a multivariat...
Index sub-vector region: Specialization when the size is unknown.
double Real
STK fundamental type of Real values.
The namespace STK is the main domain space of the Statistical ToolKit project.
Real const & scale(int k, int j) const
Array1D< CPointX > scale_
scales of the variables
Array1D< Stat::Online< CPointX, Real > > stat_scale_
Array of the scale statistics.
Stat::Online< Real, Real > stat_shape_
shape statistics
Real shape_
shape of the variables
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & shape(int k, int j) const
Real const & scale(int k, int j) const
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real shape_
shape of the variables
Array1D< Real > scale_
scales of the variables
Real const & shape(int k, int j) const
Stat::Online< Real, Real > stat_shape_
shape statistics
Array1D< Stat::Online< Real, Real > > stat_scale_
Array of the standard deviation statistics.
Array1D< CPointX > scale_
scales of the variables
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & scale(int k, int j) const
Array1D< Stat::Online< CPointX, Real > > stat_scale_
Array of the scale statistics.
CPointX shape_
shapes of the variables
Real const & shape(int k, int j) const
Stat::Online< CPointX, Real > stat_shape_
shape statistics
Real const & shape(int k, int j) const
CPointX shape_
shapes of the variables
Array1D< Real > scale_
scales of the variables
Real const & scale(int k, int j) const
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Array1D< Stat::Online< Real, Real > > stat_scale_
Array of the standard deviation statistics.
Stat::Online< CPointX, Real > stat_shape_
shape statistics
Real const & scale(int k, int j) const
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & shape(int k, int j) const
Array1D< Stat::Online< CPointX, Real > > stat_shape_
Array of the mean statistics.
Stat::Online< Real, Real > stat_scale_
Array of the standard deviation statistics.
Real scale_
scales of the variables
Array1D< CPointX > shape_
shapes of the variables
Real const & shape(int k, int j) const
Array1D< CPointX > shape_
shapes of the variables
Stat::Online< CPointX, Real > stat_scale_
Array of the standard deviation statistics.
Real const & scale(int k, int j) const
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Array1D< Stat::Online< CPointX, Real > > stat_shape_
Array of the mean statistics.
CPointX scale_
scales of the variables
Real const & scale(int k, int j) const
Real const & shape(int k, int j) const
Array1D< Stat::Online< CPointX, Real > > stat_shape_
Array of the mean statistics.
Array1D< CPointX > shape_
shapes of the variables
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Array1D< CPointX > scale_
scales of the variables
Array1D< Stat::Online< CPointX, Real > > stat_scale_
Array of the standard deviation statistics.
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & shape(int k, int j) const
Array1D< CPointX > shape_
shapes of the variables
Array1D< Stat::Online< Real, Real > > stat_scale_
Array of the standard deviation statistics.
Real const & scale(int k, int j) const
Array1D< Stat::Online< CPointX, Real > > stat_shape_
Array of the mean statistics.
Array1D< Real > scale_
scales of the variables
Stat::Online< Real, Real > stat_scale_
Array of the standard deviation statistics.
Array1D< Real > shape_
shapes of the variables
Array1D< Stat::Online< Real, Real > > stat_shape_
Array of the mean statistics.
Real const & shape(int k, int j) const
Real const & scale(int k, int j) const
Real scale_
scales of the variables
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & scale(int k, int j) const
CPointX scale_
scales of the variables
Array1D< Real > shape_
shapes of the variables
Stat::Online< CPointX, Real > stat_scale_
Array of the standard deviation statistics.
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & shape(int k, int j) const
Array1D< Stat::Online< Real, Real > > stat_shape_
Array of the mean statistics.
Real const & scale(int k, int j) const
Real const & shape(int k, int j) const
Array1D< CPointX > scale_
scales of the variables
Array1D< Stat::Online< CPointX, Real > > stat_scale_
Array of the standard deviation statistics.
Array1D< Stat::Online< Real, Real > > stat_shape_
Array of the mean statistics.
Array1D< Real > shape_
shapes of the variables
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
Real const & shape(int k, int j) const
Array1D< Real > scale_
scales of the variables
Array1D< Stat::Online< Real, Real > > stat_shape_
Array of the mean statistics.
Array1D< Stat::Online< Real, Real > > stat_scale_
Array of the standard deviation statistics.
Real const & scale(int k, int j) const
Array1D< Real > shape_
shapes of the variables
void setParameters(ExprBase< Array > const ¶ms)
Set the parameters of the mixture model.
struct storing the parameters of the mixture.
base class of the Gamma models Parameter Handler
Array1D< CPointX > meanLog_
log-means for each class
Array1D< CPointX > mean_
mean for each class
ParametersGammaBase & operator=(ParametersGammaBase const &other)
copy operator
~ParametersGammaBase()
destructor
Array1D< CPointX > variance_
variance for each class
void resize(Range const &range)