Learning Module
This is where the magic happens 🧙🪄
Overview Videos
Create a Scene
To create a scene, follow these steps:
Click on the "Create scene" button.
Enter a name for the new scene.
The application will generate a folder that includes:
Your scene (.medml file).
A folder for your scene models.
A folder for your scene notebooks.
Module Overview
Double click on the .medml file to open the scene.
1. Available Nodes
The Add options button opens a panel where you can select additional options. These options are automatically generated from the online ReadTheDocs documentation of PyCaret.
The links we use to explain the PyCaret specific functions refer to the Classification section of the PyCaret documentation. However, please note that these functions are also present in other machine learning types within PyCaret. For instance, you can find them in the Regression documentation of PyCaret as well.
**Optimize Node
When clicking on an Optimize Node, it opens a subflow as shown below, allowing you to construct pipelines for optimization.
The available nodes differ from those displayed in the original flow. You can find useful information on how to use them on this page of the PyCaret GitBook. For additional information about the available nodes, please refer to the PyCaret ReadTheDocs documentation:
Tune Model documentation is available here.
Ensemble Model documentation is available here.
Blend Models documentation is available here.
Stack Models documentation is available here.
Calibrate Model documentation is available here.
The name of the node is where you can edit the name. The green blocks (I/O nodes) represent the input and output of the Optimize node. They are movable, and to connect them, simply intersect them with your nodes.
2. Results Button
This button is used to view the results of the experiment. It is disabled until you run an experiment. Once you have run an experiment, a .medmlres file is created in your scene folder, containing the generated results from the experiment. In fact, if you quit the app, your generated results will still be available the next time you open the app.
Once you click on the See results button, you activate the Result Mode. In this mode, you cannot manipulate the scene to build pipelines. The Result Mode only allows you to select the pipelines you want to observe the results from. To exit the Result Mode, simply press the See results button again, which becomes the Results mode on button while the Result Mode is activated.
Refer to the Results Panel section for more information about the results.
3. Utils Menu
This menu contains different functionalities that can be used to help you build your scene.
4. Minimap
This minimap allows you to navigate the scene and visualize the nodes present in it.
5. Flow Utils
This menu contains various functionalities that interact with the flow section.
Example
1. Creation of your Pipeline
Drag and drop nodes from the menu to create your own pipeline(s). Here is an example of a simple classification pipeline that takes a dataset, trains a Gradient Boosting Classifier model, and then plots the resulting AUC (Area Under the Curve) plot.
2. Run the Experiment
You can execute the experiment by clicking on the Run button.
A progress bar will appear, and upon completion of the experiment:
A Toast message will confirm that the results have been saved.
A new file (.medmlres) will be generated in your scene folder, containing results related to your scene (you can't open the .medmlres file).
The See results button will be enabled.
3. Results Panel
When you click the See Results button, you will activate the Result Mode.
As you can see, a panel opens at the bottom with various collapsible items:
They are called the Pipeline's Results Viewer.
On the left, you can see all the nodes in the pipeline. You can click on them to view associated results.
On the right, there is a button that generates a notebook for the associated pipeline.
You can also filter which pipeline(s) you want to see in the results panel by checking the nodes in the flow section. Refer to the Pipeline Selection box section for more information.
3.1 Notebook Generation
The generated file is saved in the notebook folder of the associated scene. You can open it directly from the application by right-clicking and selecting "Open in..." and then choosing, for example, VSCode.
You need to run an experiment to access this functionality.
The default code editor is not implemented yet, but it's coming soon! 😉
Multiple Pipelines
When constructing your scene, you can connect multiple nodes to each other, creating multiple pipelines!
1. Single VS Multiple Pipelines:
2. Pipelines Selection box
Each runnable node has a checkbox on top of the node in results mode. Checked nodes, especially those in green, will be displayed in the results panel.
The independent selection box (green ones) indicates that every pipeline goes through this node. Therefore, it will always be shown in the associated results.
PyCaret ROC (Receiver Operating Characteristic)/AUC (Area Under the Curve) plots
The AUC plots generated by the PyCaret library are derived from the YellowBrick Python package, which extends the scikit-learn API. By default, the plot displays multiple curves:
The ROC curve per class for each class computed using the one-vs-rest method (meaning that the considered class is treated as the positive class and all other classes as the negative class).
The micro-average curve, which is calculated by summing up all true positives and false positives across all classes.
The macro-average curve, which takes the average of curves across all classes.
We acknowledge that these curves can be a bit confusing, especially with binary classification.
While using the YellowBrick package directly, we can set parameters to display only the classic ROC curve. However, we haven't found a way to set these parameters through our application with PyCaret yet. We are currently working on fixing this issue.
Last updated