Make predictions from a fitted MONMLP model or ensemble of MONMLP models.

1 |

`x` |
covariate matrix with number of rows equal to the number of samples and number of columns equal to the number of covariates. |

`weights` |
list containing MONMLP weight matrices and other parameters from |

a matrix with number of rows equal to the number of samples and number of columns equal to the number of predictand variables. If `weights`

is from an ensemble of models, the matrix is the ensemble mean and the attribute `ensemble`

contains a list with predictions for each ensemble member.

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 | ```
set.seed(123)
x <- as.matrix(seq(-10, 10, length = 100))
y <- logistic(x) + rnorm(100, sd = 0.2)
dev.new()
plot(x, y)
lines(x, logistic(x), lwd = 10, col = "gray")
## Ensemble of MONMLP models w/ 3 hidden nodes
w.mon <- monmlp.fit(x = x, y = y, hidden1 = 3, monotone = 1,
n.ensemble = 15, bag = TRUE, iter.max = 500,
control = list(trace = 0))
p.mon <- monmlp.predict(x = x, weights = w.mon)
## Plot predictions from ensemble members
matlines(x = x, y = do.call(cbind, attr(p.mon, "ensemble")),
col = "cyan", lty = 2)
## Plot ensemble mean
lines(x, p.mon, col = "blue", lwd = 3)
``` |

Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.