Next, we propose a simple example in which we fit PheNorm to a simulated dataset.
library(PheNorm)
Load the data
set.seed(1234) fit.dat <- read.csv("https://raw.githubusercontent.com/celehs/PheNorm/master/data-raw/data.csv")
Apply the PheNorm algorithm
fit.phenorm=PheNorm.Prob("ICD", "utl", fit.dat, nm.X = NULL, corrupt.rate=0.3, train.size=nrow(fit.dat)) head(fit.phenorm$probs) #> [1] 0.4662471 0.5384967 0.5455023 0.5419286 0.6086979 0.5320170