Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Fixed FeatureBlockLogisticRegression solver and added Task and TaskTree
- Loading branch information
Showing
11 changed files
with
331 additions
and
97 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
/* | ||
* 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 | ||
*/ | ||
|
||
#include <shogun/transfer/multitask/Task.h> | ||
|
||
using namespace shogun; | ||
|
||
CTask::CTask() : CIndexBlock() | ||
{ | ||
} | ||
|
||
CTask::CTask(index_t min_index, index_t max_index, | ||
float64_t weight, const char* name) : | ||
CIndexBlock(min_index, max_index, weight, name) | ||
{ | ||
} | ||
|
||
CTask::~CTask() | ||
{ | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,47 @@ | ||
/* | ||
* 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 TASK_H_ | ||
#define TASK_H_ | ||
|
||
#include <shogun/lib/SGVector.h> | ||
#include <shogun/lib/List.h> | ||
#include <shogun/lib/IndexBlock.h> | ||
|
||
namespace shogun | ||
{ | ||
|
||
/** @brief used to represent tasks in multitask learning | ||
*/ | ||
class CTask : public CIndexBlock | ||
{ | ||
public: | ||
|
||
/** default constructor */ | ||
CTask(); | ||
|
||
/** constructor | ||
* @param min_index smallest index of the task | ||
* @param max_index largest index of the task | ||
* @param weight weight (optional) | ||
* @param name name of task (optional) | ||
*/ | ||
CTask(index_t min_index, index_t max_index, | ||
float64_t weight=1.0, const char* name="task"); | ||
|
||
/** destructor */ | ||
~CTask(); | ||
|
||
/** get name */ | ||
virtual const char* get_name() const { return "Task"; }; | ||
|
||
}; | ||
|
||
} | ||
#endif |
Oops, something went wrong.