@@ -65,7 +65,7 @@ python ./source/main.py --version
6565
6666## 🚀 Usage
6767
68- ```
68+ ``` zsh
6969$ siapy-cli --help
7070
7171Usage: siapy-cli [OPTIONS] COMMAND [ARGS]...
@@ -82,6 +82,8 @@ Commands:
8282 analysis Analysis commands, e.g., train model, generate metrics, etc.
8383` ` `
8484
85+ During execution, all artifacts (including required data, transformed images, extracted signatures, models, etc.) are saved in the ` siapy-cli/artifacts` directory.
86+
8587# # 📖 Cookbook
8688
8789This guide provides an opinionated step-by-step workflow for using the ` siapy-cli` tool.
@@ -228,34 +230,69 @@ Verify proper data loading:
228230siapy-cli analysis test-load-data --data-loader DataLoaderExample
229231` ` `
230232
231- - This command returns the number of images, number of labels, and unique labels in the dataset.
233+ - This command returns an array of signatures and their corresponding labels.
234+ - Use ` --data-loader` to specify the data loader class.
235+ - Ensure the number of signatures matches the number of labels.
232236
2332372. Train and optimize model
234238
239+ Train a model and optimize its hyperparameters:
240+
235241` ` ` zsh
236- siapy-cli analysis train-model --model SavgolPLSSVC --data-loader DataLoaderExample --parameters ParamsSavgol --parameters ParamsPLS --parameters ParamsSVC --do-optimize
242+ siapy-cli analysis train-model --model SavgolPLSSVC \
243+ --data-loader DataLoaderExample \
244+ --parameters ParamsSavgol \
245+ --parameters ParamsPLS \
246+ --parameters ParamsSVC \
247+ --do-optimize
237248` ` `
238249
250+ - The ` --do-optimize` flag enables hyperparameter optimization during training.
251+ - You can customize and add new parameters to tune using the ` --parameters` argument.
252+ - Use the ` --model` argument to select a different model.
253+ - Ensure that the model and parameter configurations are compatible.
254+
255+ Once this step is complete, proceed to the following steps (3–6) using the same flags and arguments to maintain consistency across the workflow.
256+
2392573. Generate metrics
240258
259+ Create performance metrics for the trained model:
260+
241261` ` ` zsh
242- siapy-cli analysis generate-metrics --model SavgolPLSSVC --data-loader DataLoaderExample --do-optimize
262+ siapy-cli analysis generate-metrics --model SavgolPLSSVC \
263+ --data-loader DataLoaderExample \
264+ --do-optimize
243265` ` `
244266
2452674. Generate plots
246268
269+ Produce visualizations for the analysis:
270+
247271` ` ` zsh
248- siapy-cli analysis generate-plots --model SavgolPLSSVC --data-loader DataLoaderExample --do-optimize
272+ siapy-cli analysis generate-plots --model SavgolPLSSVC \
273+ --data-loader DataLoaderExample \
274+ --do-optimize
249275` ` `
250276
2512775. Calculate relevances
252278
279+ Analyze feature relevances:
280+
253281` ` ` zsh
254- siapy-cli analysis calculate-relevances --model SavgolPLSSVC --data-loader DataLoaderExample --do-optimize
282+ siapy-cli analysis calculate-relevances --model SavgolPLSSVC \
283+ --data-loader DataLoaderExample \
284+ --do-optimize
255285` ` `
256286
2572876. Display metrics
258288
289+ Display the calculated metrics in the terminal:
290+
259291` ` ` zsh
260292siapy-cli analysis display-metrics --model SavgolPLSSVC --data-loader DataLoaderExample --do-optimize
261293` ` `
294+
295+ > 📌 ** Note:**
296+ >
297+ > - ** Results Location** : All results generated by the commands are saved in the ` siapy-cli/artifacts` directory.
298+ > - ** Consistency** : Use the same flags and arguments across all steps to ensure consistency with the selected model and data loader.
0 commit comments