Plots evaluations of all iterations from Recursive Feature Elimination WhizzML Script execution
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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