def plot_wikipedia_cost(model, model_df, cost_func, save_pdf=False): output = '/tmp/wikipedia_cost.pdf' if save_pdf else None df = _select_df(model_df, 'application', 'wikipedia') target = _train(model, df) plotter = Plotter(xlim=(0, 3.5)) plotter.update_config(s=40) plotter.plot_cost_model(model, target, cost_func, output) print('Prediction of the Wikipedia application cost.')