[](https://github.com/microsoft/ML-For-Beginners/blob/master/LICENSE)
[](https://GitHub.com/microsoft/ML-For-Beginners/graphs/contributors/)
[](https://GitHub.com/microsoft/ML-For-Beginners/issues/)
[](https://GitHub.com/microsoft/ML-For-Beginners/pulls/)
[](http://makeapullrequest.com)
[](https://GitHub.com/microsoft/ML-For-Beginners/watchers/)
[](https://GitHub.com/microsoft/ML-For-Beginners/network/)
[](https://GitHub.com/microsoft/ML-For-Beginners/stargazers/)
### 🌐 多語言支援
#### 透過 GitHub Action 支援(自動化及隨時保持最新)
[阿拉伯語](../ar/README.md) | [孟加拉語](../bn/README.md) | [保加利亞語](../bg/README.md) | [緬甸語](../my/README.md) | [中文(簡體)](../zh-CN/README.md) | [中文(繁體,香港)](./README.md) | [中文(繁體,澳門)](../zh-MO/README.md) | [中文(繁體,台灣)](../zh-TW/README.md) | [克羅地亞語](../hr/README.md) | [捷克語](../cs/README.md) | [丹麥語](../da/README.md) | [荷蘭語](../nl/README.md) | [愛沙尼亞語](../et/README.md) | [芬蘭語](../fi/README.md) | [法語](../fr/README.md) | [德語](../de/README.md) | [希臘語](../el/README.md) | [希伯來語](../he/README.md) | [印地語](../hi/README.md) | [匈牙利語](../hu/README.md) | [印尼語](../id/README.md) | [義大利語](../it/README.md) | [日語](../ja/README.md) | [卡納達語](../kn/README.md) | [高棉語](../km/README.md) | [韓語](../ko/README.md) | [立陶宛語](../lt/README.md) | [馬來語](../ms/README.md) | [馬拉雅拉姆語](../ml/README.md) | [馬拉地語](../mr/README.md) | [尼泊爾語](../ne/README.md) | [奈及利亞洋泾浜語](../pcm/README.md) | [挪威語](../no/README.md) | [波斯語 (法爾西語)](../fa/README.md) | [波蘭語](../pl/README.md) | [葡萄牙語 (巴西)](../pt-BR/README.md) | [葡萄牙語 (葡萄牙)](../pt-PT/README.md) | [旁遮普語 (古爾穆奇文)](../pa/README.md) | [羅馬尼亞語](../ro/README.md) | [俄語](../ru/README.md) | [塞爾維亞語 (西里爾字母)](../sr/README.md) | [斯洛伐克語](../sk/README.md) | [斯洛維尼亞語](../sl/README.md) | [西班牙語](../es/README.md) | [斯瓦希里語](../sw/README.md) | [瑞典語](../sv/README.md) | [他加祿語 (菲律賓語)](../tl/README.md) | [泰米爾語](../ta/README.md) | [泰盧固語](../te/README.md) | [泰語](../th/README.md) | [土耳其語](../tr/README.md) | [烏克蘭語](../uk/README.md) | [烏爾都語](../ur/README.md) | [越南語](../vi/README.md)
> **偏好本地克隆?**
>
> 此儲存庫包含 50 多種語言翻譯,會大幅增加下載大小。若要無翻譯版本克隆,請使用稀疏簽出:
>
> **Bash / macOS / Linux:**
> ```bash
> git clone --filter=blob:none --sparse https://github.com/microsoft/ML-For-Beginners.git
> cd ML-For-Beginners
> git sparse-checkout set --no-cone '/*' '!translations' '!translated_images'
> ```
>
> **CMD(Windows):**
> ```cmd
> git clone --filter=blob:none --sparse https://github.com/microsoft/ML-For-Beginners.git
> cd ML-For-Beginners
> git sparse-checkout set --no-cone "/*" "!translations" "!translated_images"
> ```
>
> 這讓你以更快的速度取得完成課程所需的所有內容。
#### 加入我們的社區
[](https://discord.gg/nTYy5BXMWG)
我們有一個持續進行中的 Discord AI 學習系列,詳情及加入請至 [AI 學習系列](https://aka.ms/learnwithai/discord),活動時間為 2025 年 9 月 18 日至 30 日。你將會學習使用 GitHub Copilot 進行資料科學的提示與技巧。

# 初學者機器學習課程
> 🌍 藉由探索世界各地文化,一同環遊機器學習的世界 🌍
微軟的 Cloud Advocates 很高興能提供一套為期 12 週、共 26 章課程,主題為 機器學習。本課程主要介紹所謂的 經典機器學習,主要使用 Scikit-learn 函式庫,並避免涵蓋深度學習部份;深度學習主題可參考我們的 [AI 初學者課程](https://aka.ms/ai4beginners)。你也可以搭配我們的 [資料科學初學者課程](https://aka.ms/ds4beginners)。
跟我們一起環遊世界,將這些經典機器學習技術應用到世界各地的資料。每個課程包含課前與課後小測驗、完成課程的文字說明、解答、作業等。我們以專案為導向的教學法,讓你在實作中學習,是幫助新技能「牢記」的有效方法。
**✍️ 衷心感謝所有作者** Jen Looper、Stephen Howell、Francesca Lazzeri、Tomomi Imura、Cassie Breviu、Dmitry Soshnikov、Chris Noring、Anirban Mukherjee、Ornella Altunyan、Ruth Yakubu 和 Amy Boyd
**🎨 同時感謝插畫家** Tomomi Imura、Dasani Madipalli、Jen Looper
**🙏 特別感謝 🙏 微軟學生大使作者、審稿及內容貢獻者**,尤其是 Rishit Dagli、Muhammad Sakib Khan Inan、Rohan Raj、Alexandru Petrescu、Abhishek Jaiswal、Nawrin Tabassum、Ioan Samuila 及 Snigdha Agarwal
**🤩 額外感謝微軟學生大使 Eric Wanjau、Jasleen Sondhi 和 Vidushi Gupta 所提供的 R 課程內容!**
# 開始使用
依照以下步驟操作:
1. **Fork 儲存庫**:點擊本頁右上角的「Fork」按鈕。
2. **Clone 儲存庫**: `git clone https://github.com/microsoft/ML-For-Beginners.git`
> [查看本課程所有額外資源,請參考我們的 Microsoft Learn 集合](https://learn.microsoft.com/en-us/collections/qrqzamz1nn2wx3?WT.mc_id=academic-77952-bethanycheum)
> 🔧 **需要協助?** 請查閱 [故障排除指南](TROUBLESHOOTING.md),了解安裝、設定及執行課程時的常見問題解決方案。
**[學生們](https://aka.ms/student-page)**,要使用這套課程,請先 fork 整個倉庫到你自己的 GitHub 帳號,再自行或與小組完成練習:
- 先完成課前小測驗。
- 閱讀課程內容並完成活動,每遇知識檢核時暫停思考。
- 嘗試依課程理解自行完成專案,而不是僅使用解答程式碼;當然各專案課程中 `/solution` 資料夾會有程式碼可參考。
- 完成課後小測驗。
- 挑戰任務。
- 完成作業。
- 授課組別完成後,拜訪 [討論區](https://github.com/microsoft/ML-For-Beginners/discussions),藉由填寫對應的 PAT 評量表「大聲學習」。PAT 是進度評量工具,是你填寫來促進學習的評量表,你也可以對其他人的 PAT 進行回應,大家共同進步。
> 進階學習,我們推薦以下 [Microsoft Learn](https://docs.microsoft.com/en-us/users/jenlooper-2911/collections/k7o7tg1gp306q4?WT.mc_id=academic-77952-leestott) 模組與學習路徑。
老師們,我們提供了 [一些建議](for-teachers.md) 供您作為此課程的教學參考。
---
## 影片導覽
部分課程有短片形式的教學影片,可在課程中內嵌觀看,或至 [Microsoft Developer YouTube 頻道的 ML for Beginners 播放清單](https://aka.ms/ml-beginners-videos) 查看,點擊下方圖片即可。
[](https://aka.ms/ml-beginners-videos)
---
## 團隊介紹
[](https://youtu.be/Tj1XWrDSYJU)
**GIF 製作者** [Mohit Jaisal](https://linkedin.com/in/mohitjaisal)
> 🎥 點擊上方圖片觀看有關專案及其成員的影片!
---
## 教學法
我們在設計本課程時,選擇了兩項教學原則:確保課程是實作導向的 專案教學法,以及包含 頻繁的小測驗。此外,課程還有一個統一的 主題 以增強整體性。
利用專案 確保內容和實作相結合,能讓學生參與度更高,且加強概念記憶。課前的低壓小測驗幫助學生對主題設定學習意圖,課後第二次測驗則確保知識的鞏固。此課程設計靈活有趣,可完整修習或選擇部分學習。專案由淺入深,在 12 周週期結束時逐漸複雜。課程末還包含關於機器學習真實世界應用的後記,可作為額外加分或討論基礎。
> 請參閱我們的 [行為準則](CODE_OF_CONDUCT.md)、[貢獻指南](CONTRIBUTING.md)、[翻譯](..) 以及 [故障排除](TROUBLESHOOTING.md) 指南。我們歡迎您的建設性回饋!
## 每個課程包含
- 選擇性手繪筆記
- 選擇性補充影片
- 影片導覽(部分課程)
- [課前暖身小測驗](https://ff-quizzes.netlify.app/en/ml/)
- 書面課程說明
- 專案課程提供逐步指引教你如何建置專案
- 知識檢核
- 挑戰任務
- 補充閱讀資料
- 作業
- [課後小測驗](https://ff-quizzes.netlify.app/en/ml/)
> 關於語言的說明:這些課程主要使用 Python 撰寫,但也有許多課程提供 R 版本。若要完成 R 課程,請前往 `/solution` 資料夾並尋找 R 課程。它們包含有 .rmd 副檔名,代表 **R Markdown** 檔案,可簡單定義為將 `code chunks` (R 或其他語言程式碼區塊)和 `YAML header`(指導如何格式化輸出例如 PDF)嵌入於 `Markdown 文件` 中。因此,它作為資料科學的優良撰寫框架,讓你能結合程式碼、程式輸出及筆記,並以 Markdown 編寫。此外,R Markdown 檔案可以輸出為 PDF、HTML 或 Word 等格式。
> 關於小測驗的說明:所有小測驗皆包含於 [Quiz App folder](../../quiz-app) 中,共有 52 個小測驗,每個包含三個問題。這些小測驗會自課程中連結,但 Quiz App 也能在本機端執行;請依照 `quiz-app` 資料夾中的說明,在本機架設或部署至 Azure。
| 課程編號 | 主題 | 課程群組 | 學習目標 | 連結課程 | 作者 |
| :------: | :------------------------------------------------------------: | :--------------------------------------: | ------------------------------------------------------------------------------------------------------------------------------- | :------------------------------------------------------------------------------------------------------------------------------------: | :-----------------------------------------: |
| 01 | 機器學習入門 | [Introduction](1-Introduction/README.md) | 學習機器學習背後的基本概念 | [Lesson](1-Introduction/1-intro-to-ML/README.md) | Muhammad |
| 02 | 機器學習的歷史 | [Introduction](1-Introduction/README.md) | 認識此領域的歷史背景 | [Lesson](1-Introduction/2-history-of-ML/README.md) | Jen 與 Amy |
| 03 | 公平性與機器學習 | [Introduction](1-Introduction/README.md) | 建立與應用機器學習模型時,學生應考慮的重要公平性哲學議題 | [Lesson](1-Introduction/3-fairness/README.md) | Tomomi |
| 04 | 機器學習技術 | [Introduction](1-Introduction/README.md) | 機器學習研究者用來建立模型的技術 | [Lesson](1-Introduction/4-techniques-of-ML/README.md) | Chris 與 Jen |
| 05 | 迴歸入門 | [Regression](2-Regression/README.md) | 使用 Python 與 Scikit-learn 入門迴歸模型 | [Python](2-Regression/1-Tools/README.md) • [R](../../2-Regression/1-Tools/solution/R/lesson_1.html) | Jen • Eric Wanjau |
| 06 | 北美南瓜價格 🎃 | [Regression](2-Regression/README.md) | 可視化與清理資料,為機器學習做準備 | [Python](2-Regression/2-Data/README.md) • [R](../../2-Regression/2-Data/solution/R/lesson_2.html) | Jen • Eric Wanjau |
| 07 | 北美南瓜價格 🎃 | [Regression](2-Regression/README.md) | 建立線性與多項式迴歸模型 | [Python](2-Regression/3-Linear/README.md) • [R](../../2-Regression/3-Linear/solution/R/lesson_3.html) | Jen 和 Dmitry • Eric Wanjau |
| 08 | 北美南瓜價格 🎃 | [Regression](2-Regression/README.md) | 建立邏輯迴歸模型 | [Python](2-Regression/4-Logistic/README.md) • [R](../../2-Regression/4-Logistic/solution/R/lesson_4.html) | Jen • Eric Wanjau |
| 09 | 網頁應用 🔌 | [Web App](3-Web-App/README.md) | 建立一個網頁應用,使用你訓練好的模型 | [Python](3-Web-App/1-Web-App/README.md) | Jen |
| 10 | 分類入門 | [Classification](4-Classification/README.md) | 清理、準備並可視化資料;分類介紹 | [Python](4-Classification/1-Introduction/README.md) • [R](../../4-Classification/1-Introduction/solution/R/lesson_10.html) | Jen 和 Cassie • Eric Wanjau |
| 11 | 美味的亞洲與印度料理 🍜 | [Classification](4-Classification/README.md) | 分類器介紹 | [Python](4-Classification/2-Classifiers-1/README.md) • [R](../../4-Classification/2-Classifiers-1/solution/R/lesson_11.html) | Jen 和 Cassie • Eric Wanjau |
| 12 | 美味的亞洲與印度料理 🍜 | [Classification](4-Classification/README.md) | 更多分類器 | [Python](4-Classification/3-Classifiers-2/README.md) • [R](../../4-Classification/3-Classifiers-2/solution/R/lesson_12.html) | Jen 和 Cassie • Eric Wanjau |
| 13 | 美味的亞洲與印度料理 🍜 | [Classification](4-Classification/README.md) | 使用你的模型建立推薦網頁應用 | [Python](4-Classification/4-Applied/README.md) | Jen |
| 14 | 叢集入門 | [Clustering](5-Clustering/README.md) | 清理、準備並可視化資料;叢集介紹 | [Python](5-Clustering/1-Visualize/README.md) • [R](../../5-Clustering/1-Visualize/solution/R/lesson_14.html) | Jen • Eric Wanjau |
| 15 | 探索奈及利亞音樂喜好 🎧 | [Clustering](5-Clustering/README.md) | 探索 K-Means 叢集演算法 | [Python](5-Clustering/2-K-Means/README.md) • [R](../../5-Clustering/2-K-Means/solution/R/lesson_15.html) | Jen • Eric Wanjau |
| 16 | 自然語言處理入門 ☕️ | [Natural language processing](6-NLP/README.md) | 透過建立簡易機器人學習 NLP 基礎 | [Python](6-NLP/1-Introduction-to-NLP/README.md) | Stephen |
| 17 | 常見 NLP 任務 ☕️ | [Natural language processing](6-NLP/README.md) | 深入瞭解 NLP,掌握處理語言結構時常見的重要任務 | [Python](6-NLP/2-Tasks/README.md) | Stephen |
| 18 | 翻譯與情緒分析 ♥️ | [Natural language processing](6-NLP/README.md) | 使用 Jane Austen 進行情緒分析與翻譯 | [Python](6-NLP/3-Translation-Sentiment/README.md) | Stephen |
| 19 | 歐洲浪漫旅館 ♥️ | [Natural language processing](6-NLP/README.md) | 旅館評論情緒分析 1 | [Python](6-NLP/4-Hotel-Reviews-1/README.md) | Stephen |
| 20 | 歐洲浪漫旅館 ♥️ | [Natural language processing](6-NLP/README.md) | 旅館評論情緒分析 2 | [Python](6-NLP/5-Hotel-Reviews-2/README.md) | Stephen |
| 21 | 時間序列預測入門 | [Time series](7-TimeSeries/README.md) | 時間序列預測介紹 | [Python](7-TimeSeries/1-Introduction/README.md) | Francesca |
| 22 | ⚡️ 全球用電量 ⚡️ - 使用 ARIMA 的時間序列預測 | [Time series](7-TimeSeries/README.md) | 使用 ARIMA 進行時間序列預測 | [Python](7-TimeSeries/2-ARIMA/README.md) | Francesca |
| 23 | ⚡️ 全球用電量 ⚡️ - 使用 SVR 的時間序列預測 | [Time series](7-TimeSeries/README.md) | 使用支持向量回歸(SVR)進行時間序列預測 | [Python](7-TimeSeries/3-SVR/README.md) | Anirban |
| 24 | 強化學習入門 | [Reinforcement learning](8-Reinforcement/README.md) | 使用 Q-Learning 介紹強化學習 | [Python](8-Reinforcement/1-QLearning/README.md) | Dmitry |
| 25 | 幫助 Peter 避開狼!🐺 | [Reinforcement learning](8-Reinforcement/README.md) | 强化学习 Gym | [Python](8-Reinforcement/2-Gym/README.md) | Dmitry |
| 後記 | 現實世界的機器學習情境與應用 | [ML in the Wild](9-Real-World/README.md) | 傳統機器學習在現實世界中的有趣且富啟發性的應用 | [Lesson](9-Real-World/1-Applications/README.md) | 團隊 |
| 後記 | 使用 RAI 儀表板進行機器學習模型除錯 | [ML in the Wild](9-Real-World/README.md) | 使用 Responsible AI 儀表板元件來進行機器學習模型除錯 | [Lesson](9-Real-World/2-Debugging-ML-Models/README.md) | Ruth Yakubu |
> [在我們的 Microsoft Learn 集合中查找本課程的所有額外資源](https://learn.microsoft.com/en-us/collections/qrqzamz1nn2wx3?WT.mc_id=academic-77952-bethanycheum)
## 離線使用
您可以使用 [Docsify](https://docsify.js.org/#/) 離線瀏覽本文件。將此 repo 分叉,並在本機安裝 [Docsify](https://docsify.js.org/#/quickstart),接著在此 repo 根目錄中輸入 `docsify serve`。網站將在本機的 3000 埠提供服務:`localhost:3000`。
## PDF 檔案
可在 [此處](https://microsoft.github.io/ML-For-Beginners/pdf/readme.pdf) 下載包含連結的課程大綱 PDF。
## 🎒 其他課程
我們團隊還製作其他課程!敬請參考:
### LangChain
[](https://aka.ms/langchain4j-for-beginners)
[](https://aka.ms/langchainjs-for-beginners?WT.mc_id=m365-94501-dwahlin)
[](https://github.com/microsoft/langchain-for-beginners?WT.mc_id=m365-94501-dwahlin)
---
### Azure / Edge / MCP / Agents
[](https://github.com/microsoft/AZD-for-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/edgeai-for-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/mcp-for-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/ai-agents-for-beginners?WT.mc_id=academic-105485-koreyst)
---
### 生成式 AI 系列
[](https://github.com/microsoft/generative-ai-for-beginners?WT.mc_id=academic-105485-koreyst)
[-9333EA?style=for-the-badge&labelColor=E5E7EB&color=9333EA)](https://github.com/microsoft/Generative-AI-for-beginners-dotnet?WT.mc_id=academic-105485-koreyst)
[-C084FC?style=for-the-badge&labelColor=E5E7EB&color=C084FC)](https://github.com/microsoft/generative-ai-for-beginners-java?WT.mc_id=academic-105485-koreyst)
[-E879F9?style=for-the-badge&labelColor=E5E7EB&color=E879F9)](https://github.com/microsoft/generative-ai-with-javascript?WT.mc_id=academic-105485-koreyst)
---
### 核心學習
[](https://aka.ms/ml-beginners?WT.mc_id=academic-105485-koreyst)
[](https://aka.ms/datascience-beginners?WT.mc_id=academic-105485-koreyst)
[](https://aka.ms/ai-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/Security-101?WT.mc_id=academic-96948-sayoung)
[](https://aka.ms/webdev-beginners?WT.mc_id=academic-105485-koreyst)
[](https://aka.ms/iot-beginners?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/xr-development-for-beginners?WT.mc_id=academic-105485-koreyst)
---
### Copilot 系列
[](https://aka.ms/GitHubCopilotAI?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/mastering-github-copilot-for-dotnet-csharp-developers?WT.mc_id=academic-105485-koreyst)
[](https://github.com/microsoft/CopilotAdventures?WT.mc_id=academic-105485-koreyst)
## 尋求協助
如果你遇到困難或對構建 AI 應用程式有任何疑問。加入其他學習者及經驗豐富的開發者,一同參與 MCP 的討論。這是一個支援性的社群,歡迎提問並自由分享知識。
[](https://discord.gg/nTYy5BXMWG)
如果你有產品反饋或在開發時遇到錯誤,請造訪:
[](https://aka.ms/foundry/forum)
## 額外學習提示
- 每課後檢閱筆記本,以加深理解。
- 練習自行實作算法。
- 使用已學概念探索真實世界數據集。
---
**免責聲明**:
本文件係使用 AI 翻譯服務 [Co-op Translator](https://github.com/Azure/co-op-translator) 翻譯而成。雖然我們致力於確保準確性,但請注意自動翻譯可能存在錯誤或不準確之處。原始文件之母語版本應視為權威資料。對於重要資訊,建議採用專業人工翻譯。我們不對因使用本翻譯而引致的任何誤解或誤釋負責。