def _score_with_model(self, db_conn, y, y_bin, probs, n_models, model_idx):
        """compute ensemble score with specified model added"""

        curs = db_conn.cursor()
        select_stmt = """select probs
                         from model_scores
                         where model_idx = %d"""

        curs.execute(select_stmt % model_idx)
        row = curs.fetchone()

        n_models = float(n_models)
        new_probs = loads(str(row[0]))
        new_probs = (probs*n_models + new_probs)/(n_models + 1.0)

        score = self._metric(y, y_bin, new_probs)
        return score, new_probs
dataset/ETHPy150Open dclambert/pyensemble/ensemble.py/EnsembleSelectionClassifier._score_with_model/original