I want to convert some numeric values into category. I am using 'keras' package for image classification.
When I am using to_categorical(trainy), getting "Error: Python module tensorflow.python.keras was not found."
I have taken trainy <- c(0,0,0,0,0,1,1,1,1,1) and convert it into categorical values.
library(keras)
library(tensorflow)
trainy <- c(0,0,0,0,0,1,1,1,1,1)
trainLabels <- to_categorical(trainy)
The values in that vector should be converted into categorical values.