Пример #1
0
def thresholdsToLatex(path='dfs/2017/1111_workreduced.csv'):
    df = pd.read_csv(path, index_col=0)
    results = {}
    results['WorkReducedLowerBound'] = df.loc[:, 'fnr'].iloc[-1]
    results['WorkReducedUpperBound'] = 100 - df.loc[:, 'fpr'].iloc[-1]
    results['WorkReducedHundredMinusUpperBound'] = df.loc[:, 'fpr'].iloc[-1]
    results['WorkReducedTwoPercent'] = df.loc[:, 'sum'].iloc[-1]
    results['WorkReducedHundredMinusTwoPercent'] = 100 - df.loc[:,
                                                                'sum'].iloc[-1]
    # results['WorkReducedOnePercent'] = df.iloc[2,2]
    # results['WorkReducedPointFivePercent'] = df.iloc[1,2]
    # results['WorkReducedPointOnePercent'] = df.iloc[0,2]

    macroify.append_file(results)
Пример #2
0
    print(
        'Accuracy',
        accuracy_score(ensemble_labels_priori, ensemble_predictions_priori) *
        100)
    print('F1',
          f1_score(ensemble_labels_priori, ensemble_predictions_priori) * 100)
    print(
        'Precision',
        precision_score(ensemble_labels_priori, ensemble_predictions_priori) *
        100)
    print(
        'Recall',
        recall_score(ensemble_labels_priori, ensemble_predictions_priori) *
        100)

    total_manual = workreduceddict[0.01]['total_manual']
    results[strategy + 'WorkReducedOnePercent'] = (
        total_amount_of_2018_domains - total_manual -
        manual_added_to_trainingset) / total_amount_of_2018_domains * 100
    total_manual = workreduceddict[0.005]['total_manual']
    results[strategy + 'WorkReducedPointFivePercent'] = (
        total_amount_of_2018_domains - total_manual -
        manual_added_to_trainingset) / total_amount_of_2018_domains * 100
    total_manual = workreduceddict[0.001]['total_manual']
    results[strategy + 'WorkReducedPointOnePercent'] = (
        total_amount_of_2018_domains - total_manual -
        manual_added_to_trainingset) / total_amount_of_2018_domains * 100

    macroify.append_file(results)