Nuutthapachr Sethasathien

Nuutthapachr Sethasathien

Data Scientist Expert Government Big Data institute (GBDi)

บทความของผู้เขียน

Articles

Author Category Post Filter
การใช้งาน ChatGPT เพื่อเขียนบทความ: สร้างเนื้อหามากมายได้อย่างรวดเร็วได้ใน 5 ขั้นตอน
ChatGPT เป็นเทคโนโลยีที่ใช้ปัญญาประดิษฐ์ในการสร้างข้อความและบทความในรูปแบบที่คุณต้องการ มาเรียนรู้วิธีใช้ ChatGPT เพื่อเขียนบทความอย่างง่าย ๆ กัน
28 September 2023
SCHEDULING 2: ตั้งเวลา run Python Script บน Windows ด้วย Task Scheduler กัน !
ในบทความนี้ เราจะพาเพื่อน ๆ ไปรู้จักและทดลองใช้ Task Scheduler เครื่องมือที่จะมาช่วยให้เราสามารถตั้งเวลาทำงานของ Python script โดยอัตโนมัติบน Windows กัน
15 August 2022
SCHEDULING: ตั้งเวลา run Python script บน Linux ด้วย CRON กัน !
“จะเป็นไปได้ไหมที่เราจะตั้งเวลา (schedule) ให้โปรแกรม Python ของเรานั้น ทำงานตามกำหนดเวลาโดยอัตโนมัติ” ในบทความนี้ เราจะพาเพื่อน ๆ ไปรู้จักและทดลองใช้ CRON เครื่องมือที่จะมาช่วยให้เราสามารถตั้งเวลาทำงานของ Python script โดยอัตโนมัติบน Linux กัน
4 November 2021
มาทำความรู้จัก Association Rule: เครื่องมือเพื่อการวิเคราะห์ตะกร้าตลาด กัน!
[latexpage] เคยคิดดูไหมว่า “หากเราจะจัดชั้นวางของในห้างสรรพสินค้า จะวางอะไรไว้ใกล้กับอะไรดี”, “หากเรามี online shopping application เราจะแนะนำสินค้าอะไรต่อไปให้ลูกค้าดี” หรือ “หากเราต้องการจะทำโปรโมชั่นแนะนำสินค้า เราจะแนะนำสินค้าอะไรคู่กันดี” Association rule หรือ กฎความสัมพันธ์ เป็นหนึ่งในเครื่องมือเพื่อการวิเคราะห์ตะกร้าตลาด (Market basket analysis) ที่สามารถเข้ามาช่วยตอบคำถามเหล่านี้ได้ Market Basket Analysis หรือ การวิเคราะห์ตะกร้าตลาด เป็นการวิเคราะห์เพื่อค้นหากลุ่มสิ่งของที่น่าจะปรากฎร่วมกันในตะกร้าซื้อขาย โดยผลลัพธ์ที่ได้จะแสดงในรูปของกฎที่บ่งบอกถึงความเป็นไปได้ในการซื้อสินค้าต่าง ๆ ร่วมกัน ในบทความนี้ เราจะมาทำความเข้าใจคำศัพท์ที่สำคัญ และตัววัดประสิทธิภาพที่ใช้กับกฎของความสัมพันธ์กันค่ะ สมมติว่าในร้านค้าของเรามีสินค้าอยู่ 5 ชนิด ได้แก่ ขนมปัง ไข่ เนย น้ำเปล่า และข้าว โดยมีการซื้อขายทั้งหมด 4 ตะกร้า ดังต่อไปนี้ ซึ่งสามารถเขียนแทนด้วยตารางข้างล่าง สินค้า ตะกร้าที่ (Transaction ID) 1 2 3 4 ขนมปัง 1 1 1 ไข่ 1 1 เนย 1 1 น้ำเปล่า 1 1 1 ข้าว 1 คำศัพท์สำคัญ (Key terms) เป้าหมายของการทำ Market basket analysis คือ เพื่อค้นหากลุ่มของสินค้าที่มีความสัมพันธ์กัน จึงเป็นการดีหากเราสามารถแทนคำศัพท์สำคัญที่เกี่ยวข้องนี้ (กลุ่มของสินค้า และ ความสัมพันธ์ระหว่างกลุ่มของสินค้า) ด้วยสัญลักษณ์ทางคณิตศาสตร์ ตัววัดประสิทธิภาพ (Metrics) จะเห็นได้ว่าสินค้าที่มีในร้านเพียงไม่กี่ชนิด สามารถสร้าง itemsets และ rules ได้หลากหลายรูปแบบ (สินค้าเพียง 5 ชนิดสามารถสร้าง itemsets ได้ถึง 31 รูปแบบ และสร้าง rules ได้ถึง 180 รูปแบบ) อันที่จริงจำนวนรูปแบบของ itemsets และ rules ที่เป็นไปได้ทั้งหมดเติบโตแบบ exponential เมื่อเทียบกับจำนวนสินค้าภายในร้านเลยทีเดียว [Tan, Steinbach & Kumar, 2006] อย่างไรก็ตาม ไม่ใช่ว่าทุกรูปแบบของ itemsets หรือ rules ที่มีความสำคัญ ตัววัดประสิทธิภาพที่ใช้ในการค้นหาความสัมพันธ์ (association mining) ที่มีความสำคัญจริง ๆ มีอยู่ด้วยกัน 3 ตัว 1 Support Support เป็นตัววัดประสิทธิภาพสำหรับ itemset โดยเป็นตัวเลขที่แสดงสัดส่วนของจำนวนตะกร้าการซื้อขายที่มี itemset ต่อจำนวนตะกร้าการซื้อขายทั้งหมด หรือกล่าวได้ว่า “มีการซื้อขายที่มี itemset อยู่ด้วยเป็นสัดส่วนเท่าไหร่ ในการซื้อขายทั้งหมด” หากเขียนในรูปแบบสมการทางคณิตศาสตร์จะได้ว่า Support(Itemset) $=$ จำนวนตะกร้าซื้อขายที่มี itemset จำนวนตะกร้าซื้อขายทั้งหมด ในตัวอย่างร้านค้าของเรา หากพิจารณา Itemset = {ขนมปัง} จะได้ว่า Support({ขนมปัง}) = 3/4 = 0.75 Support เป็นปราการด่านแรกที่ช่วยตัดจำนวน rules ที่จะเกิดขึ้นให้น้อยลง โดยจะคัดเลือกเฉพาะ itemsetที่มีค่า support มากกว่า minimum support threshold (ตัวเลขนี้ขึ้นอยู่กับโจทย์ปัญหาและประสบการณ์ของนักวิทยาศาสตร์ข้อมูล) ทั้งนี้ เนื่องจาก การที่กลุ่มของสินค้า (itemset) ใด ๆ มีสัดส่วนการปรากฏตัวในตะกร้าซื้อขายน้อยเกินไป ทำให้เรามีข้อมูลไม่เพียงพอที่จะสรุปความสัมพันธ์ของสินค้าภายในกลุ่มนั้น ๆ จึงตัดกลุ่มของสินค้า (itemset) นั้นออกจากการพิจารณาที่จะนำไปสร้าง rules จากกรณีตัวอย่าง หากเรากำหนด minimum support threshold = 0.5 และคัดเลือกเฉพาะ itemsets ที่มีค่า support มากกว่าหรือเท่ากับค่านั้น พิจารณากรณี itemset ที่มีสมาชิก 1 ตัว ข้าวจะถูกตัดออกไป เนื่องจาก support({ข้าว}) = 0.25 ซึ่งน้อยกว่า 0.5 สินค้า ตะกร้าที่ (Transaction ID) Support 1 2 3 4 ขนมปัง 1 1 1 3/4 = 0.75 ไข่ 1 1 2/4 = 0.5 เนย 1 1 2/4 = 0.5 น้ำเปล่า 1 1 1 3/4 = 0.75 ข้าว 1 1/4 = 0.25 หากนำสมาชิกที่เหลือมาพิจารณากรณี itemset ที่มีสมาชิก 2 ตัว จะพบว่าเหลือ itemsets {ขนมปัง, เนย} และ {ขนมปัง, น้ำเปล่า} เท่านั้น ที่มี support >= 0.5 และหากพิจารณาต่อไปยังกรณี itemset ที่มีสมาชิก 3 ตัว จะพบว่าไม่มี itemset ใดเลยที่มี support >=0.5 สินค้า ตะกร้าที่ (Transaction ID) Support 1 2 3 4 ขนมปัง, ไข่ 1 1/4 = 0.25 ขนมปัง, เนย 1 1 2/4 = 0.5 ขนมปัง,...
7 June 2021
ติดตั้ง CKAN ไม่ได้ยากอย่างที่คิด !
ในบทความนี้ เราจะมาลองติดตั้ง Data Catalog เพื่อทดลองใช้งานกัน โดยใช้ CKAN ซึ่งเป็น Open source สำหรับการทำ Open Data Portal ที่ถูกใช้โดยรัฐบาลและหน่วยงานมากมายทั่วโลก
9 February 2021
PDPA Icon

