2

Im trying to evaluate / plot the various model results using pycaret but I'm not able to do so. for example :-

from pycaret.datasets import get_data
juice = get_data('juice')
from pycaret.classification import *
exp_name = setup(data = juice,  target = 'Purchase',silent=True,html=False)
lr = create_model('lr')
evaluate_model(lr)

produces this output on console :-

interactive(children=(ToggleButtons(description='Plot Type:', icons=('',), options=(('Hyperparameters', 'parameter'), ('AUC', 'auc'), ('Confusion Matrix', 'confusion_matrix'), ('Threshold', 'threshold'), ('Precision Recall', 'pr'), ('Prediction Error', 'error'), ('Class Report', 'class_report'), ('Feature Selection', 'rfe'), ('Learning Curve', 'learning'), ('Manifold Learning', 'manifold'), ('Calibration Curve', 'calibration'), ('Validation Curve', 'vc'), ('Dimensions', 'dimension'), ('Feature Importance', 'feature'), ('Feature Importance (All)', 'feature_all'), ('Decision Boundary', 'boundary'), ('Lift Chart', 'lift'), ('Gain Chart', 'gain'), ('Decision Tree', 'tree'), ('KS Statistic Plot', 'ks')), value='parameter'), Output()), _dom_classes=('widget-interact',))

instead of the beautiful widgets and graphs it is supposed to display.

Also many parameters of plot_model wont work :-

enter image description here

Scope
  • 727
  • 4
  • 15

1 Answers1

1

Using the evaluate_model() function which displays a user interface for all of the available plots for a given model. internally uses the plot_model() function.

REF1 Ref2

It displays only one graph at a time when we pass graph name as an argument. And also, using help(plot_model) will provide you with different ways of graph representation.

Ref3

B. B. Naga Sai Vamsi
  • 2,386
  • 2
  • 3
  • 11
  • sorrry I didnt get you, I have sent you an examle, im not able to to graphs in `azure databricks` – Scope Aug 08 '22 at 05:40
  • hi, use plot_model(lr) you will get graphs – B. B. Naga Sai Vamsi Aug 08 '22 at 05:47
  • this is plotting the same as shown, but Im not getting the widgets and buttons,.on the other hand whrn I try to plot_model for another scenario ```fig = plt.figure(figsize=(25,20)) ax = fig.add_subplot(3,2,1) plot_model(blender, plot='residuals', save=True, verbose=False, scale=1.1) ax = fig.add_subplot(3,2,2) plot_model(blender, plot='error', save=True, verbose=False, scale=1.1) ax = fig.add_subplot(3,2,3) plot_model(blender, plot='learning', save=True, verbose=False, scale=1.1) plt.show()``` im not geting any plot – Scope Aug 08 '22 at 06:00
  • the code which you provided in the question and the comment differs, i am unable to understand what your ask. please edit question and provide more details for troubleshoot . – B. B. Naga Sai Vamsi Aug 08 '22 at 08:31
  • yes my concern is would not `evaluate_model(model_name)` work on databricks? there are a lot of additinal graphs which evaluate_model shows – Scope Aug 08 '22 at 08:48
  • refrence : `https://www.databricks.com/session_na21/machine-learning-with-pycaret` – Scope Aug 08 '22 at 08:50
  • what is the differnce between usng `evaluate_model(model_name)` and using ID with plot `plot_model(lr,plot='feature_all')` . This is something I cannot understand – Scope Aug 08 '22 at 08:53
  • `evaluate_model` is not working in azure databricks. According to this [link](https://www.pycaret.org/tutorials/html/CLF101.html#10.4-Confusion-Matrix).evaluate_model internally uses `plot_model`. – B. B. Naga Sai Vamsi Aug 08 '22 at 09:44