Navigation Menu

Skip to content

Commit

Permalink
A few doc warning fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Aug 11, 2012
1 parent 346f445 commit bb9493f
Show file tree
Hide file tree
Showing 5 changed files with 65 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/shogun/distance/Distance.h
Expand Up @@ -359,14 +359,14 @@ class CDistance : public CSGObject
*/
bool precompute_matrix;

/// feature vectors to occur on left hand side
/// feature vectors to occur on the left hand side
CFeatures* lhs;
/// feature vectors to occur on right hand side
/// feature vectors to occur on the right hand side
CFeatures* rhs;

/* number of feature vectors on left hand side */
/** number of feature vectors on the left hand side */
int32_t num_lhs;
/* number of feature vectors on right hand side */
/** number of feature vectors on the right hand side */
int32_t num_rhs;

};
Expand Down
4 changes: 3 additions & 1 deletion src/shogun/evaluation/GradientCriterion.h
Expand Up @@ -26,8 +26,10 @@ class CGradientCriterion: public CEvaluation
*/
public:

/** constructor */
CGradientCriterion();

/** destructor */
virtual ~CGradientCriterion();

/** evaluate labels (Not really used in this class).
Expand All @@ -44,7 +46,7 @@ class CGradientCriterion: public CEvaluation
{ return m_direction; }

/** Set the evaluation direction
* @param evaluation direction to be set.
* @param dir direction to be set.
*/
virtual void set_evaluation_direction(EEvaluationDirection dir)
{
Expand Down
1 change: 0 additions & 1 deletion src/shogun/evaluation/GradientEvaluation.h
Expand Up @@ -35,7 +35,6 @@ class CGradientEvaluation: public CMachineEvaluation
* @param machine learning machine to use
* @param features features to use for cross-validation
* @param labels labels that correspond to the features
* @param splitting_strategy splitting strategy to use
* @param evaluation_criterion evaluation criterion to use
* @param autolock whether machine should be auto-locked before evaluation
*/
Expand Down
31 changes: 31 additions & 0 deletions src/shogun/labels/LatentLabels.h
Expand Up @@ -16,31 +16,61 @@

namespace shogun
{
/** @brief class LatentData used to store information about latent
* variables.
* TODO
*/
class CLatentData : public CSGObject
{
public:
/** constructor */
CLatentData();

/** destructor */
virtual ~CLatentData();

/** get name */
virtual const char* get_name() const { return "LatentData"; }
};

/** @brief class LatentLabels used to store latent labels
* TODO
*/
class CLatentLabels : public CBinaryLabels
{
public:
/** constructor */
CLatentLabels();

/** constructor
*
* @param num_labels number of labels
*/
CLatentLabels(int32_t num_labels);

/** destructor */
virtual ~CLatentLabels();

/** get labels */
CDynamicObjectArray* get_labels() const;

/** get latent label
*
* @param idx index of label
*/
CLatentData* get_latent_label(int32_t idx);

/** add latent label
*
* @param label label to add
*/
void add_latent_label(CLatentData* label);

/** set latend label
*
* @param idx index of latent label
* @param label value of latent label
*/
bool set_latent_label(int32_t idx, CLatentData* label);

/** Make sure the label is valid, otherwise raise SG_ERROR.
Expand All @@ -63,6 +93,7 @@ namespace shogun
*/
static CLatentLabels* obtain_from_generic(CLabels* base_labels);

/** get name */
virtual const char* get_name() const { return "LatentLabels"; }

protected:
Expand Down
27 changes: 27 additions & 0 deletions src/shogun/latent/LatentModel.h
Expand Up @@ -19,14 +19,23 @@ namespace shogun
class CLatentModel: public CSGObject
{
public:
/** constructor */
CLatentModel();

/** constructor
*
* @param feats features to use
* @param labels labels to use
*/
CLatentModel(CLatentFeatures* feats, CLatentLabels* labels);

/** destructor */
virtual ~CLatentModel();

/** get number of vectors */
virtual int32_t get_num_vectors() const;

/** get dimensionality of model */
virtual int32_t get_dim() const=0;

/** set labels
Expand All @@ -47,16 +56,34 @@ namespace shogun
*/
void set_features(CLatentFeatures* feats);

/** get psi feature vector
*
* @param idx index of feature vector
* @return psi feature vector
*/
virtual SGVector<float64_t> get_psi_feature_vector(index_t idx)=0;

/** infer latent variable
*
* @param w weight vector
* @param idx index of feature vector
* @return latent variable data
*/
virtual CLatentData* infer_latent_variable(const SGVector<float64_t>& w, index_t idx)=0;

/** argmax
*
* @param w weight vector
*/
virtual void argmax_h(const SGVector<float64_t>& w);

/** get name */
virtual const char* get_name() const { return "LatentModel"; }

protected:
/** features */
CLatentFeatures* m_features;
/** labels */
CLatentLabels* m_labels;

private:
Expand Down

0 comments on commit bb9493f

Please sign in to comment.