# Machine learning type

การเรียนรู้ของเครื่องจักร หรือ Machine learning (ML) นั้นคือการนำชุดข้อมูลต่างๆป้อนเข้าไปยังอัลกอริทึมส์ที่เรากำหนดไว้ เพื่อให้เครื่องนั้นเกิดการเรียนรู้ขึ้นโดยการเรียนรู้ที่จะเกิดขึ้นนั้น โดยการสอนให้เครื่องเราเรียนรู้ได้นั้นจะแบ่งออกเป็น 3 ประเภทคือ

* Supervised Machine Learning
* Unsupervised Machine Learning
* Reinforcement Learning

### Supervised Machine Learning

การสอนแบบมีการชี้นำ (Supervised) การสอน ML แบบนี้ชุดข้อมูลของเรานั้นจะประกอบไปด้วยคำตอบของโจทย์นั้นอยู่แล้ว เช่น การประเมินว่าผู้ป่วยเป็นเบาหวานหรือไม่ ข้อมูลประกอบด้วยตัวแปร น้ำหนัก ส่วนสูง อายุ ระดับน้ำตาลในเลือด และ BMI ข้อมูลนั้นจะต้องมีข้อมูลประกอบให้อีกด้วยว่าคนๆนี้เป็นเบาหวานหรือไม่ หรือเรียกได้ว่าแนบเฉลยมาด้วยนั่นเอง

<figure><img src="https://miro.medium.com/proxy/1*qnLIIcszIo2xBwI3LKcjSQ.png" alt=""><figcaption><p>machine learning cat vs dog</p></figcaption></figure>

โดยในส่วนของ Supervised Machine Learning นั้นจะมีส่วนย่อยออกมาอีกสองข้อคือ

* Classification
* Regression

classification

ในส่วนนี้จะเป็นการสอน ML ของเราให้รู้จักสิ่งต่างๆ โดยแบ่งให้เป็นประเภท(class) โดยใช้อัลกอริทึมส์ต่างๆ ช่วยแบ่งข้อมูลของเราออกเป็นส่วนๆเพื่อให้เครื่องของเราสามารถตอบกลับมาได้ว่า ถูก หรือ ผิด, ใช่ หรือ ไม่ใช่, กล้วย ส้ม หรือ แอปเปิ้ล ตัวอย่างที่เราเห็นการใช้งาน ML แบบนี้คือ Email ของเราที่สามารถแบ่งแยก spam ออกจากเมลปกติได้&#x20;

<figure><img src="https://miro.medium.com/max/1400/1*Fm58r_RQ53sEHfwFa28LpA.png" alt=""><figcaption></figcaption></figure>

อัลกอริทึมส์ที่นิยมใช้ในการทำ classification เช่น

* Random Forest Algorithm
* Decision Tree Algorithm
* Logistic Regression Algorithm
* Support Vector Machine Algorithm

\
Regression

ในส่วนนี้จะเป็นการสอน ML ของเราให้ทำนายสิ่งต่างๆ โดยการประมาณค่าด้วยอัลกอริทึมส์ แต่เช่นเดียวกับการทำ classification ข้อมูลที่เราจะนำมาให้เครื่องของเราทำนาย จำเป็นต้องแนบเฉลยออกมาให้ด้วย การทำ Regression ส่วนใหญ่นั้นจะเป็นการประมาณค่าต่างๆ เช่น ทำนายค่าไฟที่จะใช้ในเดือนหน้า ทำนายราคาตลาด ทำนายสภาพอากาศ โดยข้อมูลที่ทำนายจะมาจากข้อมูลที่เคยเรียนรู้แล้วมาอ้างอิงเท่านั้น

<figure><img src="https://t3.ftcdn.net/jpg/04/46/40/38/360_F_446403857_lPPoTW7uIXfkwzMXbpbMIWwOsNwY4oAl.jpg" alt=""><figcaption></figcaption></figure>

อัลกอริทึมส์ที่นิยมใช้ในการทำ Regression เช่น

* Simple Linear Regression Algorithm
* Multivariate Regression Algorithm
* Decision Tree Algorithm
* Lasso Regression

อ้างอิง: [\
\
https://www.coursera.org/articles/types-of-machine-learning\
\
https://www.javatpoint.com/types-of-machine-learning](https://www.coursera.org/articles/types-of-machine-learninghttps://www.javatpoint.com/types-of-machine-learning)

Last update: May 2023

Author: Thanaluk Pranekunakol (AIC-Researcher)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.aic-eec.com/artificial-intelligence-ai/machine-learning/machine-learning-type.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
