CategoricalDataRaw: Data class for categorical variables

CategoricalDataRawR Documentation

Data class for categorical variables

Description

CategoricalDataRaw creates an data object which can be used as source object to instantiate categorical base learner.

Arguments

x

(character())
Categorical vector.

data_identifier

(character(1))
Data id, e.g. a feature name.

Format

S4 object.

Usage

CategoricalDataRaw$new(x, data_identifier)

Fields

This class doesn't contain public fields.

Methods

  • ⁠$getData()⁠: ⁠() -> stop()⁠
    Throws error because no representation is calculated.

  • ⁠$getRawData()⁠: ⁠() -> character()⁠

  • ⁠$getIdentifier()⁠: ⁠() -> character(1)⁠

Inherited methods from Data

  • ⁠$getDataType()⁠: ⁠() -> character(1)⁠

Examples

# Sample data:
x = sample(c("one","two", "three"), 20, TRUE)

# Create new data object:
data_obj = CategoricalDataRaw$new(x, "cat_raw")

# Get data and identifier:
data_obj$getRawData()
data_obj$getIdentifier()


schalkdaniel/compboost documentation built on April 15, 2023, 9:03 p.m.