Learning Module
This is where the magic happens 🧙🪄
Last updated
This is where the magic happens 🧙🪄
Last updated
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.
This serves as the starting point for an experiment.
You have two options here:
Custom File: You can choose any .csv file from the dropdown selector displaying all your .csv files from your workspace. Then, you need to choose which column from your selected .csv file should be the target for prediction.
-
Dataset
Dataset
Dataset
-
Model_config
Model_config AND Dataset
Model
Dataset
Model(s)
Dataset
Model
Model
Model
Model
-
Model
Model
Model
-
When clicking on an Optimize Node, it opens a subflow as shown below, allowing you to construct pipelines for optimization.
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.
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.
This menu contains different functionalities that can be used to help you build your scene.
This dropdown allows you to select the type of machine learning you want for your experiment. When changing the type, all settings are reset.
Play
Garbage bin
This button allows you to delete all nodes in the scene.
Save
This button allows you to save the scene.
Load
This button allows you to load a scene from a file.
This minimap allows you to navigate the scene and visualize the nodes present in it.
This menu contains various functionalities that interact with the flow section.
Plus Button
This button allows you to zoom in the flow section.
Minus Button
This button allows you to zoom out the flow section.
Square Button
This button allows you to fit the flow section in the view.
Lock Button
This button allows you to lock the flow section. When locked, you can't move the flow section.
Map Button
This button allows you to show/hide the minimap.
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.
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.
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! 😉
When constructing your scene, you can connect multiple nodes to each other, creating multiple pipelines!
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.
PyCaret ROC (Receiver Operating Characteristic)/AUC (Area Under the Curve) plots
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.
Click on the Learning Module Icon.
The Add options button opens a panel where you can select additional options. These options are automatically generated from the online .
The links we use to explain the PyCaret specific functions refer to the . However, please note that these functions are also present in other machine learning types within PyCaret. For instance, you can find them in the .
MEDomicsLab Standard: This option takes files from a learning folder, which may represent the learning set from static .csv files obtained through the . The node automatically detects files that match the format and displays them in a dropdown selector. You then need to choose which column from your selected .csv file(s) should be the target for prediction. If you select more than one file, all the selected files should have the same target column.
The available options for this node correspond to the that are not directly related to data cleaning.
This node enables you to clean your dataset. The available options for this node correspond to the that are directly related to data cleaning.
This node allows you to select a model and its associated parameters. It corresponds to the estimator parameter of the . The models are directly sourced from the package. In fact, if you are seeking documentation about a specific model parameter, you will find it in the documentation.
This node allows you to train a model. The available options for this node correspond to the (except the estimator parameter, which is defined through the Model node).
This node allows you to train and evaluate the performance of all estimators available in the using cross-validation. The available options for this node correspond to the .
This node allows you to load a model from a file. It takes as input a model from the ones you saved in your scene, displayed in a dropdown selector. The available options for this node are the ones available in the , except the model name, which is replaced by the selected file.
This node allows you to optimize a model. It is different from the other nodes as, when clicking on it, it opens a subflow containing other nodes. It gathers the .**
This node allows you to analyze a model. It gathers the . For now, only the is implemented in our application.
This node allows you to finalize a model. The available options for this node correspond to the (except the estimator parameter, which is passed as input to this node).
This node allows you to save a model. The available options for this node correspond to the (except the estimator parameter, which is passed as input to this node).
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 . For additional information about the available nodes, please refer to the documentation:
Tune Model documentation is available .
Ensemble Model documentation is available .
Blend Models documentation is available .
Stack Models documentation is available .
Calibrate Model documentation is available .
Refer to the section for more information about the results.
Machine Learning type dropdown
This button allows you to run the experiment. You can find additional information about running the experiment .
Drag and drop nodes from the menu to create your own . 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.
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 for more information.
PyCaret primarily implements functions from the .
At the beginning of a Machine Learning pipeline, you initialize your data using , corresponding to the Dataset and Clean nodes in our Learning Module. The setup function requires a dataset and the name of the target column. PyCaret then initializes elements for the pipeline.
PyCaret divides your dataset into two parts: the training set and the test set (controlled by the test_data
parameter in the ). The training data is employed to train and optimize your machine learning model, while the test data is reserved for evaluating the created model. The split is conducted using the (useful explanations about this function can be found ).
Then PyCaret will define folds on the train data to use for the Cross-Validation part (which will be executed using the Train or Compare Models box). The definition of the folds will also be done using a random seed, which you can define through the session_id
parameter of PyCaret. By default, PyCaret uses the to define the folds. The stratified method ensures that each class from the target is represented equally across each fold.
There are two functions related to training in PyCaret: (corresponding to our Compare Models box) and (corresponding to our Train node).
The function is used to train all the available models from PyCaret on the initialized data from the setup function of PyCaret (our Dataset and Clean nodes). The resulting table displayed shows you the mean of the Cross-Validation results of all the folds for each model. For example, if we have five folds, for each model, we train the model five times, using a different fold as validation data at each iteration. Then, we apply the trained model to the validation fold and keep the resulting metrics to calculate the mean with the validation results of the four other iterations (purple data from the split in the image shown below).
The output of the function is the best model found using a specified metric (Accuracy by default, AUC as we specified in our instruction video). If we set the n_select
parameter (as shown in our instruction video), we return the specified number of models from the top of the list.
The function takes initialized data as an entry and a model (that you can define through our Model node). It works exactly the same way as the function, except that we only test one model, and the results table shows the Cross-Validation results of each fold.
The AUC plots generated by the library are derived from the , which extends the API. By default, the plot displays multiple curves:
While using the 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 yet. We are currently working on fixing this issue.