Train an Autoencoder using h2o::h2o.deeplearning
Check out the H2O Flow at [ip]:[port]
, Default IP:port is "localhost:54321"
e.g. if running on localhost, point your web browser to localhost:54321
d.H2OAE(x, x.test = NULL, x.valid = NULL, ip = "localhost",
port = 54321, n.hidden.nodes = c(ncol(x), 3, ncol(x)),
extract.layer = ceiling(length(n.hidden.nodes)/2), epochs = 5000,
activation = "Tanh", loss = "Automatic", input.dropout.ratio = 0,
hidden.dropout.ratios = rep(0, length(n.hidden.nodes)),
learning.rate = 0.005, learning.rate.annealing = 1e-06, l1 = 0,
l2 = 0, stopping.rounds = 50, stopping.metric = "AUTO",
scale = TRUE, center = TRUE, n.cores = rtCores, verbose = TRUE,
save.mod = FALSE, outdir = NULL, ...)
Vector / Matrix / Data Frame: Training set Predictors
Vector / Matrix / Data Frame: Testing set Predictors
Vector / Matrix / Data Frame: Validation set Predictors
String: IP address of H2O server. Default = "localhost"
Integer: Port number for server. Default = 54321
Integer vector of length equal to the number of hidden layers you wish to create
Integer: Which layer to extract. For regular autoencoder, this is the middle layer.
Default = ceiling(length(n.hidden.nodes)/2)
Integer: How many times to iterate through the dataset. Default = 5000
String: Activation function to use: "Tanh" (Default), "TanhWithDropout", "Rectifier", "RectifierWithDropout", "Maxout", "MaxoutWithDropout"
String: "Automatic" (Default), "CrossEntropy", "Quadratic", "Huber", "Absolute"
Float (0, 1): Dropout ratio for inputs
Vector, Float (0, 2): Dropout ratios for hidden layers
Float: Learning rate. Default = .005
Float: Learning rate annealing. Default = 1e-06
Float (0, 1): L1 regularization (introduces sparseness; i.e. sets many weights to 0; reduces variance, increases generalizability)
Float (0, 1): L2 regularization (prevents very large absolute weights; reduces variance, increases generalizability)
Integer: Stop if simple moving average of length stopping.rounds
of the
stopping.metric
does not improve. Set to 0 to disable. Default = 50
String: Stopping metric to use: "AUTO", "deviance", "logloss", "MSE", "RMSE", "MAE", "RMSLE", "AUC", "lift_top_group", "misclassification", "mean_per_class_error". Default = "AUTO" ("logloss" for Classification, "deviance" for Regression)
Logical: If TRUE, scale input before training autoencoder. Default = TRUE
Logical: If TRUE, center input before training autoencoder. Default = TRUE
Integer: Number of cores to use
Logical: If TRUE, print summary to screen.
Logical. If TRUE, save all output as RDS file in outdir
save.mod
is TRUE by default if an outdir
is defined. If set to TRUE, and no outdir
is defined, outdir defaults to paste0("./s.", mod.name)
Path to output directory.
If defined, will save Predicted vs. True plot, if available,
as well as full model output, if save.mod
is TRUE
Additional arguments to pass to h2p::h2o.deeplearning
rtDecom object
Other Decomposition: d.CUR
,
d.H2OGLRM
, d.ICA
,
d.ISOMAP
, d.KPCA
,
d.LLE
, d.MDS
,
d.NMF
, d.PCA
,
d.SPCA
, d.SVD
,
d.TSNE
, d.UMAP
Other Deep Learning: p.MXINCEPTION
,
s.H2ODL
, s.MXN
,
s.TFN