R/RcppExports.R

Defines functions softmaxlogL milr_cpp getSoftmaxBag getMilrProb getLogLikMilr logit

Documented in logit

# Generated by using Rcpp::compileAttributes() -> do not edit by hand
# Generator token: 10BE3573-1514-4C36-9D1C-5A225CD40393

#' logit link function
#'
#' calculate the values of logit link
#' 
#' @param X A matrix, the design matrix.
#' @param beta A vector, the coefficients.
#' @return An vector of the values of logit link.
logit <- function(X, beta) {
    .Call('milr_logit', PACKAGE = 'milr', X, beta)
}

getLogLikMilr <- function(beta, y, X, bag) {
    .Call('milr_getLogLikMilr', PACKAGE = 'milr', beta, y, X, bag)
}

getMilrProb <- function(beta, X, bag) {
    .Call('milr_getMilrProb', PACKAGE = 'milr', beta, X, bag)
}

#' Get bag response function via softmax approach
#'
#' Get the class of bags via softmax approach.
#' 
#' @param X A matrix, the design matrix.
#' @param beta A vector, the coefficients.
#' @param bag A vector, the id of bags.
#' @return A vector. The classes of bags.
#' @noRd
getSoftmaxBag <- function(X, beta, bag, alpha) {
    .Call('milr_getSoftmaxBag', PACKAGE = 'milr', X, beta, bag, alpha)
}

milr_cpp <- function(Z, X, bag, init_beta, lambda, alpha, maxit) {
    .Call('milr_milr_cpp', PACKAGE = 'milr', Z, X, bag, init_beta, lambda, alpha, maxit)
}

softmaxlogL <- function(bag, X, Z, beta, alpha) {
    .Call('milr_softmaxlogL', PACKAGE = 'milr', bag, X, Z, beta, alpha)
}

Try the milr package in your browser

Any scripts or data that you put into this service are public.

milr documentation built on May 2, 2019, 6:35 a.m.