LoslegenKostenlos loslegen

Moving model results with CASE

You are working as a data scientist in charge of analyzing some machine learning model results. The production environment moves files into a folder called model_out/ and names them model_RXX.csv where XX is a random number related to which experiment was run.

Each file has the following structure (example):

Model Name, Accuracy, CV, Model Duration (s)
Logistic,42,4,48

Your manager has told you that recent work in the organization has meant that tree-based models are to be kept in one folder and everything else deleted.

Your task is to use a CASE statement to move the tree-based models (Random Forest, GBM, and XGBoost) to the tree_models/ folder, and delete all other models (KNN and Logistic).

Diese Übung ist Teil des Kurses

Introduction to Bash Scripting

Kurs anzeigen

Interaktive Übung

Setze die Theorie in einer unserer interaktiven Übungen in die Praxis um

Übung starten