/usr/include/shogun/labels/MulticlassMultipleOutputLabels.h is in libshogun-dev 3.2.0-7.3build4.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 | /*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 3 of the License, or
* (at your option) any later version.
*
* Copyright (C) 2012 Sergey Lisitsyn
*/
#ifndef MULTICLASSMULTIPLEOUTPUTLABELS_H_
#define MULTICLASSMULTIPLEOUTPUTLABELS_H_
#include <shogun/labels/Labels.h>
#include <shogun/labels/LabelTypes.h>
#include <shogun/lib/DynamicObjectArray.h>
namespace shogun
{
/** @brief Multiclass Labels for multi-class classification
* with multiple labels
*
* valid values for labels are 0...nr_classes-1
*
* Each label in this setting is vector of a few labels
*/
class CMulticlassMultipleOutputLabels : public CLabels
{
public:
/** default constructor */
CMulticlassMultipleOutputLabels();
/** constructor
*
* @param num_labels number of labels
*/
CMulticlassMultipleOutputLabels(int32_t num_labels);
/** destructor */
virtual ~CMulticlassMultipleOutputLabels();
/** check if labeling is valid
*
* possible with subset
*
* @return if labeling is valid
*/
virtual void ensure_valid(const char* context = NULL);
/** get labels
*
* not possible with subset
*
* @return labels
*/
SGMatrix<index_t> get_labels() const;
/** get label object for specified index
*
* @param idx index of the label
*
* @return label object
*/
SGVector<index_t> get_label(int32_t idx);
/**
* set label, possible with subset. This method should be used
* when substituting labels previously inserted. To insert new
* labels, use the method add_label.
*
* @param idx index of label to set
* @param label value of label
*
* @return if setting was successful
*/
bool set_label(int32_t idx, SGVector<index_t> label);
/** get number of labels, depending on wheter a subset is set
*
* @return number of labels
*/
virtual int32_t get_num_labels() const;
/** @return object name */
virtual const char* get_name() const { return "MulticlassMultipleOutputLabels"; }
/** get label type
*
* @return label type LT_STRUCTURED
*/
virtual ELabelType get_label_type() const { return LT_MULTICLASS_MULTIPLE_OUTPUT; }
private:
/** internal initialization */
void init();
protected:
/** vector of labels */
SGVector<index_t>* m_labels;
/** number of labels */
int32_t m_n_labels;
};
}
#endif
|