knitr::opts_chunk$set(echo = TRUE, collapse = TRUE) library(iprobit)
This is an R
package which extends I-prior regression to unordered categorical responses via a probit link function. This allows the user to fit models for classification or inference using fitted probabilities. Estimation is performed using a variational EM algorithm. Visit http://phd.haziqj.ml for details.
dat <- gen_spiral(n = 300, seed = 123) # generate binary toy example data set mod <- iprobit(y ~ X1 + X2, dat, one.lam = TRUE, kernel = "fbm")
summary(mod)
iplot_predict(mod)
dat <- gen_mixture(n = 400, m = 4, sd = 1.5, seed = 123) # generate 4-class # toy example data set (mod <- iprobit(y ~ X1 + X2, dat, train.samp = sample(1:400, size = 392), control = list(maxit = 10))) # set aside 8 points for testing
iplot_predict(mod, dec.bound = TRUE, plot.test = TRUE, grid.len = 50)
predict(mod)
set.seed(123) mod <- iprobit(Species ~ ., iris, kernel = "fbm", one.lam = TRUE, common.RKHS.scale = TRUE, common.intercept = FALSE, control = list(alpha0 = 1, theta0 = 1, stop.crit = 1e-1)) summary(mod)
fitted(mod, quantiles = TRUE)
iplot_lb(mod)
iplot_error(mod)
iplot_fitted(mod)
Copyright (C) 2017 Haziq Jamil.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.