Create a train - test set splitter plugin
Create a plugin to split datasets in train and test sets.
Step 1. Backend
Develop the backend in Python to split the dataset into training and test sets. Use the scikit-learn
library for this purpose, although you can consider other libraries if deemed more suitable.
The backend should accept the following arguments:
- Proportion of the training set
- Proportion of the test set
- Random seed for reproducibility
- Option to stratify the split or not (useful for maintaining distribution across classes)
It's possible some arguments might be missing, so consider the typical requirements for data splitting in machine learning projects.
Step 2. Front-end
Preferably, use Shiny for the front-end to facilitate integration into LinkR, assuming you're working within its plugin infrastructure. If direct integration into LinkR using its plugin template is feasible, prioritize that approach.
Alternatively, if Shiny is not an option or you prefer to work within a Python ecosystem, consider using a Python front-end library such as Dash or Streamlit.
Ensure the front-end allows users to easily specify the parameters required for the backend (train/test proportions, random seed, and stratification option) and displays the plugin interface as shown in the provided screenshots.
In the user interface, we should see the result of the split into training and test sets, by displaying the different variables in a datatable.
The envisioned plugin interface should resemble the provided layout.
Dataset
Start with the provided dataset in feather format (referred to as #18): mortality_prediction.feather.