Skip to content

About the OCC and Mismatch #9

@leslieyoungwei

Description

@leslieyoungwei

Hi, I'm having some questions about Πk and Nk/N in the formula in picture

What's the difference between these two (pi and actprop)

occ <- function(p, pi) {
    app <- appa(p)
    numerator <- app/(1 - app)
    denominator <- pi/(1 - pi)
    occ <- numerator/denominator
    return(occ)
}
mismatch <- function(p, pi) {
    # determine class
    group <- class_assignment(p)
    K <- ncol(p)
    
    # Tabulate the actual proportions
    actprop <- tabulate(group, nbins = K)/nrow(p)
    
    # Compute the mismatch (mismatch=actual-estimated)
    return(actprop - pi)
}
@param pi is the estimated proportion of class membership of length K

Image

Thank you for your answer

Best wishes!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions