ThailandDataFabric-Academy/ms-fabric-data-science
Hands-on Microsoft Fabric Data Science labs (FreshMart churn) with Thai study notes, PySpark/MLflow, and DP-604-aligned learning path.
Featured achievements
The project's latest awards
#1 Repository of the week
#1 Repository of the week
#1 Repository of the week
Microsoft Fabric Data Science — FreshMart Labs
Repository ชุดปฏิบัติการวิทยาศาสตร์ข้อมูลบน Microsoft Fabric ผ่านกรณีศึกษา FreshMart Customer Churn (ภารกิจกู้วิกฤตยอดขาย ทำนายลูกค้าที่จะเลิกซื้อ เพื่อส่งแคมเปญรักษาลูกค้าได้ทันเวลา)
- กลุ่มเป้าหมาย: นักวิเคราะห์ข้อมูล (Data Analyst) และผู้สนใจที่ต้องการเข้าใจวงจรงานวิทยาศาสตร์ข้อมูลบน Fabric ครบวงจร
- หลักสูตรอ้างอิง: Implement a data science and machine learning solution for AI in Microsoft Fabric (พร้อมเนื้อหาสไลด์ภาษาไทยฉบับ Instructor Edition)
[!CAUTION] ทางเลือกฉุกเฉินเมื่อใช้ Fabric Capacity ไม่ได้: ใช้แทร็ก Azure Machine Learning ที่ labs-azureml/README.md
ชุดแล็บ Fabric ในlabs/ไม่ถูกแก้และไม่ถูกแทนที่ — เมื่อ Capacity กลับมาให้กลับไปใช้ labs/README.md
flowchart TD
subgraph S1 ["1. รับไฟล์ข้อมูลต้นทาง (Source Landing Zone)"]
CSV["📄 <b>ไฟล์ข้อมูลต้นทาง (Files/raw/)</b><br/>freshmart_transactions.csv (3,000 แถว) & customers.csv (1,500 แถว)"]
end
subgraph S2 ["2. OneLake & Medallion Architecture (Lakehouse)"]
B["🥉 <b>Bronze Schema</b><br/>ตาราง Delta ชั้นต้นทาง bronze.transactions & customers (Lab 0)"]
S["🥈 <b>Silver Schema</b><br/>ตารางฟีเจอร์ silver.customer_features (Lab 2: Data Wrangler)"]
B -->|ทำความสะอาด & สเกลฟีเจอร์| S
end
subgraph S3 ["3. การเรียนรู้ของเครื่อง (Data Science & MLflow)"]
EXP["🧪 <b>MLflow Experiment: freshmart-churn</b><br/>เปรียบเทียบ Decision Tree (AUC ≈ 0.77) vs Random Forest (AUC ≈ 0.86 ⭐)"]
REG["🏆 <b>Model Registry: freshmart-churn-model</b><br/>ลงทะเบียนเวอร์ชัน Champion พร้อม Model Signature (Lab 3)"]
EXP -->|คัดเลือกโมเดลที่ดีที่สุด| REG
end
subgraph S4 ["4. ปฏิบัติการทางธุรกิจ (Serving & Power BI)"]
PRED["⚡ <b>ฟังก์ชัน PREDICT (ประมวลผลบน Spark)</b><br/>ทำนายลูกค้าชุดใหม่ 200 รายจาก freshmart_scoring_batch.csv (Lab 4)"]
G["🥇 <b>Gold Schema</b><br/>ตารางผลลัพธ์ gold.freshmart_predictions"]
PBI["📊 <b>Power BI Dashboard (Direct Lake)</b><br/>ชี้เป้าลูกค้าเสี่ยง Churn ส่งต่อทีมการตลาดออกโปรโมชั่นรักษาลูกค้า"]
PRED --> G
G --> PBI
end
CSV --> B
S -->|แบ่งข้อมูล Train / Test| EXP
REG -->|โหลดโมเดล Champion| PRED
S -.->|พารามิเตอร์ฟีเจอร์| PRED
classDef stage fill:#f8fafc,stroke:#475569,stroke-width:2px,color:#0f172a;
classDef raw fill:#ffffff,stroke:#64748b,stroke-width:1.5px,color:#0f172a;
classDef silver fill:#f0fdf4,stroke:#16a34a,stroke-width:1.5px,color:#14532d;
classDef ml fill:#eff6ff,stroke:#2563eb,stroke-width:1.5px,color:#1e3a8a;
classDef champion fill:#fef3c7,stroke:#d97706,stroke-width:2px,color:#78350f;
classDef gold fill:#fffbeb,stroke:#b45309,stroke-width:2px,color:#78350f;
classDef pbi fill:#faf5ff,stroke:#9333ea,stroke-width:2px,color:#581c87;
class S1,S2,S3,S4 stage;
class CSV,B raw;
class S silver;
class EXP ml;
class REG champion;
class PRED,G gold;
class PBI pbi;
โครงการ (Project)
| รายการ | รายละเอียด |
|---|---|
| License | MIT |
| Status | Active — พร้อมใช้งานทั้งการเรียนรู้ด้วยตนเองและประกอบการอบรม |
| Releases | Latest release · All tags |
| Topics | Microsoft Fabric, MLflow, PySpark, Medallion Architecture, Customer Churn, Power BI Direct Lake |
| เริ่มต้นศึกษา | รายละเอียด | ลิงก์ |
|---|---|---|
| Docs ทฤษฎีและแนวคิด | ปูพื้นฐานสถาปัตยกรรม Fabric, วงจร Data Science, และเครื่องมือ | docs/README.md |
| อภิธานศัพท์ (Glossary) | รวบรวมคำศัพท์เทคนิคพร้อมคำอธิบายภาษาไทยที่เข้าใจง่าย | docs/glossary.md |
| Labs ลงมือปฏิบัติจริง | คู่มือและ Notebook ตั้งแต่ Lab 0 ถึง Lab 4 | labs/README.md |
| Labs Azure ML (ฉุกเฉิน) | แทร็กสำรองเมื่อไม่มี Fabric Capacity — อย่าแตะไฟล์ใน labs/ | labs-azureml/README.md |
[!NOTE] เส้นทางผู้เรียน: ศึกษาเอกสารความรู้ใน docs ตามลำดับโมดูล จากนั้นเปิดใช้งาน Fabric Trial ของตนเอง สร้าง workspace (แนะนำชื่อ
labs) — โดยไม่ต้องเชิญผู้อื่นเข้า — แล้วgit clonerepository นี้เพื่อนำเข้า Notebook ในlabs/notebooks/และแนบ Lakehouselh_freshmartที่สร้างขึ้น
ตรวจสอบความพร้อมของแล็บ (Local Verification)
สามารถทดสอบ pipeline ทั้งหมดบนเครื่องของคุณได้ทันทีโดยไม่ต้องต่อ Fabric:
pip install -r labs/requirements-test.txt
pytest labs/tests -v
python labs/scripts/run_local_pipeline.py
เมื่อการทดสอบผ่านเรียบร้อย ให้เริ่มทำตามคู่มือใน labs/instructions/ บน Microsoft Fabric ได้ทันที
Similar Projects
Discover other similar projects and AI models.
12 weeks, 26 lessons, 52 quizzes, classic Machine Learning for all
Learn how to develop, deploy and iterate on production-grade ML applications.
Unified Data Foundation with Microsoft Fabric with Options to Integrate with Azure Databricks and Microsoft Purview
Streamlit — The agent-native framework for data apps and dashboards.
Build and share delightful machine learning apps, all in Python. 🌟 Star to support our work!