def score_dt(model_name, model, X, y, y_actual, output_folder):
    """
    Score a decision tree model.

    :param string model_name: title for the model used on the output filename
    :param dataframe model: model reference
    :param dataframe X: examples
    :param dataframe y: targets
    :param dataframe y_actual: target results
    :param string output_folder: location of the output / results
    """
    print("Scoring model...")
    model_score = model.score(X, y)
    mse = mean_squared_error(y, y_actual)

    mse_score = model_name, "- Mean Squared Error:", mse
    accuracy = model_name, "- Accuracy score (%):", "{:.2%}".format(model_score)

    # write to file
    path = output_folder + '/models'
    create_folder_if_not_exists(path)

    filename = path + '/score_' + model_name + '.txt'
    with open(filename, 'w') as scores:
        print(mse_score, file=scores)
        print(accuracy, file=scores)
    scores.close()
    print("Scores saved location:", filename)