Skip to content

Commit

Permalink
Improved converters doc
Browse files Browse the repository at this point in the history
  • Loading branch information
lisitsyn committed Oct 13, 2011
1 parent 864758f commit 6e41476
Show file tree
Hide file tree
Showing 3 changed files with 22 additions and 10 deletions.
16 changes: 11 additions & 5 deletions src/shogun/converter/Converter.h
Expand Up @@ -5,7 +5,7 @@
* (at your option) any later version.
*
* Written (W) 2011 Sergey Lisitsyn
* Copyright (C) 2011
* Copyright (C) 2011 Sergey Lisitsyn
*/

#ifndef CONVERTER_H_
Expand All @@ -18,17 +18,23 @@
namespace shogun
{

/** @brief
*
/** @brief class Converter used to convert data
*
*/
class CConverter : public CSGObject
{
public:
/* constructor */
CConverter() : CSGObject() {};
/* destructor */
virtual ~CConverter() {};

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

/* applies to the given data, returning converted features
* (e.g. dense embedding of string features)
* @param features features to convert
* @return converted features
*/
virtual CFeatures* apply(CFeatures* features) = 0;
};
}
Expand Down
2 changes: 1 addition & 1 deletion src/shogun/converter/EmbeddingConverter.cpp
Expand Up @@ -5,7 +5,7 @@
* (at your option) any later version.
*
* Written (W) 2011 Sergey Lisitsyn
* Copyright (C) 2011
* Copyright (C) 2011 Sergey Lisitsyn
*/

#include <shogun/converter/EmbeddingConverter.h>
Expand Down
14 changes: 10 additions & 4 deletions src/shogun/converter/EmbeddingConverter.h
Expand Up @@ -5,7 +5,7 @@
* (at your option) any later version.
*
* Written (W) 2011 Sergey Lisitsyn
* Copyright (C) 2011
* Copyright (C) 2011 Sergey Lisitsyn
*/

#ifndef EMBEDDINGCONVERTER_H_
Expand All @@ -24,17 +24,23 @@ class CFeatures;
class CDistance;
class CKernel;

/** @brief */
/** @brief class EmbeddingConverter used to create embeddings of
* features, e.g. construct dense numeric embedding of string features
*/
class CEmbeddingConverter: public CConverter
{
public:

/* constructor */
/** constructor */
CEmbeddingConverter();

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

/** applies to the given data, returns embedding
* @param features features to embed
* @return embedding simple features
*/
virtual CSimpleFeatures<float64_t>* apply(CFeatures* features) = 0;

/** setter for target dimension
Expand Down

0 comments on commit 6e41476

Please sign in to comment.