/usr/include/shogun/classifier/GaussianProcessBinaryClassification.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 106 107 108 109 110 111 112 113 114 | /*
* 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.
*
* Written (W) 2013 Roman Votyakov
*/
#ifndef _GAUSSIANPROCESSBINARYCLASSIFICATION_H_
#define _GAUSSIANPROCESSBINARYCLASSIFICATION_H_
#include <shogun/lib/config.h>
#ifdef HAVE_EIGEN3
#include <shogun/machine/GaussianProcessMachine.h>
namespace shogun
{
/** @brief Class GaussianProcessBinaryClassification implements binary
* classification based on Gaussian Processes.
*/
class CGaussianProcessBinaryClassification : public CGaussianProcessMachine
{
public:
/** problem type */
MACHINE_PROBLEM_TYPE(PT_BINARY);
/** default constructor */
CGaussianProcessBinaryClassification();
/** constructor
*
* @param method inference method
*/
CGaussianProcessBinaryClassification(CInferenceMethod* method);
virtual ~CGaussianProcessBinaryClassification();
/** apply machine to data in means of binary classification problem
*
* @param data (test) data to be classified
*
* @return classified labels
*/
virtual CBinaryLabels* apply_binary(CFeatures* data=NULL);
/** returns a vector of of the posterior predictive means
*
* @param data (test) data to be classified
*
* @return mean vector
*/
SGVector<float64_t> get_mean_vector(CFeatures* data);
/** returns a vector of the posterior predictive variances
*
* @param data (test) data to be classified
*
* @return variance vector
*/
SGVector<float64_t> get_variance_vector(CFeatures* data);
/** returns probabilities \f$p(y_*=1)\f$ for each (test) feature \f$x_*\f$
*
* @param data (test) data to be classified
*
* @return vector of probabilities
*/
SGVector<float64_t> get_probabilities(CFeatures* data);
/** get classifier type
*
* @return classifier type GAUSSIANPROCESSBINARY
*/
virtual EMachineType get_classifier_type()
{
return CT_GAUSSIANPROCESSBINARY;
}
/** return name of the classifier
*
* @return name GaussianProcessBinaryClassification
*/
virtual const char* get_name() const
{
return "GaussianProcessBinaryClassification";
}
protected:
/** train classifier
*
* @param data training data
*
* @return whether training was successful
*/
virtual bool train_machine(CFeatures* data=NULL);
/** check whether training labels are valid for classification
*
* @param lab training labels
*
* @return whether training labels are valid for classification
*/
virtual bool is_label_valid(CLabels *lab) const
{
return (lab->get_label_type()==LT_BINARY);
}
};
}
#endif /* HAVE_EIGEN3 */
#endif /* _GAUSSIANPROCESSCLASSIFICATION_H_ */
|