/usr/include/shogun/transfer/multitask/MultitaskClusteredLogisticRegression.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 115 | /*
* 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 MULTITASKCLUSTEREDLOGISTICREGRESSION_H_
#define MULTITASKCLUSTEREDLOGISTICREGRESSION_H_
#include <shogun/transfer/multitask/MultitaskLogisticRegression.h>
namespace shogun
{
/** @brief class MultitaskClusteredLogisticRegression, a classifier for multitask problems.
* Supports only task group relations. Based on solver ported from the MALSAR library.
* Assumes task in group are related with a clustered structure.
*
* @see CTaskGroup
*/
class CMultitaskClusteredLogisticRegression : public CMultitaskLogisticRegression
{
public:
MACHINE_PROBLEM_TYPE(PT_BINARY)
/** default constructor */
CMultitaskClusteredLogisticRegression();
/** constructor
*
* @param rho1 rho1 regularization coefficient
* @param rho2 rho2 regularization coefficient
* @param training_data training features
* @param training_labels training labels
* @param task_group task group
* @param num_clusters number of task clusters
*/
CMultitaskClusteredLogisticRegression(
float64_t rho1, float64_t rho2, CDotFeatures* training_data,
CBinaryLabels* training_labels, CTaskGroup* task_group,
int32_t num_clusters);
/** destructor */
virtual ~CMultitaskClusteredLogisticRegression();
/** get rho1 regularization coefficient
*
* @return rho1 value
*/
int32_t get_rho1() const;
/** set rho1
* @param rho1 value
*/
void set_rho1(float64_t rho1);
/** get rho1
*/
int32_t get_rho2() const;
/** set rho1
* @param rho2 value
*/
void set_rho2(float64_t rho2);
/** get number of clusters
*
* @return number of clusters
*/
int32_t get_num_clusters() const;
/** set number of clusters
* @param num_clusters number of clusters
*/
void set_num_clusters(int32_t num_clusters);
/** get name
*
* @return name of the object
*/
virtual const char* get_name() const
{
return "MultitaskClusteredLogisticRegression";
}
protected:
/** train machine
*
* @param data features to use for training
*/
virtual bool train_machine(CFeatures* data=NULL);
/** train locked implementation
*
* @param tasks array of tasks indices
*/
virtual bool train_locked_implementation(SGVector<index_t>* tasks);
protected:
/** rho1 */
float64_t m_rho1;
/** rho2 */
float64_t m_rho2;
/** number of clusters */
int32_t m_num_clusters;
};
}
#endif
|