Skip to content

Commit

Permalink
fixed a bunch of modular warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
karlnapf committed Aug 11, 2012
1 parent 5e285ea commit 913e17b
Show file tree
Hide file tree
Showing 10 changed files with 50 additions and 44 deletions.
2 changes: 1 addition & 1 deletion src/shogun/evaluation/GradientCriterion.h
Expand Up @@ -18,7 +18,7 @@ namespace shogun
class CGradientCriterion: public CEvaluation
{

/* @brief CGradientCriterion
/** @brief CGradientCriterion
*
* Simple class which specifies the direction
* of gradient search. Does not provide any
Expand Down
10 changes: 5 additions & 5 deletions src/shogun/evaluation/GradientResult.h
Expand Up @@ -53,19 +53,19 @@ class CGradientResult: public CEvaluationResult
return GRADIENTEVALUATION_RESULT;
}

/*Function value*/
/** Function value */
SGVector<float64_t> quantity;

/*Function Gradient*/
/** Function Gradient */
CMap<TParameter*, SGVector<float64_t> > gradient;

/*Which objects do the gradient parameters belong to?*/
/** Which objects do the gradient parameters belong to? */
CMap<TParameter*, CSGObject*> parameter_dictionary;

/*Total number of variables represented by the gradient*/
/** Total number of variables represented by the gradient */
index_t total_variables;

/** Returns the function value
/** Prints the function value
* and gradient contained in the object.
*/
void print_result()
Expand Down
8 changes: 4 additions & 4 deletions src/shogun/evaluation/MachineEvaluation.h
Expand Up @@ -28,13 +28,13 @@ class CLabels;
class CSplittingStrategy;
class CEvaluation;

class CMachineEvaluation: public CSGObject
{

/* @brief Machine Evaluation is an abstract class
/** @brief Machine Evaluation is an abstract class
* that evaluates a machine according to some criterion.
*
*/
class CMachineEvaluation: public CSGObject
{


public:

Expand Down
18 changes: 9 additions & 9 deletions src/shogun/modelselection/GradientModelSelection.h
Expand Up @@ -56,26 +56,26 @@ class CGradientModelSelection: public CModelSelection
*/
inline virtual const char* get_name() const {return "GradientModelSelection";}

/* Set the maximum evaluations used in the optimization algorithm
/** Set the maximum evaluations used in the optimization algorithm
*
* @param m max evaluations
*/
void set_max_evaluations(int m) {m_max_evaluations = m;}

/* Get the maximum evaluations used in the optimization algorithm
/** Get the maximum evaluations used in the optimization algorithm
*
* @return number of maximum evaluations
*/
int get_max_evaluations() {return m_max_evaluations;}

/* Set the minimum level of gradient tolerance used in the
/** Set the minimum level of gradient tolerance used in the
* optimization algorithm
*
* @param t tolerance level
*/
void set_grad_tolerance(float64_t t) {m_grad_tolerance = t;}

/* Get the minimum level of gradient tolerance used in the
/** Get the minimum level of gradient tolerance used in the
* optimization algorithm
*
* @return tolerance level
Expand All @@ -84,7 +84,7 @@ class CGradientModelSelection: public CModelSelection

private:

/* nlopt callback function wrapper
/** nlopt callback function wrapper
*
* @param n number of parameters
*
Expand All @@ -108,21 +108,21 @@ class CGradientModelSelection: public CModelSelection

protected:

/* struct used for nlopt callback function*/
/** struct used for nlopt callback function*/
struct nlopt_package
{
shogun::CMachineEvaluation* m_machine_eval;
shogun::CParameterCombination* m_current_combination;
bool print_state;
};

/*Maximum number of evaluations used in optimization algorithm */
/** Maximum number of evaluations used in optimization algorithm */
int m_max_evaluations;

/*Gradient tolerance used in optimization algorithm */
/** Gradient tolerance used in optimization algorithm */
float64_t m_grad_tolerance;

/*Parameter combination tree*/
/** Parameter combination tree*/
CParameterCombination* m_current_combination;

};
Expand Down
8 changes: 4 additions & 4 deletions src/shogun/modelselection/ParameterCombination.h
Expand Up @@ -225,14 +225,14 @@ friend class CModelSelectionParameters;
static CDynamicObjectArray* extract_trees_with_name(
const CDynamicObjectArray* sets, const char* desired_name);

/* Gets parameter by name in current node.
/** Gets parameter by name in current node.
*
* @param name name of parameter
* @return parameter. Null if not found.
*/
TParameter* get_parameter_helper(const char* name);

/* Sets parameter by name in current node.
/** Sets parameter by name in current node.
*
* @param name name of parameter
* @param value of parameter
Expand All @@ -242,7 +242,7 @@ friend class CModelSelectionParameters;
*/
bool set_parameter_helper(const char* name, bool value, index_t index);

/* Sets parameter by name in current node.
/** Sets parameter by name in current node.
*
* @param name name of parameter
* @param value of parameter
Expand All @@ -252,7 +252,7 @@ friend class CModelSelectionParameters;
*/
bool set_parameter_helper(const char* name, int32_t value, index_t index);

/* Sets parameter by name in current node.
/** Sets parameter by name in current node.
*
* @param name name of parameter
* @param value of parameter
Expand Down
19 changes: 12 additions & 7 deletions src/shogun/regression/gp/ExactInferenceMethod.h
Expand Up @@ -45,7 +45,7 @@ class CExactInferenceMethod: public CInferenceMethod

public:

/*Default Constructor*/
/** Default Constructor */
CExactInferenceMethod();

/* Constructor
Expand All @@ -57,7 +57,7 @@ class CExactInferenceMethod: public CInferenceMethod
CExactInferenceMethod(CKernel* kernel, CFeatures* features,
CMeanFunction* mean, CLabels* labels, CLikelihoodModel* model);

/*Destructor*/
/** Destructor */
virtual ~CExactInferenceMethod();

/** get Negative Log Marginal Likelihood
Expand Down Expand Up @@ -128,7 +128,7 @@ class CExactInferenceMethod: public CInferenceMethod
return "ExactInferenceMethod";
}

/*Get the gradient
/** Get the gradient
*
* @return Map of gradient. Keys are names of parameters, values are
* values of derivative with respect to that parameter.
Expand All @@ -139,7 +139,7 @@ class CExactInferenceMethod: public CInferenceMethod
return get_marginal_likelihood_derivatives(para_dict);
}

/*Get the function value
/** Get the function value
*
* @return Vector that represents the function value
*/
Expand All @@ -151,11 +151,16 @@ class CExactInferenceMethod: public CInferenceMethod
}

protected:
/** Update Alpha and Cholesky Matrices.
*/
/** Update alpha matrix */
virtual void update_alpha();

/** Update Cholesky matrix */
virtual void update_chol();

/** Update kernel matrix */
virtual void update_train_kernel();

/** Update All matrices */
virtual void update_all();

private:
Expand All @@ -165,7 +170,7 @@ class CExactInferenceMethod: public CInferenceMethod
*/
void check_members();

/*Kernel matrix with noise*/
/** Kernel matrix with noise */
SGMatrix<float64_t> m_kern_with_noise;
};

