Instantly share code, notes, and snippets.

Embed
What would you like to do?
Plots evaluations of all iterations from Recursive Feature Elimination WhizzML Script execution
import json
import matplotlib
import matplotlib.pyplot as plt
file = open("rfe_result.json", "r")
file_json = json.load(file)
evaluations = file_json["evaluations"]
features = [evaluation["features"] for evaluation in evaluations]
scores = [evaluation["evaluation"] for evaluation in evaluations]
# Making plot
fig, ax = plt.subplots()
ax.plot(features, scores)
ax.set(xlabel='features', ylabel='evaluation',
title='Evaluation score by number of features')
ax.grid()
plt.show()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment