https://github.com/berndbischl/mlr
Tip revision: 3d7e0aa91936e82cf108aff3c46b19e3f953eefd authored by pat-s on 10 January 2020, 22:23:02 UTC
Bump version to 2.17.0.9000
Bump version to 2.17.0.9000
Tip revision: 3d7e0aa
UnsupervisedTask.R
makeUnsupervisedTask = function(type, data, weights, blocking, fixup.data, check.data, coordinates) {
task = makeTask(type, data, weights, blocking, fixup.data = fixup.data, check.data = check.data,
coordinates = coordinates)
if (check.data) {
# we can't use getTaskData to access the tasks's data here because we then
# want to access the description object which is not existing yet
checkTaskData(task$env$data)
}
addClasses(task, "UnsupervisedTask")
}
#' @export
print.UnsupervisedTask = function(x, print.weights = TRUE, ...) {
td = x$task.desc
catf("Unsupervised task: %s", td$id)
catf("Type: %s", td$type)
catf("Observations: %i", td$size)
catf("Features:")
catf(printToChar(td$n.feat, collapse = "\n"))
catf("Missings: %s", td$has.missings)
if (print.weights) {
catf("Has weights: %s", td$has.weights)
}
catf("Has blocking: %s", td$has.blocking)
catf("Has coordinates: %s", td$has.coordinates)
}