Learn R Programming

performanceEstimation (version 1.1.0)

is.classification: Check if a certain predictive task is a classification problem

Description

This function tests if a task defined by a formula over a data set is a classification task, which will be the case if the target variable is nominal.

Usage

is.classification(task)

Arguments

task
An object of class PredTask

Value

A logical value

References

Torgo, L. (2014) An Infra-Structure for Performance Estimation and Experimental Comparison of Predictive Models in R. arXiv:1412.0436 [cs.MS] http://arxiv.org/abs/1412.0436

See Also

is.regression

Examples

Run this code
data(iris)
tsk <- PredTask(Species ~ .,iris)
if (is.classification(tsk)) cat("This is a classification task.\n")

Run the code above in your browser using DataLab