#include <iostream>#include <fstream>#include <cstdio>#include <cassert>#include <cmath>#include "liatools.h"
Go to the source code of this file.
Defines | |
| #define | ALIZE_GeneralTools_cpp |
Functions | |
| double | computeEntropy (Histo &hist) |
| double | computeMean (Histo &hist) |
| long | setDecision (double LLRClient, double decisionThreshold) |
| int | _compF (const void *op1, const void *op2) |
| bool | baggedFrame (double baggedFrameProbability) |
| unsigned long | correctedLength (unsigned long length, unsigned long &minimumLength, unsigned long &maximumLength) |
| void | baggedSegmentsConstraint (SegCluster &selectedSegments, SegCluster &baggedFrameSegment, double baggedProbability, unsigned long minimumLength, unsigned long maximumLength) |
| void | baggedSegments (SegCluster &selectedSegments, SegCluster &baggedSeg, unsigned long nbBagged, double &baggedProbability, unsigned long minimumLength, unsigned long maximumLength) |
| void | baggedSegments (SegCluster &selectedSegments, SegCluster &baggedFrameSegment, double baggedProbability, unsigned long minimumLength, unsigned long maximumLength) |
| void | baggedSegments (SegCluster &selectedSegments, SegCluster &baggedSelected, SegCluster &baggedUnselected, double baggedProbability, unsigned long minimumLength, unsigned long maximumLength) |
| double | meanLikelihood (StatServer &ss, FeatureServer &fs, MixtureGD &model, unsigned long idxBeginFrame, unsigned long nbFrames, Config &config) |
| double | meanLikelihood (StatServer &ss, FeatureServer &fs, MixtureGD &model, SegCluster &selectedSegments, Config &config) |
| double | meanLikelihood (StatServer &ss, FeatureServer **fsTab, SegCluster **segTab, unsigned long nbStream, MixtureGD &model, Config &config) |
| double | meanLikelihood (StatServer &ss, ObjectRefVector &FeatServ, ObjectRefVector &ClusterSeg, MixtureGD &model, DoubleVector &decision, Config &config) |
| void | globalMeanCov (FeatureServer &fs, SegCluster &selectedSegments, FrameAcc &globalFrameAcc, Config &config) |
| void | globalMeanCov (FeatureServer &fs, FrameAcc &globalFrameAcc, Config &config) |
| void | computeWarp (Histo *histoT, Histo &destH, FeatureServer &fs, unsigned long begin, unsigned long length, Config &config) |
| void | computeWarp (Histo *histoT, Histo &destH, FeatureServer &fs, Seg *seg, Config &config) |
| void | computeWarp (Histo *histoT, Histo &destH, FeatureServer &fs, SegCluster &selectedSegments, Config &config) |
| void | computeZeroOne (const DoubleVector &featureMean, const DoubleVector &featureStd, FeatureServer &fs, unsigned long begin, unsigned long length, Config &config) |
| void | computeZeroOne (FrameAccGD &frameAccu, FeatureServer &fs, unsigned long begin, unsigned long length, Config &config) |
| void | computeZeroOne (FrameAccGD &frameAccu, FeatureServer &fs, Seg *seg, Config &config) |
| void | computeZeroOne (const DoubleVector &featureMean, const DoubleVector &featureStd, FeatureServer &fs, Seg *seg, Config &config) |
| void | computeZeroOne (FrameAccGD &frameAccu, FeatureServer &fs, SegCluster &selectedSegments, Config &config) |
| void | computeZeroOne (const DoubleVector &featureMean, const DoubleVector &featureStd, FeatureServer &fs, SegCluster &selectedSegments, Config &config) |
| void | cms (String &featureFileName, FeatureServer &fs, Config &config) |
| void | outputFeatureFile (Config &config, FeatureServer &fs, Feature &f, FeatureFileWriter &w) |
| void | outputFeatureFile (Config &config, FeatureServer &fs, unsigned long begin, unsigned long length, FeatureFileWriter &w) |
| void | outputFeatureFile (Config &config, FeatureServer &fs, Seg *seg, FeatureFileWriter &w) |
| void | outputFeatureFile (Config &config, FeatureServer &fs, SegCluster &selectedSegments, FeatureFileWriter &w) |
| unsigned long | getBestGaussian (Mixture &M, Feature &f) |
| void | mapDataToDistrib (double &data, const double meanData, const double covData, const double meanMap, const double covMap) |
| void | featureMapping (MixtureServer &ms, Feature &f, Config &config) |
| void | featureMapping (MixtureServer &ms, FeatureServer &fs, Seg *seg, Config &config) |
| void | featureMapping (MixtureServer &ms, FeatureServer &fs, SegCluster &selectedSegments, Config &config) |
| double | likelihoodGD (const DistribGD &d, const DistribGD &m) |
| double | likelihoodGD (const MixtureGD &data, const MixtureGD &model, TabWeight &tabWD, TabWeight &tabWM) |
| double | likelihoodGD (const MixtureGD &data, const MixtureGD &model, TabWeight &tabWD) |
| double | likelihoodGD (const MixtureGD &data, const MixtureGD &model) |
| #define ALIZE_GeneralTools_cpp |
Definition at line 56 of file GeneralTools.cpp.
| int _compF | ( | const void * | op1, |
| const void * | op2 | ||
| ) |
Definition at line 277 of file GeneralTools.cpp.
Referenced by TabWeight::_sortByWeight().
| bool baggedFrame | ( | double | baggedFrameProbability ) |
Definition at line 309 of file GeneralTools.cpp.
Referenced by baggedSegments().
| void baggedSegments | ( | SegCluster & | selectedSegments, |
| SegCluster & | baggedSeg, | ||
| unsigned long | nbBagged, | ||
| double & | baggedProbability, | ||
| unsigned long | minimumLength, | ||
| unsigned long | maximumLength | ||
| ) |
Definition at line 330 of file GeneralTools.cpp.
References baggedFrame(), correctedLength(), debug, showCluster(), totalFrame(), verbose, and verboseLevel.
| void baggedSegments | ( | SegCluster & | selectedSegments, |
| SegCluster & | baggedFrameSegment, | ||
| double | baggedProbability, | ||
| unsigned long | minimumLength, | ||
| unsigned long | maximumLength | ||
| ) |
Definition at line 455 of file GeneralTools.cpp.
References baggedFrame(), correctedLength(), debug, showCluster(), totalFrame(), verbose, and verboseLevel.
Referenced by adaptModel(), adaptModelEM(), baggedSegmentsConstraint(), crossValid(), mixtureInit(), modelBasedadaptModel(), modelBasedadaptModelEM(), trainModel(), and trainModelStream().
| void baggedSegments | ( | SegCluster & | selectedSegments, |
| SegCluster & | baggedSelected, | ||
| SegCluster & | baggedUnselected, | ||
| double | baggedProbability, | ||
| unsigned long | minimumLength, | ||
| unsigned long | maximumLength | ||
| ) |
Definition at line 513 of file GeneralTools.cpp.
References baggedFrame(), correctedLength(), debug, showCluster(), totalFrame(), and verboseLevel.
| void baggedSegmentsConstraint | ( | SegCluster & | selectedSegments, |
| SegCluster & | baggedFrameSegment, | ||
| double | baggedProbability, | ||
| unsigned long | minimumLength, | ||
| unsigned long | maximumLength | ||
| ) |
Definition at line 322 of file GeneralTools.cpp.
References baggedSegments(), and totalFrame().
| void cms | ( | String & | featureFileName, |
| FeatureServer & | fs, | ||
| Config & | config | ||
| ) |
Definition at line 713 of file GeneralTools.cpp.
References accumulateStatFrame(), computeZeroOne(), initializeClusters(), and verifyClusterFile().
Referenced by ComputeTestFA(), ComputeTestLFA(), normFeat(), normFeatFA(), and normFeatLFA().
| double computeEntropy | ( | Histo & | hist ) |
Definition at line 194 of file GeneralTools.cpp.
Referenced by ComputeTestHisto().
| double computeMean | ( | Histo & | hist ) |
Definition at line 213 of file GeneralTools.cpp.
Referenced by ComputeTestHisto().
| void computeWarp | ( | Histo * | histoT, |
| Histo & | destH, | ||
| FeatureServer & | fs, | ||
| unsigned long | begin, | ||
| unsigned long | length, | ||
| Config & | config | ||
| ) |
Definition at line 642 of file GeneralTools.cpp.
References warping().
Referenced by computeWarp(), and normFeat().
| void computeWarp | ( | Histo * | histoT, |
| Histo & | destH, | ||
| FeatureServer & | fs, | ||
| Seg * | seg, | ||
| Config & | config | ||
| ) |
Definition at line 656 of file GeneralTools.cpp.
References computeWarp().
| void computeWarp | ( | Histo * | histoT, |
| Histo & | destH, | ||
| FeatureServer & | fs, | ||
| SegCluster & | selectedSegments, | ||
| Config & | config | ||
| ) |
Definition at line 661 of file GeneralTools.cpp.
References computeWarp().
| void computeZeroOne | ( | const DoubleVector & | featureMean, |
| const DoubleVector & | featureStd, | ||
| FeatureServer & | fs, | ||
| unsigned long | begin, | ||
| unsigned long | length, | ||
| Config & | config | ||
| ) |
Definition at line 670 of file GeneralTools.cpp.
| void computeZeroOne | ( | FrameAccGD & | frameAccu, |
| FeatureServer & | fs, | ||
| unsigned long | begin, | ||
| unsigned long | length, | ||
| Config & | config | ||
| ) |
Definition at line 683 of file GeneralTools.cpp.
References computeZeroOne().
Referenced by cms(), computeZeroOne(), and normFeat().
| void computeZeroOne | ( | FrameAccGD & | frameAccu, |
| FeatureServer & | fs, | ||
| Seg * | seg, | ||
| Config & | config | ||
| ) |
Definition at line 689 of file GeneralTools.cpp.
References computeZeroOne().
| void computeZeroOne | ( | const DoubleVector & | featureMean, |
| const DoubleVector & | featureStd, | ||
| FeatureServer & | fs, | ||
| Seg * | seg, | ||
| Config & | config | ||
| ) |
Definition at line 695 of file GeneralTools.cpp.
References computeZeroOne().
| void computeZeroOne | ( | const DoubleVector & | featureMean, |
| const DoubleVector & | featureStd, | ||
| FeatureServer & | fs, | ||
| SegCluster & | selectedSegments, | ||
| Config & | config | ||
| ) |
Definition at line 705 of file GeneralTools.cpp.
References computeZeroOne(), and verbose.
| void computeZeroOne | ( | FrameAccGD & | frameAccu, |
| FeatureServer & | fs, | ||
| SegCluster & | selectedSegments, | ||
| Config & | config | ||
| ) |
Definition at line 700 of file GeneralTools.cpp.
References computeZeroOne().
| unsigned long correctedLength | ( | unsigned long | length, |
| unsigned long & | minimumLength, | ||
| unsigned long & | maximumLength | ||
| ) |
Definition at line 316 of file GeneralTools.cpp.
Referenced by baggedSegments().
| void featureMapping | ( | MixtureServer & | ms, |
| Feature & | f, | ||
| Config & | config | ||
| ) |
Definition at line 782 of file GeneralTools.cpp.
References debug, getBestGaussian(), and mapDataToDistrib().
| void featureMapping | ( | MixtureServer & | ms, |
| FeatureServer & | fs, | ||
| Seg * | seg, | ||
| Config & | config | ||
| ) |
Definition at line 793 of file GeneralTools.cpp.
References featureMapping().
| void featureMapping | ( | MixtureServer & | ms, |
| FeatureServer & | fs, | ||
| SegCluster & | selectedSegments, | ||
| Config & | config | ||
| ) |
Definition at line 805 of file GeneralTools.cpp.
References featureMapping().
| unsigned long getBestGaussian | ( | Mixture & | M, |
| Feature & | f | ||
| ) |
Definition at line 762 of file GeneralTools.cpp.
Referenced by featureMapping().
| void globalMeanCov | ( | FeatureServer & | fs, |
| FrameAcc & | globalFrameAcc, | ||
| Config & | config | ||
| ) |
Definition at line 634 of file GeneralTools.cpp.
References accumulateStatFrame().
| void globalMeanCov | ( | FeatureServer & | fs, |
| SegCluster & | selectedSegments, | ||
| FrameAcc & | globalFrameAcc, | ||
| Config & | config | ||
| ) |
Definition at line 629 of file GeneralTools.cpp.
References accumulateStatFrame().
Referenced by clusteringCriterion(), clusteringCriterionWithoutWorldInit(), energyDetector(), and infoFeat().
| double likelihoodGD | ( | const MixtureGD & | data, |
| const MixtureGD & | model | ||
| ) |
Definition at line 852 of file GeneralTools.cpp.
References likelihoodGD().
| double likelihoodGD | ( | const MixtureGD & | data, |
| const MixtureGD & | model, | ||
| TabWeight & | tabWD, | ||
| TabWeight & | tabWM | ||
| ) |
Definition at line 828 of file GeneralTools.cpp.
References debug, TabWeightElem::distribP, TabWeight::getArray(), TabWeight::getDistrib(), TabWeight::getNbTop(), TabWeight::getWeight(), likelihoodGD(), and TabWeightElem::weight.
| double likelihoodGD | ( | const DistribGD & | d, |
| const DistribGD & | m | ||
| ) |
Definition at line 816 of file GeneralTools.cpp.
Referenced by computeLLRGD(), likelihoodGD(), modelBasedadaptModel(), and modelBasedadaptModelEM().
| double likelihoodGD | ( | const MixtureGD & | data, |
| const MixtureGD & | model, | ||
| TabWeight & | tabWD | ||
| ) |
Definition at line 848 of file GeneralTools.cpp.
References likelihoodGD().
| void mapDataToDistrib | ( | double & | data, |
| const double | meanData, | ||
| const double | covData, | ||
| const double | meanMap, | ||
| const double | covMap | ||
| ) |
Definition at line 777 of file GeneralTools.cpp.
Referenced by featureMapping().
| double meanLikelihood | ( | StatServer & | ss, |
| FeatureServer & | fs, | ||
| MixtureGD & | model, | ||
| SegCluster & | selectedSegments, | ||
| Config & | config | ||
| ) |
Definition at line 589 of file GeneralTools.cpp.
References accumulateStatLLK().
| double meanLikelihood | ( | StatServer & | ss, |
| FeatureServer ** | fsTab, | ||
| SegCluster ** | segTab, | ||
| unsigned long | nbStream, | ||
| MixtureGD & | model, | ||
| Config & | config | ||
| ) |
Definition at line 599 of file GeneralTools.cpp.
References accumulateStatLLK().
| double meanLikelihood | ( | StatServer & | ss, |
| ObjectRefVector & | FeatServ, | ||
| ObjectRefVector & | ClusterSeg, | ||
| MixtureGD & | model, | ||
| DoubleVector & | decision, | ||
| Config & | config | ||
| ) |
Definition at line 610 of file GeneralTools.cpp.
References accumulateStatLLK().
| double meanLikelihood | ( | StatServer & | ss, |
| FeatureServer & | fs, | ||
| MixtureGD & | model, | ||
| unsigned long | idxBeginFrame, | ||
| unsigned long | nbFrames, | ||
| Config & | config | ||
| ) |
Definition at line 580 of file GeneralTools.cpp.
References accumulateStatLLK().
Referenced by adaptModel(), adaptModelEM(), bestFittingCluster(), bestFittingSegment(), cohortMaxLikelihood(), crossValid(), modelBasedadaptModel(), modelBasedadaptModelEM(), trainModel(), and trainModelStream().
| void outputFeatureFile | ( | Config & | config, |
| FeatureServer & | fs, | ||
| Feature & | f, | ||
| FeatureFileWriter & | w | ||
| ) |
Definition at line 733 of file GeneralTools.cpp.
Referenced by featMap(), featWarp(), normFeat(), normFeatFA(), normFeatLFA(), normFeatNAP(), and outputFeatureFile().
| void outputFeatureFile | ( | Config & | config, |
| FeatureServer & | fs, | ||
| SegCluster & | selectedSegments, | ||
| FeatureFileWriter & | w | ||
| ) |
Definition at line 753 of file GeneralTools.cpp.
References outputFeatureFile().
| void outputFeatureFile | ( | Config & | config, |
| FeatureServer & | fs, | ||
| unsigned long | begin, | ||
| unsigned long | length, | ||
| FeatureFileWriter & | w | ||
| ) |
Definition at line 738 of file GeneralTools.cpp.
References outputFeatureFile().
| void outputFeatureFile | ( | Config & | config, |
| FeatureServer & | fs, | ||
| Seg * | seg, | ||
| FeatureFileWriter & | w | ||
| ) |
Definition at line 746 of file GeneralTools.cpp.
References outputFeatureFile(), and verbose.
| long setDecision | ( | double | LLRClient, |
| double | decisionThreshold | ||
| ) |
Definition at line 232 of file GeneralTools.cpp.
Referenced by ComputeTest(), ComputeTestByLabel(), ComputeTestDotProduct(), ComputeTestFA(), ComputeTestHisto(), ComputeTestJFA(), ComputeTestLFA(), and ComputeTestNAP().
1.7.2