February 2018
Beginner to intermediate
258 pages
5h 47m
English
Once we put the text in matrix form, we can continue the training of the autoencoder, as in the previous sections.
Note that our autoencoder will have only non-responsive emails on the training part. This turns out to be quite helpful in this dataset, which has only a few hundred samples.
Once this is done, we create our training and testing sets, splitting in X and y components as before:
X_train <- subset(train,select=-responsive)y_train <- train$responsiveX_test <- subset(test,select=-responsive)y_test <- test$responsive
Now, we are ready to define our autoencoder. We will use only an inner layer with size 32:
library(keras)input_dim <- ncol(X_train)inner_layer_dim <- 32input_layer <- layer_input(shape=c(input_dim)) ...
Read now
Unlock full access