This repository contains materials for a lecture in Thailand titled “A Practical Guide to Spectral Analysis from Fundamentals to Applications.”
Topics include Python-based data analysis, chemometrics, machine learning, and hyperspectral imaging.
The content is based on the Japanese book "Spectral Analysis Practical Guide" by Tetsuya Inagaki, Nagoya University.
Chapters:
- Chapter 1: Fundamentals of Spectral Analysis
- Chapter 2: Introduction to Python Programming
- Chapter 3: Basic Statistics with Python
- Chapter 4: Linear Algebra with Python
- Chapter 5: Effective Use of ChatGPT
- Chapter 6: Basics of Chemometrics
- Chapter 7: Applied Chemometrics
- Chapter 8: Preprocessing of Spectral Data
- Chapter 9: Introduction to Machine Learning
- Chapter 10: Practical Spectral Manipulation
- Chapter 11: Chemometrics and Machine Learning in Practice
- Chapter 12: Hyperspectral Imaging Data Analysis
dataChapter03,dataChapter04, ...,dataChapter12: Data for corresponding chapters
All files are named using the format: SpeAna(ChapterNumber)_(SectionNumber)_Description.ipynb.
Below is a summary of each file:
SpeAna00_tips.ipynb: Tips on file conversion and LLM usageSpeAna02_3-4_basic.ipynb: Chapter 2, Sections 3–4 — Fundamentals of PythonSpeAna03_1-10_statistcs.ipynb: Chapter 3, Sections 1–10 — Basic statistics and implementation in PythonSpeAna04_1-3_linearalgebraANDdataframe.ipynb: Chapter 4, Sections 1–3 — Linear algebra and DataFrame handlingSpeAna06_1_CLSandILS.ipynb: Chapter 6, Section 1 — Classical Least Squares (CLS) and Inverse Least Squares (ILS)SpeAna07_1_PCA.ipynb: Chapter 7, Section 1 — Principal Component Analysis (PCA)SpeAna07_2_PLS.ipynb: Chapter 7, Section 2 — Partial Least Squares Regression (PLS)SpeAna08_1-4_pretreatment.ipynb: Chapter 8, Sections 1–4 — Preprocessing of spectral dataSpeAna08_5_modules.ipynb: Chapter 8, Section 5 — How to use Python modulesSpeAna09_1-6_machinelearning.ipynb: Chapter 9, Sections 1–6 — Applications of machine learningSpeAna10_1-9_practicaluse.ipynb: Chapter 10, Sections 1–9 — Practical spectral manipulation techniquesSpeAna11_1-6_practicaluse.ipynb: Chapter 11, Sections 1–6 — Practical applications of chemometrics and machine learningSpeAna12_1_Imaging.ipynb: Chapter 12, Section 1 — Applications to imaging data
Use the requirements.txt file:
cd C:\Users\YourUsername\Documents\PythonProjects\MyProject
pip install -r requirements.txtrequirements.txt
After downloading this file, open the Anaconda Prompt and navigate to the directory where therequirements.txtfile is located.
For example, suppose the file is located inC:\Users\YourUsername\Documents\PythonProjects\MyProject.
You can install the listed libraries by following these steps:
-
Open the Anaconda Prompt and use the
cdcommand to move to the directory containingrequirements.txt:
cd C:\Users\USERNAME\Documents\PythonProjects\MyProject -
Run the following command to install all libraries listed in the file:
pip install -r requirements.txt
Click the green < > Code button on the top right of this page and select Download ZIP.
Ensure Python 3.x and all required libraries are installed.
Open files starting with SpeAna in Jupyter Notebook to run the code.
Please contact:
inatetsu@agr.nagoya-u.ac.jp
ที่เก็บนี้ประกอบด้วยเนื้อหาสำหรับการบรรยายในประเทศไทยในหัวข้อ “คู่มือการวิเคราะห์สเปกตรัมเชิงปฏิบัติ ตั้งแต่พื้นฐานถึงการประยุกต์ใช้”
หัวข้อครอบคลุมการวิเคราะห์ข้อมูลด้วย Python, เคโมเมตริกส์, การเรียนรู้ของเครื่อง และการประยุกต์ใช้กับภาพไฮเปอร์สเปกตรัม
เนื้อหานี้อ้างอิงจากหนังสือภาษาญี่ปุ่นชื่อ "Spectral Analysis Practical Guide" โดย ศ. Tetsuya Inagaki จากมหาวิทยาลัยนาโกย่า
สารบัญบท:
- บทที่ 1: พื้นฐานของการวิเคราะห์สเปกตรัม
- บทที่ 2: บทนำเกี่ยวกับการเขียนโปรแกรม Python
- บทที่ 3: สถิติพื้นฐานด้วย Python
- บทที่ 4: พีชคณิตเชิงเส้นด้วย Python
- บทที่ 5: การใช้ ChatGPT อย่างมีประสิทธิภาพ
- บทที่ 6: พื้นฐานของเคโมเมตริกส์
- บทที่ 7: เคโมเมตริกส์ขั้นประยุกต์
- บทที่ 8: การเตรียมข้อมูลสเปกตรัมเบื้องต้น
- บทที่ 9: พื้นฐานของการเรียนรู้ของเครื่อง
- บทที่ 10: การประมวลผลสเปกตรัมเชิงปฏิบัติ
- บทที่ 11: เคโมเมตริกส์และการเรียนรู้ของเครื่องเชิงปฏิบัติ
- บทที่ 12: การวิเคราะห์ข้อมูลภาพไฮเปอร์สเปกตรัม
dataChapter03,dataChapter04, ...,dataChapter12: ข้อมูลที่ใช้ในแต่ละบท
ไฟล์ทั้งหมดถูกตั้งชื่อตามรูปแบบ: SpeAna(ChapterNumber)_(SectionNumber)_Description.ipynb
ด้านล่างนี้คือสรุปเนื้อหาของแต่ละไฟล์:
SpeAna00_tips.ipynb: เคล็ดลับเกี่ยวกับการแปลงไฟล์และการใช้งาน LLMSpeAna02_3-4_basic.ipynb: บทที่ 2 ตอนที่ 3–4 — พื้นฐานของภาษา PythonSpeAna03_1-10_statistcs.ipynb: บทที่ 3 ตอนที่ 1–10 — สถิติพื้นฐานและการใช้งานด้วย PythonSpeAna04_1-3_linearalgebraANDdataframe.ipynb: บทที่ 4 ตอนที่ 1–3 — พีชคณิตเชิงเส้นและการใช้งาน DataFrameSpeAna06_1_CLSandILS.ipynb: บทที่ 6 ตอนที่ 1 — การถดถอยแบบ Classical Least Squares (CLS) และ Inverse Least Squares (ILS)SpeAna07_1_PCA.ipynb: บทที่ 7 ตอนที่ 1 — การวิเคราะห์องค์ประกอบหลัก (PCA)SpeAna07_2_PLS.ipynb: บทที่ 7 ตอนที่ 2 — การถดถอยแบบ Partial Least Squares (PLS)SpeAna08_1-4_pretreatment.ipynb: บทที่ 8 ตอนที่ 1–4 — การเตรียมข้อมูลสเปกตรัมเบื้องต้นSpeAna08_5_modules.ipynb: บทที่ 8 ตอนที่ 5 — การใช้งานโมดูลของ PythonSpeAna09_1-6_machinelearning.ipynb: บทที่ 9 ตอนที่ 1–6 — การประยุกต์ใช้การเรียนรู้ของเครื่องSpeAna10_1-9_practicaluse.ipynb: บทที่ 10 ตอนที่ 1–9 — เทคนิคการจัดการสเปกตรัมในทางปฏิบัติSpeAna11_1-6_practicaluse.ipynb: บทที่ 11 ตอนที่ 1–6 — การประยุกต์ใช้เคโมเมตริกส์และการเรียนรู้ของเครื่องในทางปฏิบัติSpeAna12_1_Imaging.ipynb: บทที่ 12 ตอนที่ 1 — การประยุกต์ใช้กับข้อมูลภาพ
ใช้ไฟล์ requirements.txt ดังนี้:
cd C:\Users\YourUsername\Documents\PythonProjects\MyProject
pip install -r requirements.txtหลังจากดาวน์โหลดไฟล์นี้ ให้เปิด Anaconda Prompt และไปยังโฟลเดอร์ที่เก็บไฟล์ requirements.txt
ตัวอย่างเช่น หากไฟล์อยู่ที่ C:\Users\YourUsername\Documents\PythonProjects\MyProject
คุณสามารถติดตั้งไลบรารีทั้งหมดที่ระบุไว้ได้โดยทำตามขั้นตอนนี้:
-
เปิด Anaconda Prompt และใช้คำสั่ง
cdเพื่อไปยังไดเรกทอรีที่มีไฟล์:cd C:\Users\USERNAME\Documents\PythonProjects\MyProject -
รันคำสั่งต่อไปนี้เพื่อติดตั้งไลบรารีทั้งหมดที่ระบุไว้ในไฟล์:
pip install -r requirements.txt
คลิกปุ่มสีเขียว < > Code ที่มุมขวาบนของหน้านี้ แล้วเลือก Download ZIP
ตรวจสอบให้แน่ใจว่าได้ติดตั้ง Python 3.x และไลบรารีที่จำเป็นทั้งหมดแล้ว
เปิดไฟล์ที่ขึ้นต้นด้วย SpeAna ใน Jupyter Notebook เพื่อรันโค้ด
กรุณาติดต่อ:
inatetsu@agr.nagoya-u.ac.jp