def compute_auc_roc(A_true,
                    W_xcorr=None,
                    bfgs_model=None,
                    sgd_model=None,
                    gibbs_samples=None,
                    vb_models=None,
                    svi_models=None):
    A_flat = A_true.ravel()
    aucs = {}
    fprs = {}
    tprs = {}

    if W_xcorr is not None:
        aucs['xcorr'] = roc_auc_score(A_flat,
                                      W_xcorr.ravel())
        fprs['xcorr'], tprs['xcorr'], _ = roc_curve(A_flat, W_xcorr.ravel())

    if bfgs_model is not None:
        assert isinstance(bfgs_model, DiscreteTimeStandardHawkesModel)
        W_bfgs = bfgs_model.W.copy()
        W_bfgs -= np.diag(np.diag(W_bfgs))
        aucs['bfgs'] = roc_auc_score(A_flat,
                                     W_bfgs.ravel())
        fprs['bfgs'], tprs['bfgs'], _ = roc_curve(A_flat, W_bfgs.ravel())

    if sgd_model is not None:
        assert isinstance(sgd_model, DiscreteTimeStandardHawkesModel)
        aucs['sgd'] = roc_auc_score(A_flat,
                                     sgd_model.W.ravel())

    if gibbs_samples is not None:
        # Compute ROC based on mean value of W_effective in second half of samples
        Weff_samples = np.array([s.weight_model.W_effective for s in gibbs_samples])
        N_samples    = Weff_samples.shape[0]
        offset       = N_samples // 2
        Weff_mean    = Weff_samples[offset:,:,:].mean(axis=0)

        aucs['gibbs'] = roc_auc_score(A_flat, Weff_mean.ravel())

    if vb_models is not None:
        # Compute ROC based on E[A] under variational posterior
        aucs['vb'] = roc_auc_score(A_flat,
                                   vb_models[-1].weight_model.expected_A().ravel())

    if svi_models is not None:
        # Compute ROC based on E[A] under variational posterior
        W_svi = svi_models[-1].weight_model.expected_W()
        aucs['svi'] = roc_auc_score(A_flat,
                                    W_svi.ravel())
        fprs['svi'], tprs['svi'], _ = roc_curve(A_flat, W_svi.ravel())


    return aucs, fprs, tprs
system.listMethods() => ['add', 'subtract', 'multiple']
dataset/ETHPy150Open slinderman/pyhawkes/experiments/chalearn_small_comparison.py/compute_auc_roc--crossover with--dataset/ETHPy150Open OpenCobolIDE/OpenCobolIDE/open_cobol_ide/extlibs/future/backports/xmlrpc/server.py/SimpleXMLRPCDispatcher.system_listMethods