Thuta Learning
ရှာဖွေရန်
BasicData & Databasesintermediate

Python ML Environment Setup

စိတ်လျှော့ပါ။ ဒီခန်းကို စာအုပ်လိုမဟုတ်ဘဲ စကားပြောသလိုပဲ၊ နားလည်လွယ်အောင် ရှင်းပါမယ်။

ဒီခန်းပြီးရင် ဘာတတ်သွားမလဲ

  • Python ML Environment Setup ကို ကြောက်စရာမလိုအောင် နားလည်မယ်
  • ကိုယ်တိုင် scikit-learn code ကို run ကြည့်တတ်မယ်
  • Real project ထဲမှာ ဒီ concept ကို ချက်ချင်း အသုံးချတတ်မယ်

ခဏလေး ဒီလိုပဲ စဉ်းစားကြည့်

scikit-learn က Python ရဲ့ အသုံးအများဆုံး, beginner-friendly ML library ပါ — regression, classification, clustering algorithm အများကြီး, consistent API (fit/predict pattern) ဖြင့် ပေးထားပါတယ်။ Jupyter Notebook ကတော့ code ကို cell အလိုက် interactive run ပြီး, output (graph, table) ကို ချက်ချင်း ကြည့်နိုင်တဲ့ development environment ပါ — data science/ML work flow မှာ script file ထက် ပိုအသုံးများပါတယ် (data ကို explore/visualize လုပ်ရင်း ဆက်တိုက် iterate လုပ်ရလို့).

လက်တွေ့ scenario နဲ့ ချိတ်ကြည့်မယ်

`pip install scikit-learn pandas numpy matplotlib jupyter` ကို run ပြီး, `jupyter notebook` command နဲ့ browser-based notebook ကို launch လုပ်ပါ — cell တစ်ခုစီမှာ code ရေးပြီး Shift+Enter နဲ့ run နိုင်ပါတယ်, output (dataframe, chart) က cell အောက်ကို ချက်ချင်း ပေါ်လာပါလိမ့်မယ်.

အတူတူ ကြည့်မယ်

bash
# Install the core ML stack
pip install scikit-learn pandas numpy matplotlib jupyter

# Launch Jupyter Notebook
jupyter notebook

# Verify scikit-learn is installed correctly
python -c "import sklearn; print(sklearn.__version__)"
You should see
$ python -c "import sklearn; print(sklearn.__version__)"
1.5.0

၅ မိနစ် စမ်းကြည့်

scikit-learn/Jupyter ကို install လုပ်ပြီး, Jupyter Notebook ထဲမှာ `import sklearn; print(sklearn.__version__)` ကို run ကြည့်ပါ — version number ရအောင် setup ပြီးအောင် လုပ်ပါ။

သတိလေးတစ်ချက်

Jupyter Notebook ရဲ့ 'cell execution order' က notebook ထဲက cell layout order နဲ့ တူချင်မှ တူပါလိမ့်မယ် — 'Restart & Run All' ကို occasionally run ပြီး notebook တစ်ခုလုံး top-to-bottom အလုပ်လုပ်ကြောင်း confirm လုပ်ရင် bug ရှောင်နိုင်ပါတယ်.

ဒီနေရာမှာ လူအများမှားတတ်တယ်

  • Virtual environment (venv/conda) မသုံးဘဲ system Python ထဲ တိုက်ရိုက် library install ခြင်း — project တစ်ခုနဲ့တစ်ခု library version conflict ဖြစ်နိုင်ပါတယ်
  • Jupyter cell တွေကို sequence order မလိုက်ဘဲ ကျပန်း run ခြင်း — variable state ရှုပ်ထွေးသွားနိုင်ပါတယ် (cell 5 ကို cell 2 မတိုင်ခင် run လိုက်ရင်)

အခု ကိုယ်တိုင် စမ်းကြည့်

scikit-learn/Jupyter ကို install လုပ်ပြီး, Jupyter Notebook ထဲမှာ `import sklearn; print(sklearn.__version__)` ကို run ကြည့်ပါ — version number ရအောင် setup ပြီးအောင် လုပ်ပါ။

You'll know it worked when: $ python -c "import sklearn; print(sklearn.__version__)" 1.5.0

Python ML Environment Setup | Thuta Learning