generateFormula: Generate formula

View source: R/SOptim_ClassificationFunctions.R

generateFormulaR Documentation

Generate formula

Description

Generates a formula object to use in classification algorithms.

Usage

generateFormula(x)

Arguments

x

A calibration dataset with the first two columns containing the segment ID (SID) and train/test inputs (named as train). The remaining columns will be used as classification features.

Value

A formula object with a similar structure to: train ~ feature_1 + ... + feature_n.

Note

By default removes the first 2 columns corresponding to the segment identifier (SID) and and the train columns.

Examples


DF <- data.frame(SID=1:10, train = 1:10, x1 = rnorm(10), x2 = rnorm(10), x3 = rnorm(10))
generateFormula(DF)


joaofgoncalves/SegOptim documentation built on Feb. 5, 2024, 11:10 p.m.