Skip to content

Commit

Permalink
Tag-register all raw matrices
Browse files Browse the repository at this point in the history
  • Loading branch information
guruhegde committed Jan 25, 2018
1 parent fad3dfe commit aece52a
Show file tree
Hide file tree
Showing 5 changed files with 19 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/shogun/distributions/LinearHMM.cpp
Expand Up @@ -311,6 +311,12 @@ void CLinearHMM::init()

m_parameters->add_matrix(&transition_probs, &num_symbols, &sequence_length,
"transition_probs", "Transition probabilities.");
watch_param(
"transition_probs", &transition_probs, &num_symbols, &sequence_length);

m_parameters->add_matrix(&log_transition_probs, &num_symbols, &sequence_length,
"log_transition_probs", "Transition probabilities (logspace).");
watch_param(
"log_transition_probs", &log_transition_probs, &num_symbols,
&sequence_length);
}
Expand Up @@ -1934,6 +1934,8 @@ void CWeightedDegreePositionStringKernel::init()

m_parameters->add_matrix(&weights, &weights_degree, &weights_length,
"weights", "WD Kernel weights.");
watch_param("weights", &weights, &weights_degree, &weights_length);

m_parameters->add_vector(&position_weights, &position_weights_len,
"position_weights",
"Weights per position.");
Expand Down
2 changes: 2 additions & 0 deletions src/shogun/kernel/string/WeightedDegreeStringKernel.cpp
Expand Up @@ -1010,6 +1010,8 @@ void CWeightedDegreeStringKernel::init()

m_parameters->add_matrix(&weights, &weights_degree, &weights_length,
"weights", "WD Kernel weights.");
watch_param("weights", &weights, &weights_degree, &weights_length);

m_parameters->add_vector(&position_weights, &position_weights_len,
"position_weights",
"Weights per position.");
Expand Down
2 changes: 2 additions & 0 deletions src/shogun/multiclass/GMNPSVM.cpp
Expand Up @@ -42,6 +42,8 @@ CGMNPSVM::init()
&m_basealphas_y, &m_basealphas_x,
"m_basealphas",
"Is the basic untransformed alpha.");
watch_param(
"m_basealphas", &m_basealphas, &m_basealphas_y, &m_basealphas_x);

m_basealphas = NULL, m_basealphas_y = 0, m_basealphas_x = 0;
}
Expand Down
7 changes: 7 additions & 0 deletions src/shogun/preprocessor/RandomFourierGaussPreproc.cpp
Expand Up @@ -89,6 +89,9 @@ CRandomFourierGaussPreproc::CRandomFourierGaussPreproc() :

m_parameters->add_vector(&randomcoeff_additive,&cur_dim_feature_space,"randomcoeff_additive");
m_parameters->add_matrix(&randomcoeff_multiplicative,&cur_dim_feature_space,&cur_dim_input_space,"randomcoeff_multiplicative");
watch_param(
"randomcoeff_multiplicative", &randomcoeff_multiplicative,
&cur_dim_feature_space, &cur_dim_input_space);
}

}
Expand Down Expand Up @@ -117,7 +120,11 @@ CRandomFourierGaussPreproc::CRandomFourierGaussPreproc(
SG_ADD(&cur_kernelwidth, "cur_kernelwidth", "Kernel width.", MS_AVAILABLE);

m_parameters->add_vector(&randomcoeff_additive,&cur_dim_feature_space,"randomcoeff_additive");

m_parameters->add_matrix(&randomcoeff_multiplicative,&cur_dim_feature_space,&cur_dim_input_space,"randomcoeff_multiplicative");
watch_param(
"randomcoeff_multiplicative", &randomcoeff_multiplicative,
&cur_dim_feature_space, &cur_dim_input_space);
}

copy(feats);
Expand Down

0 comments on commit aece52a

Please sign in to comment.