getFeaturesForPyClassification: Extracts selected columns from a data frame as a Python array

Description Usage Arguments Details See Also Examples

View source: R/r-helper-utilites-python.R

Description

Extracts selected columns from a data frame as a Python array

Usage

1
getFeaturesForPyClassification(dataset, featureNames)

Arguments

dataset

an R data frame

featureNames

Column names to be extracted from the R data frames. A character vector.

Details

Helper function, which when provided an R data frame and a set of column/ feature names, extracts them from the R data frame as a matrix and converts them to the equivalent Python array.

Typically this function can be used when providing a feature matrix to a Python machine learning function

See Also

Other R helper utilities for Python: getTargetForPyClassification, setPythonEnvir

Examples

1
2
3
4
5
## Not run: 
 getFeaturesForPyClassification(dataset = iris,
 featureNames = c("Sepal.Length", "Sepal.Width"))

## End(Not run)

analysisPipelines documentation built on July 1, 2020, 7:09 p.m.