moved accessor definitions for LARS from lars.cpp to lars.hpp
This commit is contained in:
@@ -45,7 +45,6 @@ void LARS::SetGram(const mat& matGram) {
|
||||
this->matGram = matGram;
|
||||
}
|
||||
|
||||
|
||||
void LARS::ComputeGram(const mat& matX)
|
||||
{
|
||||
if (elasticNet)
|
||||
@@ -58,26 +57,6 @@ void LARS::ComputeGram(const mat& matX)
|
||||
}
|
||||
}
|
||||
|
||||
const std::vector<u32> LARS::ActiveSet()
|
||||
{
|
||||
return activeSet;
|
||||
}
|
||||
|
||||
const std::vector<vec> LARS::BetaPath()
|
||||
{
|
||||
return betaPath;
|
||||
}
|
||||
|
||||
const std::vector<double> LARS::LambdaPath()
|
||||
{
|
||||
return lambdaPath;
|
||||
}
|
||||
|
||||
const mat LARS::MatUtriCholFactor()
|
||||
{
|
||||
return matUtriCholFactor;
|
||||
}
|
||||
|
||||
void LARS::DoLARS(const mat& matX, const vec& y)
|
||||
{
|
||||
// compute Xty
|
||||
|
||||
@@ -122,22 +122,34 @@ class LARS {
|
||||
/*
|
||||
* Accessor for activeSet
|
||||
*/
|
||||
const std::vector<arma::u32> ActiveSet();
|
||||
const std::vector<arma::u32> ActiveSet()
|
||||
{
|
||||
return activeSet;
|
||||
}
|
||||
|
||||
/*
|
||||
* Accessor for betaPath
|
||||
*/
|
||||
const std::vector<arma::vec> BetaPath();
|
||||
|
||||
const std::vector<arma::vec> BetaPath()
|
||||
{
|
||||
return betaPath;
|
||||
}
|
||||
|
||||
/*
|
||||
* Accessor for lambdaPath
|
||||
*/
|
||||
const std::vector<double> LambdaPath();
|
||||
const std::vector<double> LambdaPath()
|
||||
{
|
||||
return lambdaPath;
|
||||
}
|
||||
|
||||
/*
|
||||
* Accessor for matUtriCholFactor
|
||||
*/
|
||||
const arma::mat MatUtriCholFactor();
|
||||
const arma::mat MatUtriCholFactor()
|
||||
{
|
||||
return matUtriCholFactor;
|
||||
}
|
||||
|
||||
/* Run LARS
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user