執行 Python 模型
在上一個練習中,你已經安裝了執行 Python 模型指令碼所需的套件。這個練習中,我們要從命令列執行一個已寫好的 Python 指令碼 create_model.py。它會輸出兩個結果:一個已儲存為 .pkl 檔的 Python 模型,以及一個已儲存為 .csv 檔的預測分數。
本練習屬於課程
在 Shell 中進行資料處理
動手互動練習
試著完成這個範例程式碼,體驗一下這個練習。
# Re-install requirements
pip install -r requirements.txt
# Preview Python model script for import dependencies
cat create_model.py
# Verify that dependencies are installed
pip ___