February 2020
Intermediate to advanced
328 pages
8h 19m
English
In this recipe, we'll demonstrate how to build and fit a deep learning model using the Estimator API. To use the Estimator API in R, we need to install the tfestimators package.
First, let's install the library and then import it into our environment:
install.packages("tfestimators")library(tfestimators)
Next, we need to simulate some dummy data for this exercise:
x_data_df <- as.data.frame( matrix(rnorm(1000*784), nrow = 1000, ncol = 784))y_data_df <- as.data.frame(matrix(rnorm(1000), nrow = 1000, ncol = 1))
Let's rename the response variable to target:
colnames(y_data_df)<- c("target")
Now, let's bind the x and y data together to prepare the training data:
dummy_data_estimator <- cbind(x_data_df,y_data_df)
By doing this, we ...
Read now
Unlock full access