当前位置: 首页>>代码示例>>C++>>正文


C++ CDotFeatures::get_computed_dot_feature_matrix方法代码示例

本文整理汇总了C++中CDotFeatures::get_computed_dot_feature_matrix方法的典型用法代码示例。如果您正苦于以下问题:C++ CDotFeatures::get_computed_dot_feature_matrix方法的具体用法?C++ CDotFeatures::get_computed_dot_feature_matrix怎么用?C++ CDotFeatures::get_computed_dot_feature_matrix使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在CDotFeatures的用法示例。


在下文中一共展示了CDotFeatures::get_computed_dot_feature_matrix方法的2个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: update_all

void CExactInferenceMethod::update_all()
{
	if (m_labels)
		m_label_vector =
				((CRegressionLabels*) m_labels)->get_labels().clone();

	if (m_features && m_features->has_property(FP_DOT) && m_features->get_num_vectors())
		m_feature_matrix =
				((CDotFeatures*)m_features)->get_computed_dot_feature_matrix();

	else if (m_features && m_features->get_feature_class() == C_COMBINED)
	{
		CDotFeatures* feat =
				(CDotFeatures*)((CCombinedFeatures*)m_features)->
				get_first_feature_obj();

		if (feat->get_num_vectors())
			m_feature_matrix = feat->get_computed_dot_feature_matrix();

		SG_UNREF(feat);
	}

	update_data_means();

	if (m_kernel)
		update_train_kernel();

	if (m_ktrtr.num_cols*m_ktrtr.num_rows)
	{
		update_chol();
		update_alpha();
	}
}
开发者ID:AlexBinder,项目名称:shogun,代码行数:33,代码来源:ExactInferenceMethod.cpp

示例2: set_latent_features

void CInferenceMethod::set_latent_features(CFeatures* feat)
{
	SG_REF(feat);
	SG_UNREF(m_latent_features);
	m_latent_features=feat;

	if (m_latent_features && m_latent_features->has_property(FP_DOT) && m_latent_features->get_num_vectors())
		m_latent_matrix =
				((CDotFeatures*)m_latent_features)->get_computed_dot_feature_matrix();

	else if (m_latent_features && m_latent_features->get_feature_class() == C_COMBINED)
	{
		CDotFeatures* subfeat =
				(CDotFeatures*)((CCombinedFeatures*)m_latent_features)->
				get_first_feature_obj();

		if (m_latent_features->get_num_vectors())
			m_latent_matrix = subfeat->get_computed_dot_feature_matrix();

		SG_UNREF(subfeat);
	}

	update_data_means();
	update_train_kernel();
	update_chol();
	update_alpha();
}
开发者ID:coodoing,项目名称:shogun,代码行数:27,代码来源:InferenceMethod.cpp


注:本文中的CDotFeatures::get_computed_dot_feature_matrix方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。