def main(loader, name):
    """
    Here we iterate through the datasets and score them with a classifier using different encodings.
    :return:
    """

    scores = []
    raw_scores_ds = {}

    # first get the dataset
    X, y, mapping = loader()
    X = category_encoders.ordinal_encoding(X)

    clf = linear_model.LogisticRegression()

    # try each encoding method available
    encoders = [
        'backward_difference_coding',
        'binary',
        'hashing_trick',
        'hashing_trick_4',
        'hashing_trick_8',
        'hashing_trick_16',
        'hashing_trick_32',
        'hashing_trick_64',
        'hashing_trick_128',
        'helmert_coding',
        'one_hot',
        'ordinal_encoding',
        'sum_coding',
        'polynomial_coding'
    ]

    for encoder_name in encoders:
        encoder = category_encoders.__dict__[encoder_name]
        start_time = time.time()
        score, stds, raw_scores, dim = score_models(clf, X, y, encoder)
        scores.append([encoder_name, name, dim, score, stds, time.time() - start_time])
        raw_scores_ds[encoder_name] = raw_scores
        gc.collect()

    results = pd.DataFrame(scores, columns=['Encoding', 'Dataset', 'Dimensionality', 'Avg. Score', 'Score StDev', 'Elapsed Time'])

    raw = pd.DataFrame.from_dict(raw_scores_ds)
    ax = raw.plot(kind='box', return_type='axes')
    plt.title('Scores for Encodings on %s Dataset' % (name, ))
    plt.ylabel('Score (higher better)')
    for tick in ax.get_xticklabels():
        tick.set_rotation(90)
    plt.grid()
    plt.tight_layout()
    plt.show()

    return results, raw
dataset/ETHPy150Open wdm0006/categorical_encoding/encoding_examples.py/main/original