Ejemplo n.º 1
0
aic = compute_model_selection_criteria(result_list=res_list,
                                       objective=obj,
                                       ms_criteria='AIC')

# AICc not possible

# compute bic along penalization strength
bic = compute_model_selection_criteria(result_list=res_list,
                                       objective=obj,
                                       ms_criteria='BIC',
                                       n_data=21)

# compute converted points
conv_points = compute_converged_points(result_list=res_list)

file_name_ms = str(n_lambda) + ',' + str(n_starts)

save_modelSelection(reg_path=reg_path,
                    lambda_range=lambda_range,
                    n_lambda=n_lambda,
                    n_sigma=0,
                    par_names=model.getParameterIds()[:22],
                    conv_points=conv_points,
                    n_starts=n_starts,
                    aic=aic,
                    aicc=None,
                    bic=bic,
                    options=options,
                    path=path_ms,
                    file_name=file_name_ms)
# compute bic along penalization strength
aicc = compute_model_selection_criteria(result_list=res_list,
                                        objective=obj,
                                        ms_criteria='AICC',
                                        n_data=6)

# compute bic along penalization strength
bic = compute_model_selection_criteria(result_list=res_list,
                                       objective=obj,
                                       ms_criteria='BIC',
                                       n_data=6)

# compute converted points
conv_points = compute_converged_points(result_list=res_list)

file_name_ms = str(n_lambda) + ',' + str(n_starts)

save_modelSelection(reg_path=reg_path,
                    lambda_range=lambda_range,
                    n_lambda=n_lambda,
                    n_sigma=1,
                    par_names=['$\\xi_1$', '$\\xi_2$', '$\\xi_3$', '$\sigma$'],
                    conv_points=conv_points,
                    n_starts=n_starts,
                    aic=aic,
                    aicc=aicc,
                    bic=bic,
                    options=options,
                    path=path_ms,
                    file_name=file_name_ms)