multiple-instance logistic regression with lasso penalty.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
R
man
src
tests
vignettes
.Rbuildignore
.gitignore
.travis.yml
DESCRIPTION
LICENSE
NAMESPACE
NEWS.md
README.Rmd
README.md
appveyor.yml
milr.Rproj

README.md

Status

 License       |  Linux/osx Build  |   Windows Build   |

-------------------|-------------------|-------------------| GitHub license | Build status | Build status |

milr

The multiple-instance logistic regression with lasso penalty.

Installation

You can install:

  • install from CRAN
install.packages("milr")
  • the latest development version from github with
install.packages("devtools")
devtools::install_github("PingYangChen/milr")

If you encounter a bug, please file a reproducible example on github.

examples

set.seed(100)
beta <- runif(5, -5, 5)
trainData <- DGP(70, 3, beta)
testData <- DGP(30, 3, beta)
# default (not use LASSO)
milr_result <- milr(trainData$Z, trainData$X, trainData$ID)
coef(milr_result)      # coefficients
fitted(milr_result)                    # fitted bag labels
fitted(milr_result, type = "instance") # fitted instance labels
summary(milr_result)   # summary milr
predict(milr_result, testData$X, testData$ID)                    # predicted bag labels
predict(milr_result, testData$X, testData$ID, type = "instance") # predicted instance labels