quick start:g++ [flags ...] file ... -l /isip/tools/lib/$ISIP_BINARY/lib_stat.a #include <GaussianModel.h> GaussianModel(MODE mode = DEF_MODE); GaussianModel(const GaussianModel& arg); boolean eq(const GaussianModel& arg) const; boolean assign(const GaussianModel& arg); boolean setMean(const VectorFloat& vec); boolean setCovariance(const MatrixFloat& mat);
description:GaussianModel gauss; VectorFloat mean; mean.assign(L"1.5, 2.5, 1.3"); gauss.setMean(mean); MatrixFloat cov(3, 3, L"1.0, 2.0, 3.0", Integral::DIAGONAL); gauss.setCovariance(cov);
where |
static const String CLASS_NAME;
static const String DEF_PARAM;
static const String PARAM_MEAN;
static const String PARAM_COVARIANCE;
static const String PARAM_MEAN_ACCUM;
static const String PARAM_COVARIANCE_ACCUM;
static const String PARAM_OCCUPANCY_ACCUM;
static const String PARAM_ACCESS_ACCUM;
static const float DEF_SCALE_FACTOR = 0.0;
static const long ERR = 60100;
VectorDouble mean_accum_d;
MatrixDouble covar_accum_d;
Long access_accum_d;
Double occ_accum_d;
VectorFloat mean_d;
MatrixFloat covariance_d;
float scale_d;
static VectorFloat deviation_d;
static MemoryManager mgr_d;
static const String& name();
static boolean diagnose(Integral::DEBUG debug_level);
boolean debug(const unichar* message) const;
setDebug is inherited from base class
~GaussianModel();
GaussianModel(MODE mode = DEF_MODE);
GaussianModel(const GaussianModel& arg);
boolean assign(const GaussianModel& arg);
GaussianModel& operator=(const GaussianModel& arg);
long sofSize() const;
boolean read(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean write(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readAccumulator(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean writeAccumulator(Sof& sof, long tag, const String& name = CLASS_NAME) const;
boolean readData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean readAccumulatorData(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean writeAccumulatorData(Sof& sof, const String& pname = DEF_PARAM) const;
boolean readOccupancies(Sof& sof, long tag, const String& name = CLASS_NAME);
boolean readDataOccupancies(Sof& sof, const String& pname = DEF_PARAM, long size = SofParser::FULL_OBJECT, boolean param = true, boolean nested = false);
boolean eq(const GaussianModel& arg) const;
static void* operator new(size_t size);
static void* operator new[](size_t size);
static void operator delete(void* ptr);
static void operator delete[](void* ptr);
static boolean setGrowSize(long grow_size);
boolean clear(Integral::CMODE cmode = Integral::DEF_CMODE);
GaussianModel(VectorFloat mean, MatrixFloat cov, MODE mode = DEF_MODE);
GaussianModel(float mean, float variance, MODE mode = DEF_MODE);
boolean setMean(const VectorFloat& mean);
boolean setMean(float mean);
boolean setCovariance(const MatrixFloat& cov);
boolean setCovariance(float cov);
boolean getMean(const VectorFloat& mean);
boolean getMeanAccumulator(const VectorDouble& mean_accum);
boolean getCovariance(const MatrixFloat& cov);
boolean assign(const StatisticalModelBase& arg);
boolean eq(const StatisticalModelBase& arg);
boolean setMode(MODE mode);
const String& className() const;
boolean init();
float getLikelihood(const VectorFloat& input);
float getLogLikelihood(const VectorFloat& input);
couble getOccupancy();
boolean setOccupancy(double arg);
boolean setAccessCount(long arg);
long getAccessCount();
boolean resetAccumulators();
boolean initialize(VectorFloat& param);
boolean accumulate(VectorFloat& param);
boolean accumulate(VectorFloat& param, VectorFloat& data, boolean precomp);
boolean update(VectorFloat& param);
boolean adapt(const Vector<VectorFloat>& transform);
// declare a GaussianModel object // GaussianModel model; // set the mean and covariance matrix // VectorFloat mean(L"1.0, 1.0, 1.0"); MatrixFloat cov(3, 3, L"0.1, 0.1, 0.1", Integral::DIAGONAL); model.setMean(mean); model.setCovariance(cov); // declare the input vector // VectorFloat input; input.assign(L"-1.050, -7.709, -2.303"); // get the log likelihood // Float distance = model.getLogLikelihood(input);