Exemplo n.º 1
0
    'lambdaG': lambdaG
}

# Load in the Sanger dataset
(_, X_min, M, _, _, _, _) = load_Sanger(standardised=standardised)

# Run the cross-validation framework
random.seed(42)
numpy.random.seed(9000)
nested_crossval = GreedySearchCrossValidation(classifier=bnmtf_vb_optimised,
                                              R=X_min,
                                              M=M,
                                              values_K=K_range,
                                              values_L=L_range,
                                              folds=no_folds,
                                              priors=priors,
                                              init_S=init_S,
                                              init_FG=init_FG,
                                              iterations=iterations,
                                              restarts=restarts,
                                              quality_metric=quality_metric,
                                              file_performance=output_file)
nested_crossval.run()
"""
All model fits for fold 1, metric AIC: [(5, 5, 267436.21583785285), (6, 5, 268266.96019512357), (5, 6, 257633.99837328543), (6, 6, 258811.15017865735), (5, 7, 267685.94226889982), (6, 7, 259475.47788105684)].
Best K,L for fold 1: (5, 6).
Performance: {'R^2': 0.8054505750429645, 'MSE': 2.260784680365453, 'Rp': 0.89749750215470236}.

All model fits for fold 2, metric AIC: [(5, 5, 257397.3462916202), (6, 5, 258208.83672100294), (5, 6, 258507.40258252042), (6, 6, 268899.95363038778)].
Best K,L for fold 2: (5, 5).
Performance: {'R^2': 0.7932515856937303, 'MSE': 2.4062208604789466, 'Rp': 0.89070894807048406}.