Rows: 200 Columns: 9
── Column specification ────────────────────────────────────────────────────────
Delimiter: "\t"
dbl (9): pid, X1, X2, X1Squared, X2Squared, X1X2, sinX1, sinX2, label
ℹ Use `spec()` to retrieve the full column specification for this data.
ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
input <- input |>clean_names() |>mutate(label =if_else(label ==-1, 0, 1) ) |># or use 0L, !Lmutate(label =as.integer(label)) |>tibble()head(input)
train |>ggplot(aes(x = x1, y = x2, color =factor(label))) +geom_point()
test |>ggplot(aes(x = x1, y = x2, color =factor(label))) +geom_point()
Using keras and tensorflow
Note that the functions in the keras package are expecting the data to be in a matrix object and not a tibble. So as.matrix is added at the end of each line.