The Likelihood model base class.
The Likelihood model computes approximately the distribution \(p(y|f)\), where \(y\) are the labels, and \(f\) is the prediction function.
在文件 LikelihoodModel.h 第 37 行定义.
Public 属性 | |
SGIO * | io |
Parallel * | parallel |
Version * | version |
Parameter * | m_parameters |
Parameter * | m_model_selection_parameters |
Parameter * | m_gradient_parameters |
ParameterMap * | m_parameter_map |
uint32_t | m_hash |
Protected 成员函数 | |
virtual TParameter * | migrate (DynArray< TParameter * > *param_base, const SGParamInfo *target) |
virtual void | one_to_one_migration_prepare (DynArray< TParameter * > *param_base, const SGParamInfo *target, TParameter *&replacement, TParameter *&to_migrate, char *old_name=NULL) |
virtual void | load_serializable_pre () throw (ShogunException) |
virtual void | load_serializable_post () throw (ShogunException) |
virtual void | save_serializable_pre () throw (ShogunException) |
virtual void | save_serializable_post () throw (ShogunException) |
CLikelihoodModel | ( | ) |
default constructor
在文件 LikelihoodModel.cpp 第 17 行定义.
|
virtual |
在文件 LikelihoodModel.cpp 第 21 行定义.
|
inherited |
Builds a dictionary of all parameters in SGObject as well of those of SGObjects that are parameters of this object. Dictionary maps parameters to the objects that own them.
dict | dictionary of parameters to be built. |
在文件 SGObject.cpp 第 1156 行定义.
|
virtualinherited |
Creates a clone of the current object. This is done via recursively traversing all parameters, which corresponds to a deep copy. Calling equals on the cloned object always returns true although none of the memory of both objects overlaps.
在文件 SGObject.cpp 第 1273 行定义.
|
virtualinherited |
A deep copy. All the instance variables will also be copied.
在文件 SGObject.h 第 126 行定义.
Recursively compares the current SGObject to another one. Compares all registered numerical parameters, recursion upon complex (SGObject) parameters. Does not compare pointers!
May be overwritten but please do with care! Should not be necessary in most cases.
other | object to compare with |
accuracy | accuracy to use for comparison (optional) |
在文件 SGObject.cpp 第 1177 行定义.
|
virtual |
get derivative of log likelihood \(log(p(y|f))\) with respect to given parameter
lab | labels used |
func | function location |
param | parameter |
被 CStudentsTLikelihood , 以及 CGaussianLikelihood 重载.
在文件 LikelihoodModel.h 第 167 行定义.
|
pure virtual |
returns the first moment of a given (unnormalized) probability distribution \(q(f_i) = Z_i^-1 p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2)\), where \( Z_i=\int p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2) df_i\).
This method is useful for EP local likelihood approximation.
mu | mean of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
s2 | variance of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
lab | labels \(y_i\) |
i | index i |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
virtual |
returns the first moment of a given (unnormalized) probability distribution \(q(f_i) = Z_i^-1 p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2)\) for each \(f_i\), where \( Z_i=\int p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2) df_i\).
Wrapper method which calls get_first_moment multiple times.
mu | mean of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
s2 | variance of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
lab | labels \(y_i\) |
在文件 LikelihoodModel.cpp 第 52 行定义.
|
inherited |
|
inherited |
|
inherited |
|
pure virtual |
get derivative of log likelihood \(log(p(y|f))\) with respect to location function \(f\)
lab | labels used |
func | function location |
i | index, choices are 1, 2, and 3 for first, second, and third derivatives respectively |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
pure virtual |
Returns the logarithm of the point-wise likelihood \(log(p(y_i|f_i))\) for each label \(y_i\).
One can evaluate log-likelihood like: \( log(p(y|f)) = \sum_{i=1}^{n} log(p(y_i|f_i))\)
lab | labels \(y_i\) |
func | values of the function \(f_i\) |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
virtual |
Returns the log-likelihood \(log(p(y|f)) = \sum_{i=1}^{n} log(p(y_i|f_i))\) for each of the provided functions \( f \) in the given matrix.
Wrapper method which calls get_log_probability_f multiple times.
lab | labels \(y_i\) |
F | values of the function \(f_i\) where each column of the matrix is one function \( f \). |
在文件 LikelihoodModel.cpp 第 31 行定义.
|
pure virtual |
returns the zeroth moment of a given (unnormalized) probability distribution:
\[ log(Z_i) = log\left(\int p(y_i|f_i) \mathcal{N}(f_i|\mu,\sigma^2) df_i\right) \]
for each \(f_i\).
mu | mean of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
s2 | variance of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
lab | labels \(y_i\) |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
virtual |
get model type
被 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 重载.
在文件 LikelihoodModel.h 第 114 行定义.
|
inherited |
在文件 SGObject.cpp 第 1060 行定义.
|
inherited |
Returns description of a given parameter string, if it exists. SG_ERROR otherwise
param_name | name of the parameter |
在文件 SGObject.cpp 第 1084 行定义.
|
inherited |
Returns index of model selection parameter with provided index
param_name | name of model selection parameter |
在文件 SGObject.cpp 第 1097 行定义.
|
pure virtualinherited |
Returns the name of the SGSerializable instance. It MUST BE the CLASS NAME without the prefixed `C'.
实现了 SGRefObject.
在 CMath, CHMM, CStringFeatures< ST >, CStringFeatures< T >, CStringFeatures< uint8_t >, CStringFeatures< char >, CStringFeatures< uint16_t >, CTrie< Trie >, CTrie< DNATrie >, CTrie< POIMTrie >, CDynamicArray< T >, CDynamicArray< float64_t >, CDynamicArray< float32_t >, CDynamicArray< int32_t >, CDynamicArray< char >, CDynamicArray< bool >, CMultitaskKernelTreeNormalizer, CDynProg, CList, CDenseFeatures< ST >, CDenseFeatures< uint32_t >, CDenseFeatures< float64_t >, CDenseFeatures< T >, CDenseFeatures< uint16_t >, CFile, CSparseFeatures< T >, CSparseFeatures< ST >, CSparseFeatures< float64_t >, CStatistics, CSpecificityMeasure, CLibSVMFile, CPrecisionMeasure, CPlif, CRecallMeasure, CDynamicObjectArray, CCrossCorrelationMeasure, CCSVFile, CF1Measure, CLaRank, CBinaryFile, CWRACCMeasure, CProtobufFile, CTaxonomy, CBALMeasure, CBitString, CStreamingVwFeatures, CStreamingSparseFeatures< T >, CErrorRateMeasure, CMultitaskKernelPlifNormalizer, CWDSVMOcas, CMachine, CAccuracyMeasure, CStreamingFile, CRandom, CMemoryMappedFile< T >, CLMNNStatistics, CMultitaskKernelMaskNormalizer, CMemoryMappedFile< ST >, CMKL, CAlphabet, CStreamingDenseFeatures< T >, CStreamingDenseFeatures< float64_t >, CStreamingDenseFeatures< float32_t >, CCombinedDotFeatures, CGUIStructure, CCache< T >, CCache< uint32_t >, CCache< ST >, CCache< float64_t >, CCache< uint8_t >, CCache< KERNELCACHE_ELEM >, CCache< char >, CCache< uint16_t >, CCache< shogun::SGSparseVectorEntry< ST > >, CLinearTimeMMD, CMultitaskKernelMaskPairNormalizer, CSVM, CMultitaskKernelNormalizer, CGUIClassifier, CGUIFeatures, CGMM, CHashedWDFeaturesTransposed, CLinearHMM, CStructuredModel, CSimpleFile< T >, CGaussian, CBinaryStream< T >, CParameterCombination, CStreamingStringFeatures< T >, CStateModel, CMulticlassSVM, COnlineLinearMachine, CRandomKitchenSinksDotFeatures, CVwParser, CPluginEstimate, CVowpalWabbit, CBinnedDotFeatures, CSVMOcas, CPlifMatrix, CHashedWDFeatures, CCrossValidation, CImplicitWeightedSpecFeatures, CSparseMatrixOperator< T >, CCombinedFeatures, CSNPFeatures, CWDFeatures, CIOBuffer, CCrossValidationMulticlassStorage, CHashedDenseFeatures< ST >, CLeastAngleRegression, CTwoStateModel, CQuadraticTimeMMD, CHMSVMModel, CKMeans, CLossFunction, CKNN, CRandomFourierGaussPreproc, CGUIKernel, CMKLMulticlass, CHashedSparseFeatures< ST >, CExplicitSpecFeatures, CLibLinearMTL, CModelSelectionParameters, CGUIHMM, CHashedDocDotFeatures, CJacobiEllipticFunctions, COnlineSVMSGD, CPositionalPWM, CZeroMeanCenterKernelNormalizer, CSparsePolyFeatures, CCplex, CSqrtDiagKernelNormalizer, CStochasticProximityEmbedding, CScatterKernelNormalizer, CRationalApproximation, CLatentModel, CGMNPLib, CLibLinear, CDixonQTestRejectionStrategy, CTableFactorType, CSVMSGD, CVwCacheReader, CMulticlassMachine, CLBPPyrDotFeatures, CRidgeKernelNormalizer, CLinearMachine, CHSIC, CMulticlassSOLabels, CTestStatistic, CTime, CSGDQN, CSNPStringKernel, CMatrixFeatures< ST >, CWeightedCommWordStringKernel, CHingeLoss, CQPBSVMLib, CSerializableAsciiFile, CSquaredLoss, CCustomKernel, CFactor, CPlifArray, CMulticlassLabels, CHash, CStreamingHashedDocDotFeatures, CStreamingVwFile, CQDA, CKernelRidgeRegression, CCustomDistance, CWeightedDegreeStringKernel, CBaggingMachine, CTOPFeatures, CDiceKernelNormalizer, CMultitaskKernelMklNormalizer, CTask, CVwEnvironment, CBinaryLabels, CMAPInferImpl, CDomainAdaptationSVMLinear, CLDA, CMCLDA, CWeightedDegreePositionStringKernel, CTanimotoKernelNormalizer, CStreamingHashedDenseFeatures< ST >, CStreamingHashedSparseFeatures< ST >, CBesselKernel, CAvgDiagKernelNormalizer, CVarianceKernelNormalizer, CCircularBuffer, CMulticlassModel, CKernelTwoSampleTestStatistic, CHierarchical, COperatorFunction< T >, COperatorFunction< float64_t >, CFKFeatures, CCombinedKernel, CSparseSpatialSampleStringKernel, CSpectrumMismatchRBFKernel, CVwRegressor, CHashedDocConverter, CFactorGraphLabels, CDataGenerator, CDotKernel, CGaussianKernel, CCommWordStringKernel, CStringSubsequenceKernel, CSet< T >, CDenseMatrixOperator< T >, CTwoDistributionsTestStatistic, CSequenceLabels, CDenseMatrixOperator< float64_t >, COnlineLibLinear, CPolyFeatures, CLibSVR, CNode, CContingencyTableEvaluation, CStreamingAsciiFile, CChi2Kernel, CPyramidChi2, CSignal, CIntegration, CLPBoost, CSalzbergWordStringKernel, CStructuredLabels, CSquaredHingeLoss, CPCA, CNewtonSVM, CCompressor, CSVMLin, CVwLearner, CIterativeLinearSolver< T, ST >, CIterativeLinearSolver< float64_t, float64_t >, CIterativeLinearSolver< complex128_t, float64_t >, CIterativeLinearSolver< T, T >, CLocallyLinearEmbedding, CDistanceKernel, CCommUlongStringKernel, CHomogeneousKernelMap, CVwNativeCacheReader, CHistogram, CGaussianShiftKernel, CMahalanobisDistance, CAttributeFeatures, CRandomFourierDotFeatures, CFirstElementKernelNormalizer, CGCArray< T >, CMap< T, K >, CLogLoss, CLogLossMargin, CSmoothHingeLoss, CMap< shogun::TParameter *, shogun::SGVector< float64_t > >, CMap< shogun::TParameter *, shogun::CSGObject * >, CGNPPLib, CLatentLabels, CScatterSVM, CLinearRidgeRegression, CSpectrumRBFKernel, CIndexBlockTree, CSegmentLoss, CKernelDistance, CGaussianProcessBinaryClassification, CLPM, CCircularKernel, CSphericalKernel, CPolyMatchStringKernel, CEigenSolver, COligoStringKernel, CSimpleLocalityImprovedStringKernel, CMultidimensionalScaling, CGaussianDistribution, CStreamingFileFromFeatures, CStreamingVwCacheFile, CANOVAKernel, CConstKernel, CDiagKernel, CMulticlassMultipleOutputLabels, CLanczosEigenSolver, CKernelPCA, CEmbeddingConverter, CEuclideanDistance, CWeightedMajorityVote, CMulticlassOVREvaluation, CPolyKernel, CPolyMatchWordStringKernel, CMultitaskClusteredLogisticRegression, CNearestCentroid, CProductKernel, CSparseKernel< ST >, CGaussianMatchStringKernel, CTStudentKernel, CTraceSampler, CGaussianProcessRegression, CDiffusionMaps, CStreamingFileFromDenseFeatures< T >, CStreamingFileFromSparseFeatures< T >, CStreamingFileFromStringFeatures< T >, CFixedDegreeStringKernel, CStringKernel< ST >, CTensorProductPairKernel, CDistanceMachine, CGaussianNaiveBayes, CStringKernel< uint16_t >, CStringKernel< char >, CStringKernel< uint64_t >, CLaplacianEigenmaps, CCauchyKernel, CLogKernel, CPowerKernel, CRationalQuadraticKernel, CWaveKernel, CWaveletKernel, CMulticlassOneVsRestStrategy, CKernelIndependenceTestStatistic, MKLMulticlassGradient, CMinkowskiMetric, CExponentialKernel, CAttenuatedEuclideanDistance, CParser, CKernelMachine, CInverseMultiQuadricKernel, CDistantSegmentsKernel, CLocalityImprovedStringKernel, CMatchWordStringKernel, CRegulatoryModulesStringKernel, CFFDiag, CJADiag, CJADiagOrth, CAUCKernel, CHistogramIntersectionKernel, CSigmoidKernel, CJediDiag, CQDiag, CUWedge, CMMDKernelSelectionCombOpt, CMultiquadricKernel, CExactInferenceMethod, CLabelsFactory, CICAConverter, CMulticlassAccuracy, CGaussianARDKernel, CGaussianShortRealKernel, CLocalAlignmentStringKernel, CStructuredOutputMachine, CLogRationalApproximationIndividual, CMMDKernelSelectionCombMaxL2, CPerceptron, CSplineKernel, CMatrixOperator< T >, CDimensionReductionPreprocessor, CGHMM, CHistogramWordStringKernel, CDelimiterTokenizer, CLinearOperator< T >, CCGMShiftedFamilySolver, CIterativeShiftedLinearFamilySolver< T, ST >, CLogRationalApproximationCGM, CTaskTree, CLinearOperator< float64_t >, CLinearOperator< complex128_t >, CIterativeShiftedLinearFamilySolver< float64_t, complex128_t >, CProbabilityDistribution, CFITCInferenceMethod, CLaplacianInferenceMethod, CLogDetEstimator, CMultitaskROCEvaluation, CGUIConverter, CCanberraMetric, CCosineDistance, CManhattanMetric, CJensenShannonKernel, CLinearKernel, CDualLibQPBMSOSVM, CMultitaskL12LogisticRegression, CGeodesicMetric, CJensenMetric, CTanimotoDistance, CIdentityKernelNormalizer, CLinearStringKernel, CDecompressString< ST >, CGUILabels, CSOBI, CKernelLocallyLinearEmbedding, CMMDKernelSelection, CMMDKernelSelectionComb, CMMDKernelSelectionMedian, MKLMulticlassGLPK, CFFSep, CChiSquareDistance, CHammingWordDistance, CLineReader, CNGramTokenizer, CLinearStructuredOutputMachine, CRandomSearchModelSelection, CLeastSquaresRegression, CAveragedPerceptron, CVwNativeCacheWriter, CJediSep, CUWedgeSep, CSparseDistance< ST >, CCrossValidationResult, CLatentFeatures, CJobResultAggregator, CMulticlassOneVsOneStrategy, CMMDKernelSelectionOpt, CGUIPluginEstimate, CSparseDistance< float64_t >, CVwAdaptiveLearner, CBrayCurtisDistance, CChebyshewMetric, CFactorGraphFeatures, CRegressionLabels, CDenseMatrixExactLog, CLibLinearRegression, MKLMulticlassOptimizationBase, CVwNonAdaptiveLearner, CSparseEuclideanDistance, CRealFileFeatures, CLinearARDKernel, CPNorm, CStringDistance< ST >, CIndependentJob, CEPInferenceMethod, CRescaleFeatures, CMAPInference, CStringDistance< uint16_t >, CWeightedDegreeRBFKernel, CECOCRandomSparseEncoder, CMulticlassStrategy, CLogPlusOne, CGradientCriterion, CStructuredAccuracy, CDirectLinearSolverComplex, CIndividualJobResultAggregator, CGMNPSVM, CNormOne, CFastICA, CFactorGraphObservation, CScalarResult< T >, CLinearLatentMachine, CRationalApproximationCGMJob, CMultitaskLogisticRegression, CGUIDistance, CLibSVM, CStringFileFeatures< ST >, CLatentSVM, CRationalApproximationIndividualJob, CSumOne, CCCSOSVM, CMultitaskTraceLogisticRegression, CJade, CCanberraWordDistance, CManhattanWordDistance, CCrossValidationOutput, CLinearMulticlassMachine, CConjugateOrthogonalCGSolver, CGradientModelSelection, CECOCDiscriminantEncoder, CSortWordString, CTaskGroup, CGUIPreprocessor, CStudentsTLikelihood, CPruneVarSubMean, CIntronList, CRealNumber, CFeatureBlockLogisticRegression, CDenseExactLogJob, CLMNN, CSortUlongString, CSequence, CResultSet, CIsomap, CMeanSquaredError, CMeanSquaredLogError, CLatentSOSVM, CStoreVectorAggregator< T >, CIndexBlock, CMulticlassLibLinear, CStoreVectorAggregator< complex128_t >, CLinearLocalTangentSpaceAlignment, CNeighborhoodPreservingEmbedding, CMeanAbsoluteError, CDummyFeatures, CIndependentComputationEngine, CListElement, CThresholdRejectionStrategy, CHessianLocallyLinearEmbedding, CDenseDistance< ST >, CRealDistance, CVectorResult< T >, CIndexBlockGroup, CSparsePreprocessor< ST >, CMMDKernelSelectionMax, CDenseDistance< float64_t >, CLocalTangentSpaceAlignment, CStoreScalarAggregator< T >, CGaussianLikelihood, CConjugateGradientSolver, CVwConditionalProbabilityTree, CMultitaskLeastSquaresRegression, CCustomMahalanobisDistance, CCombinationRule, CClusteringAccuracy, CClusteringMutualInformation, CMeanShiftDataGenerator, CGaussianProcessMachine, CKernelStructuredOutputMachine, CStringPreprocessor< ST >, CFactorGraphModel, CStochasticSOSVM, CMultitaskLinearMachine, CStringPreprocessor< uint16_t >, CStringPreprocessor< uint64_t >, CSubsetStack, CGridSearchModelSelection, CLocalityPreservingProjections, CMajorityVote, CDirectEigenSolver, CLinearSolver< T, ST >, CLinearSolver< float64_t, float64_t >, CLinearSolver< complex128_t, float64_t >, CLinearSolver< T, T >, CMeanRule, CGradientEvaluation, CMulticlassLibSVM, CMKLRegression, CFactorDataSource, CFactorGraph, CSerialComputationEngine, CKernelMulticlassMachine, CNormalSampler, CKernelMeanMatching, CDomainAdaptationMulticlassLibLinear, CTaskRelation, CROCEvaluation, CGaussianBlobsDataGenerator, CSubset, CIndexBlockRelation, CECOCEncoder, CMulticlassTreeGuidedLogisticRegression, CBalancedConditionalProbabilityTree, CTreeMachineNode< T >, CFactorType, CSOSVMHelper, CTreeMachineNode< ConditionalProbabilityTreeNodeData >, CTreeMachineNode< RelaxedTreeNodeData >, CTreeMachineNode< VwConditionalProbabilityTreeNodeData >, CMKLClassification, CMKLOneClass, CGPBTSVM, CLibSVMOneClass, CGradientResult, CDirectSparseLinearSolver, CECOCIHDDecoder, CMulticlassLogisticRegression, CConditionalProbabilityTree, CRelaxedTree, CGNPPSVM, CMPDSVM, CProbitLikelihood, CECOCRandomDenseEncoder, CShareBoost, CTreeMachine< T >, CTreeMachine< ConditionalProbabilityTreeNodeData >, CTreeMachine< RelaxedTreeNodeData >, CTreeMachine< VwConditionalProbabilityTreeNodeData >, CMulticlassOCAS, CPRCEvaluation, CStratifiedCrossValidationSplitting, CGUIMath, CGUITime, CLogitLikelihood, CSparseInverseCovariance, CDisjointSet, CTDistributedStochasticNeighborEmbedding, CCrossValidationSplitting, CDenseSubsetFeatures< ST >, CECOCForestEncoder, CFactorAnalysis, CManifoldSculpting, CCrossValidationPrintOutput, CJobResult, CECOCAEDDecoder, CCrossValidationMKLStorage, CFunction, CECOCDecoder, CECOCEDDecoder, CData, CZeroMean, CNativeMulticlassMachine, CECOCStrategy, CConverter, CECOCSimpleDecoder, CLOOCrossValidationSplitting, SerializableAsciiReader00, CBaseMulticlassMachine, CECOCLLBDecoder, CStructuredData, CECOCHDDecoder, CRandomConditionalProbabilityTree, CECOCOVOEncoder, CECOCOVREncoder , 以及 CRejectionStrategy 内被实现.
|
virtual |
returns the logarithm of the predictive density of \(y_*\):
\[ log(p(y_*|X,y,x_*)) = log\left(\int p(y_*|f_*) p(f_*|X,y,x_*) df_*\right) \]
which approximately equals to
\[ log\left(\int p(y_*|f_*) \mathcal{N}(f_*|\mu,\sigma^2) df_*\right) \]
where normal distribution \(\mathcal{N}(\mu,\sigma^2)\) is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\).
NOTE: if lab equals to NULL, then each \(y_*\) equals to one.
mu | posterior mean of a Gaussian distribution \(\mathcal{N}(\mu,\sigma^2)\), which is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\) |
s2 | posterior variance of a Gaussian distribution \(\mathcal{N}(\mu,\sigma^2)\), which is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\) |
lab | labels \(y_*\) |
在文件 LikelihoodModel.cpp 第 25 行定义.
|
pure virtual |
returns mean of the predictive marginal \(p(y_*|X,y,x_*)\)
NOTE: if lab equals to NULL, then each \(y_*\) equals to one.
mu | posterior mean of a Gaussian distribution \(\mathcal{N}(\mu,\sigma^2)\), which is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\) |
s2 | posterior variance of a Gaussian distribution \(\mathcal{N}(\mu,\sigma^2)\), which is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\) |
lab | labels \(y_*\) |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
pure virtual |
returns variance of the predictive marginal \(p(y_*|X,y,x_*)\)
NOTE: if lab equals to NULL, then each \(y_*\) equals to one.
mu | posterior mean of a Gaussian distribution \(\mathcal{N}(\mu,\sigma^2)\), which is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\) |
s2 | posterior variance of a Gaussian distribution \(\mathcal{N}(\mu,\sigma^2)\), which is an approximation to the posterior marginal \(p(f_*|X,y,x_*)\) |
lab | labels \(y_*\) |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
virtual |
get derivative of the first derivative of log likelihood with respect to function location, i.e. \(\frac{\partial log(p(y|f))}{\partial f}\) with respect to given parameter
lab | labels used |
func | function location |
param | parameter |
被 CStudentsTLikelihood , 以及 CGaussianLikelihood 重载.
在文件 LikelihoodModel.h 第 185 行定义.
|
pure virtual |
returns the second moment of a given (unnormalized) probability distribution \(q(f_i) = Z_i^-1 p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2)\), where \( Z_i=\int p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2) df_i\).
This method is useful for EP local likelihood approximation.
mu | mean of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
s2 | variance of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
lab | labels \(y_i\) |
i | index i |
在 CStudentsTLikelihood, CGaussianLikelihood, CProbitLikelihood , 以及 CLogitLikelihood 内被实现.
|
virtual |
returns the second moment of a given (unnormalized) probability distribution \(q(f_i) = Z_i^-1 p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2)\) for each \(f_i\), where \( Z_i=\int p(y_i|f_i)\mathcal{N}(f_i|\mu,\sigma^2) df_i\).
Wrapper method which calls get_second_moment multiple times.
mu | mean of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
s2 | variance of the \(\mathcal{N}(f_i|\mu,\sigma^2)\) |
lab | labels \(y_i\) |
在文件 LikelihoodModel.cpp 第 69 行定义.
|
virtual |
get derivative of the second derivative of log likelihood with respect to function location, i.e. \(\frac{\partial^{2} log(p(y|f))}{\partial f^{2}}\) with respect to given parameter
lab | labels used |
func | function location |
param | parameter |
被 CStudentsTLikelihood , 以及 CGaussianLikelihood 重载.
在文件 LikelihoodModel.h 第 202 行定义.
|
virtualinherited |
If the SGSerializable is a class template then TRUE will be returned and GENERIC is set to the type of the generic.
generic | set to the type of the generic if returning TRUE |
在文件 SGObject.cpp 第 228 行定义.
|
inherited |
maps all parameters of this instance to the provided file version and loads all parameter data from the file into an array, which is sorted (basically calls load_file_parameter(...) for all parameters and puts all results into a sorted array)
file_version | parameter version of the file |
current_version | version from which mapping begins (you want to use Version::get_version_parameter() for this in most cases) |
file | file to load from |
prefix | prefix for members |
在文件 SGObject.cpp 第 633 行定义.
|
inherited |
loads some specified parameters from a file with a specified version The provided parameter info has a version which is recursively mapped until the file parameter version is reached. Note that there may be possibly multiple parameters in the mapping, therefore, a set of TParameter instances is returned
param_info | information of parameter |
file_version | parameter version of the file, must be <= provided parameter version |
file | file to load from |
prefix | prefix for members |
在文件 SGObject.cpp 第 474 行定义.
|
virtualinherited |
Load this object from file. If it will fail (returning FALSE) then this object will contain inconsistent data and should not be used!
file | where to load from |
prefix | prefix for members |
param_version | (optional) a parameter version different to (this is mainly for testing, better do not use) |
在文件 SGObject.cpp 第 305 行定义.
|
protectedvirtualinherited |
Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_POST is called.
ShogunException | Will be thrown if an error occurres. |
被 CWeightedDegreePositionStringKernel, CKernel, CList, CAlphabet, CLinearHMM, CGaussianKernel, CInverseMultiQuadricKernel, CCircularKernel , 以及 CExponentialKernel 重载.
在文件 SGObject.cpp 第 989 行定义.
|
protectedvirtualinherited |
Can (optionally) be overridden to pre-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::LOAD_SERIALIZABLE_PRE is called.
ShogunException | Will be thrown if an error occurres. |
被 CDynamicArray< T >, CDynamicArray< float64_t >, CDynamicArray< float32_t >, CDynamicArray< int32_t >, CDynamicArray< char >, CDynamicArray< bool > , 以及 CDynamicObjectArray 重载.
在文件 SGObject.cpp 第 984 行定义.
|
inherited |
Takes a set of TParameter instances (base) with a certain version and a set of target parameter infos and recursively maps the base level wise to the current version using CSGObject::migrate(...). The base is replaced. After this call, the base version containing parameters should be of same version/type as the initial target parameter infos. Note for this to work, the migrate methods and all the internal parameter mappings have to match
param_base | set of TParameter instances that are mapped to the provided target parameter infos |
base_version | version of the parameter base |
target_param_infos | set of SGParamInfo instances that specify the target parameter base |
在文件 SGObject.cpp 第 671 行定义.
|
protectedvirtualinherited |
creates a new TParameter instance, which contains migrated data from the version that is provided. The provided parameter data base is used for migration, this base is a collection of all parameter data of the previous version. Migration is done FROM the data in param_base TO the provided param info Migration is always one version step. Method has to be implemented in subclasses, if no match is found, base method has to be called.
If there is an element in the param_base which equals the target, a copy of the element is returned. This represents the case when nothing has changed and therefore, the migrate method is not overloaded in a subclass
param_base | set of TParameter instances to use for migration |
target | parameter info for the resulting TParameter |
在文件 SGObject.cpp 第 878 行定义.
|
protectedvirtualinherited |
This method prepares everything for a one-to-one parameter migration. One to one here means that only ONE element of the parameter base is needed for the migration (the one with the same name as the target). Data is allocated for the target (in the type as provided in the target SGParamInfo), and a corresponding new TParameter instance is written to replacement. The to_migrate pointer points to the single needed TParameter instance needed for migration. If a name change happened, the old name may be specified by old_name. In addition, the m_delete_data flag of to_migrate is set to true. So if you want to migrate data, the only thing to do after this call is converting the data in the m_parameter fields. If unsure how to use - have a look into an example for this. (base_migration_type_conversion.cpp for example)
param_base | set of TParameter instances to use for migration |
target | parameter info for the resulting TParameter |
replacement | (used as output) here the TParameter instance which is returned by migration is created into |
to_migrate | the only source that is used for migration |
old_name | with this parameter, a name change may be specified |
在文件 SGObject.cpp 第 818 行定义.
|
inherited |
prints all parameter registered for model selection and their type
在文件 SGObject.cpp 第 1036 行定义.
|
virtualinherited |
|
virtualinherited |
Save this object to file.
file | where to save the object; will be closed during returning if PREFIX is an empty string. |
prefix | prefix for members |
param_version | (optional) a parameter version different to (this is mainly for testing, better do not use) |
在文件 SGObject.cpp 第 246 行定义.
|
protectedvirtualinherited |
Can (optionally) be overridden to post-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::SAVE_SERIALIZABLE_POST is called.
ShogunException | Will be thrown if an error occurres. |
被 CKernel 重载.
在文件 SGObject.cpp 第 999 行定义.
|
protectedvirtualinherited |
Can (optionally) be overridden to pre-initialize some member variables which are not PARAMETER::ADD'ed. Make sure that at first the overridden method BASE_CLASS::SAVE_SERIALIZABLE_PRE is called.
ShogunException | Will be thrown if an error occurres. |
被 CKernel, CDynamicArray< T >, CDynamicArray< float64_t >, CDynamicArray< float32_t >, CDynamicArray< int32_t >, CDynamicArray< char >, CDynamicArray< bool > , 以及 CDynamicObjectArray 重载.
在文件 SGObject.cpp 第 994 行定义.
|
inherited |
在文件 SGObject.cpp 第 41 行定义.
|
inherited |
在文件 SGObject.cpp 第 46 行定义.
|
inherited |
在文件 SGObject.cpp 第 51 行定义.
|
inherited |
在文件 SGObject.cpp 第 56 行定义.
|
inherited |
在文件 SGObject.cpp 第 61 行定义.
|
inherited |
在文件 SGObject.cpp 第 66 行定义.
|
inherited |
在文件 SGObject.cpp 第 71 行定义.
|
inherited |
在文件 SGObject.cpp 第 76 行定义.
|
inherited |
在文件 SGObject.cpp 第 81 行定义.
|
inherited |
在文件 SGObject.cpp 第 86 行定义.
|
inherited |
在文件 SGObject.cpp 第 91 行定义.
|
inherited |
在文件 SGObject.cpp 第 96 行定义.
|
inherited |
在文件 SGObject.cpp 第 101 行定义.
|
inherited |
在文件 SGObject.cpp 第 106 行定义.
|
inherited |
在文件 SGObject.cpp 第 111 行定义.
|
inherited |
set generic type to T
|
inherited |
|
inherited |
|
inherited |
|
virtualinherited |
A shallow copy. All the SGObject instance variables will be simply assigned and SG_REF-ed.
被 CGaussianKernel 重载.
在文件 SGObject.h 第 117 行定义.
|
virtual |
return whether likelihood function supports binary classification
被 CProbitLikelihood , 以及 CLogitLikelihood 重载.
在文件 LikelihoodModel.h 第 304 行定义.
|
virtual |
return whether likelihood function supports multiclass classification
在文件 LikelihoodModel.h 第 310 行定义.
|
virtual |
return whether likelihood function supports regression
被 CStudentsTLikelihood , 以及 CGaussianLikelihood 重载.
在文件 LikelihoodModel.h 第 298 行定义.
|
inherited |
unset generic type
this has to be called in classes specializing a template class
在文件 SGObject.cpp 第 235 行定义.
|
virtualinherited |
Updates the hash of current parameter combination.
在文件 SGObject.cpp 第 187 行定义.
|
inherited |
io
在文件 SGObject.h 第 473 行定义.
|
inherited |
parameters wrt which we can compute gradients
在文件 SGObject.h 第 488 行定义.
|
inherited |
Hash of parameter values
在文件 SGObject.h 第 494 行定义.
|
inherited |
model selection parameters
在文件 SGObject.h 第 485 行定义.
|
inherited |
map for different parameter versions
在文件 SGObject.h 第 491 行定义.
|
inherited |
parameters
在文件 SGObject.h 第 482 行定义.
|
inherited |
parallel
在文件 SGObject.h 第 476 行定义.
|
inherited |
version
在文件 SGObject.h 第 479 行定义.