We use cookies to optimize your browsing experience and improve our website’s performance. Learn more at our Privacy Policy and adjust your cookie settings at Settings

Privacy Preferences

You can choose your cookie settings by turning on/off each type of cookie as needed, except for necessary cookies.

Accept all
Manage Consent Preferences
  • Strictly Necessary Cookies
    Always Active

    This type of cookie is essential for providing services on the website of the Personal Data Protection Committee Office, allowing you to access various parts of the site. It also helps remember information you have previously provided through the website. Disabling this type of cookie will result in your inability to use key services of the Personal Data Protection Committee Office that require cookies to function.
    Cookies Details

  • Performance Cookies

    This type of cookie helps the Big Data Institute (Public Organization) understand user interactions with its website services, including which pages or areas of the site are most popular, as well as analyze other related data. The Big Data Institute (Public Organization) also uses this information to improve website performance and gain a better understanding of user behavior. Although the data collected by these cookies is non-identifiable and used solely for statistical analysis, disabling them will prevent the Big Data Institute (Public Organization) from knowing the number of website visitors and from evaluating the quality of its services.

  • Functional Cookies

    This type of cookie enables the Big Data Institute (Public Organization)’s website to remember the choices you have made and deliver enhanced features and content tailored to your usage. For example, it can remember your username or changes you have made to font sizes or other customizable settings on the page. Disabling these cookies may result in the website not functioning properly.

  • Targeting Cookies

    "This type of cookie helps the Big Data Institute (Public Organization) understand user interactions with its website services, including which pages or areas of the site are most popular, as well as analyze other related data. The Big Data Institute (Public Organization) also uses this information to improve website performance and gain a better understanding of user behavior. Although the data collected by these cookies is non-identifiable and used solely for statistical analysis, disabling them will prevent the Big Data Institute (Public Organization) from knowing the number of website visitors and from evaluating the quality of its services.

Save settings
This site is registered on wpml.org as a development site. Switch to a production site key to remove this banner.