More parameters in getTaskDictionary
Closed this issue · 3 comments
TuSKan commented
Its possible to include a new parameter t on getTaskDictionary as below?
getTaskDictionary = function(task) {
assertClass(task, classes = "Task")
dict = list(
task = task,
p = getTaskNFeats(task),
n.task = getTaskSize(task),
type = getTaskType(task),
n = getTaskSize(task)
)
if (dict$type == "classif") {
dict$k = length(getTaskClassLevels(task))
dict$t = summary(getTaskTargets(task))
}
return(dict)
}
it will be useful for config the nu parameter of svm as below:
makeNumericParam(id = "nu", default = 0.2, lower = 0.01, upper = expression(2.0 * min(t) / n - 0.01))
ref: https://www.csie.ntu.edu.tw/~cjlin/papers/nusvmtutorial.pdf page 17
TuSKan commented
What do you think to add more parameters in getTaskDictionary ?
getTaskDictionary = function(task) {
assertClass(task, classes = "Task")
dict = list(
task = task,
p = getTaskNFeats(task),
n.task = getTaskSize(task),
type = getTaskType(task),
n = getTaskSize(task),
maxy = max(getTaskTargets(task)),
miny = min(getTaskTargets(task))
)
if (dict$type == "classif") {
dict$k = length(getTaskClassLevels(task))
dict$t = summary(getTaskTargets(task))
}
return(dict)
}
it will be useful for config the epsilon parameter of svm as below:
makeNumericParam(id = "epsilon", default = 0.001, lower = 0, upper = expression((maxy - miny) / 2))
ref: http://ntur.lib.ntu.edu.tw/bitstream/246246/155227/1/14.pdf
jakob-r commented
That gets very particular. You can always access the task itself as it's part of the dictionary. I have not looked into the link but I guess you could do upper = expression((max(getTaskTargets(task)) - min(getTaskTargets(task)))/2)
.