Expand Down
24 changes: 12 additions & 12 deletions src/shogun/regression/gp/InferenceMethod.h
Expand Up @@ -215,32 +215,32 @@ class CInferenceMethod : public CDifferentiableFunction

protected:

/*Covariance Function*/
/** Covariance Function*/
CKernel* m_kernel;

/*Features to use*/
/** Features to use*/
CFeatures* m_features;

/*Feature Matrix*/
/** Feature Matrix*/
SGMatrix<float64_t> m_feature_matrix;

/*Means of Features*/
/** Means of Features*/
SGVector<float64_t> m_data_means;

/*Vector of labels*/
/** Vector of labels*/
SGVector<float64_t> m_label_vector;


/*Labels of those features*/
/** Labels of those features*/
CLabels* m_labels;

/*Mean Function*/
/** Mean Function*/
CMeanFunction* m_mean;

/*Latent Features for Approximation*/
/** Latent Features for Approximation*/
CFeatures* m_latent_features;

/*Likelihood function to use
/** Likelihood function to use
* \f[
* p(y|f)
* \f]
Expand All @@ -251,18 +251,18 @@ class CInferenceMethod : public CDifferentiableFunction
*/
CLikelihoodModel* m_model;

/* alpha matrix used in process mean calculation */
/** alpha matrix used in process mean calculation */
SGVector< float64_t > m_alpha;

/** Lower triangle Cholesky decomposition of
* feature matrix
*/
SGMatrix<float64_t> m_L;

/*Kernel Scale*/
/** Kernel Scale*/
float64_t m_scale;

/*Kernel matrix from features*/
/** Kernel matrix from features*/
SGMatrix<float64_t> m_ktrtr;

SGMatrix<float64_t> m_latent_matrix;
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/statistics/HSIC.h
Expand Up @@ -123,7 +123,7 @@ class CHSIC : public CKernelIndependenceTestStatistic
* @param alpha test level to reject null-hypothesis
* @return threshold for statistics to reject null-hypothesis
*/
virtual float64_t compute_threshold(float64_t statistic);
virtual float64_t compute_threshold(float64_t alpha);

inline virtual const char* get_name() const
{
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/statistics/LinearTimeMMD.h
Expand Up @@ -91,7 +91,7 @@ class CLinearTimeMMD: public CKernelTwoSampleTestStatistic
* @param kernel kernel for MMD
* @param p samples from distribution p, will be copied and NOT
* SG_REF'ed
* @@param q samples from distribution q, will be copied and NOT
* @param q samples from distribution q, will be copied and NOT
* SG_REF'ed
*/
CLinearTimeMMD(CKernel* kernel, CFeatures* p, CFeatures* q);
Expand Down
1 change: 1 addition & 0 deletions src/shogun/statistics/QuadraticTimeMMD.h
Expand Up @@ -18,6 +18,7 @@ namespace shogun
class CFeatures;
class CKernel;

/** Enum to select which statistic type of quadratic time MMD should be computed */
enum EQuadraticMMDType
{
BIASED, UNBIASED
Expand Down

0 comments on commit 913e17b

Please sign in to comment.