Sentiment Analysis

Athip To-adithep
Nov 2 · 2 min read

การวิเคราะห์ความรู้สึก คือการดูจิตวิทยาของตลาด วิเคราะห์อารมณ์ของตลาดจากแหล่งข้อมูลต่างๆที่เทรดเดอร์ทั่วโลกติดตามกันอยู่ เป็นการวิเคราะห์ถึง Market Sentiment หรือ อารมณ์ตลาด คืออารมณ์ของนักลงทุนที่มีต่อหุ้นทั้งตลาดโดยรวม

เรามาลองสร้างโมเดลและเทรนโมเดลกันเลยครับ

ทำการ import library ที่สำคัญมาใช้ และ load data

ดูการสรุปของข้อมูลที่เรา load data มา

ทดลองตัดคำ และหาความยาวของประโยค

ทำให้ข้อมูลเป็น onehot

เมื่อเราปริ้น onehot จะได้เป็นตัวเลขมา

เปลี่ยนตัวเลขเป็นตัวหนังสือเพื่อนำไปใช้กับโมเดลของเรา

สร้างโมเดล

ทำการเทรนโมเดลของเรา

ผลลัพธ์ยังไม่ค่อยดีนัก ขอบคุณทุกคนที่เข้ามาอ่านครับ

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade