def plot_wikipedia(predictor, save_pdf=False): """Plot wikipedia target prediction and real values.""" target, model = predictor.get_plot_data('wikipedia') output = '/tmp/wikipedia.pdf' if save_pdf else None plotter = Plotter(xlim=(3, 65), ylim=(0, 200)) plotter.plot_model(model, target, output) print('Prediction of the Wikipedia application target execution duration.')
def plot_wikipedia(model, model_df, save_pdf=False): """Plot actual results and model's predictions.""" output = '/tmp/wikipedia.pdf' if save_pdf else None df = _select_df(model_df, 'application', 'wikipedia') target = _train(model, df) plotter = Plotter(xlim=(3, 65), ylim=(0, 200)) plotter.plot_model(model, target, output) print('Prediction of the Wikipedia application target execution duration.')
def plot_hbsort(predictor, save_pdf=False): """Plot actual results and model's predictions.""" target, model = predictor.get_plot_data('hbsort') outputs = _get_outputs(save_pdf, 'hbsort3.pdf', 'hbsort30.pdf') plotter = Plotter(xlim=(0.75, 16.25)) plotter.plot_model(model, target[target.input < 15 * 1024**3], outputs[0]) plotter = Plotter(xlim=(14, 130)) plotter.plot_model(model, target[target.input > 15 * 1024**3], outputs[1]) print('The top figure is the result of the HiBench Sort application with' ' 3-GB input. The second figure uses 31-GB of data.')
def plot_hbkmeans(predictor, save_pdf=False): """Plot actual results and model's predictions.""" target, model = predictor.get_plot_data('hbkmeans') outputs = _get_outputs(save_pdf, 'hbkmeans16.pdf', 'hbkmeans65.pdf') plotter = Plotter(xlim=(7.5, 32.5)) plotter.plot_model(model, target[target.input == 16384000], outputs[0]) plotter = Plotter(xlim=(30, 130)) plotter.plot_model(model, target[target.input == 65536000], outputs[1]) print('The top figure is the result of the HiBench K-means application' ' with 16,384,000 samples. The second figure uses 65,536,000' ' samples.')