Skip to content

Commit

Permalink
remove commented codes
Browse files Browse the repository at this point in the history
  • Loading branch information
yorkerlin committed Apr 6, 2015
1 parent 7c1d31f commit 92b55e5
Showing 1 changed file with 0 additions and 48 deletions.
Expand Up @@ -91,7 +91,6 @@ TEST(SingleFITCLaplacianInferenceMethodWithLBFGS,get_cholesky)
CDenseFeatures<float64_t>* latent_features_train=new CDenseFeatures<float64_t>(lat_feat_train);
CBinaryLabels* labels_train=new CBinaryLabels(lab_train);

// choose Gaussian kernel with sigma = 2
float64_t ell=1.0;

CLinearARDKernel* kernel=new CGaussianARDFITCKernel(10, 2*ell*ell);
Expand Down Expand Up @@ -151,50 +150,6 @@ TEST(SingleFITCLaplacianInferenceMethodWithLBFGS,get_cholesky)
abs_tolorance = CMath::get_abs_tolerance(-0.006876868793106, rel_tolorance);
EXPECT_NEAR(L(2,2), -0.006876868793106, abs_tolorance);

/*
// build parameter dictionary
CMap<TParameter*, CSGObject*>* parameter_dictionary=new CMap<TParameter*, CSGObject*>();
inf->build_gradient_parameter_dictionary(parameter_dictionary);
// compute derivatives wrt parameters
CMap<TParameter*, SGVector<float64_t> >* gradient=
inf->get_negative_log_marginal_likelihood_derivatives(parameter_dictionary);
// get parameters to compute derivatives
//TParameter* width_param=kernel->m_gradient_parameters->get_parameter("width");
TParameter* scale_param=inf->m_gradient_parameters->get_parameter("scale");
TParameter* mean_param=mean->m_gradient_parameters->get_parameter("mean");
TParameter* weights_param=kernel->m_gradient_parameters->get_parameter("weights");
SGVector<float64_t> dnlz_weights_vec=gradient->get_element(weights_param);
SGMatrix<float64_t> dnlz_weights(dnlz_weights_vec.vector,t_dim, dim, false);
dnlz_weights(0,0)*=weight1;
dnlz_weights(1,1)*=weight4;
Map<MatrixXd> out(dnlz_weights.matrix, t_dim, dim);
std::cout<<"\nweights="<<out<<std::endl;
float64_t dnlZ_sf2=scale*(gradient->get_element(scale_param))[0];
std::cout<<"\nscale="<<dnlZ_sf2<<std::endl;
TParameter* noise_param=inf->m_gradient_parameters->get_parameter("inducing_noise");
float64_t dnlZ_noise=(gradient->get_element(noise_param))[0];
std::cout<<dnlZ_noise<<std::endl;
TParameter* lat_param=inf->m_gradient_parameters->get_parameter("inducing_features");
SGVector<float64_t> tmp=gradient->get_element(lat_param);
SGMatrix<float64_t> deriv_lat(tmp.vector, dim, m, false);
Map<MatrixXd> eigen_out(deriv_lat.matrix, dim, m);
std::cout<<"lat_mat=\n"<<eigen_out<<std::endl;
// clean up
SG_UNREF(gradient);
SG_UNREF(parameter_dictionary);
SG_UNREF(inf);
*/
SG_UNREF(inf);
}

Expand Down Expand Up @@ -244,7 +199,6 @@ TEST(SingleFITCLaplacianInferenceMethodWithLBFGS,get_alpha)
CDenseFeatures<float64_t>* latent_features_train=new CDenseFeatures<float64_t>(lat_feat_train);
CBinaryLabels* labels_train=new CBinaryLabels(lab_train);

// choose Gaussian kernel with sigma = 2
float64_t ell=1.0;

CLinearARDKernel* kernel=new CGaussianARDFITCKernel(10, 2*ell*ell);
Expand Down Expand Up @@ -340,7 +294,6 @@ TEST(SingleFITCLaplacianInferenceMethodWithLBFGS,get_negative_log_marginal_likel
CDenseFeatures<float64_t>* latent_features_train=new CDenseFeatures<float64_t>(lat_feat_train);
CBinaryLabels* labels_train=new CBinaryLabels(lab_train);

// choose Gaussian kernel with sigma = 2 and zero mean function
float64_t ell=1.0;
float64_t weight1=2.0;
float64_t weight2=3.0;
Expand Down Expand Up @@ -422,7 +375,6 @@ TEST(SingleFITCLaplacianInferenceMethodWithLBFGS,get_marginal_likelihood_derivat
CDenseFeatures<float64_t>* latent_features_train=new CDenseFeatures<float64_t>(lat_feat_train);
CBinaryLabels* labels_train=new CBinaryLabels(lab_train);

// choose Gaussian kernel with sigma = 2 and zero mean function
float64_t ell=1.0;
float64_t weight1=2.0;
float64_t weight2=3.0;
Expand Down

0 comments on commit 92b55e5

Please sign in to comment.