L2CVProfile
This is a function for evaluating model performance on a validation dataset for a range of L2 parameters. It returns: likelihoods, a list of the score (log likelihood or C-index) for each fold; L2_reg_params, the log L2 parameters tested and mean_cvpl, the mean log likelihood for each L2 parameter tested.
Parameters:
x_train- training set matrix. Expected numpy array.ytime_train- time of death or censoring for each patientystatus_train- censoring of each patientx_train- validation set matrix. Expected numpy array.ytime_train- time of death or censoring for each patient on validation setystatus_train- censoring of each patient on validation setmodel_params = {}- model parameters, seetrainCoxMlpsearch_params = {}- model search/training parameters, seetrainCoxMlpcv_params- validation parameters, see below.verbose=True- print more stuff.
cv_params is a dictionary of parameters for validation. It has the following parameters:
cv_metric- Performance metric for evaluating validation set performance. loglikelihood or cindex. Default is loglikelihood.L2_range- List of(log) L2 parameters to cross-validate.