L2CVProfile
This is a function for performing cross validation on a list of given (log) values. It returns: cv_likelihoods, a matrix of the cross validated log likelihoods 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 patientmodel_params = {}- model parameters, seetrainCoxMlpsearch_params = {}- model search/training parameters, seetrainCoxMlpcv_params- cross validation parameters, see below.verbose=True- print more stuff.
cv_params is a dictionary of parameters for cross validation.  It has the following parameters:
cv_seed- Random seed for splitting validation folds. Default is 1.n_folds- Number of folds to cross-validate. Default is 10.cv_metric- Performance metric for evaluating cross-validation performance. loglikelihood or cindex. Default is loglikelihood.search_iters- Number of iterations in hill climbing. Default is 3.L2_range- List of(log) L2 parameters to cross-validate. Default [-5,-4,-3,-2,-1].