Skip to Content
Bad Data 技術手冊
book

Bad Data 技術手冊

by Q. Ethan McCallum
September 2013
Intermediate to advanced
264 pages
5h
Chinese
GoTop Information, Inc.
Content preview from Bad Data 技術手冊
94
|
第六章:在矛盾的線上評論中偵測謊言以及混亂的狀況
除非你很想要知道這些程式碼是如何運作,或是想要使用客製化的特徵值抽出方法,要
不然我強烈的建議在嘗試建立以 NLTK 為基礎的客製化分類器,或是任何的 NLTK 模型
之前,先嘗試這些套件。
驗證分類器
回到情緒分類器:不論統計是如何說,這些年來我學到的是,不要完全相信訓練模型以
及它們的輸入資料。除非每個訓練實體都被三個專業的評論者親眼看過,要不然你便能
夠假設在訓練資料中會擁有一些雜訊以及不準確的狀況。所以當我訓練好了一個應該要
是很準確的情緒分類器時,我會將它用在我的訓練語料庫上,來看看我是否能夠發現被
該分類器分錯的評論。我的目標是想要理解分類器是哪裡出了錯,並且或許也能夠得到
一些要如何調整訓練參數而有更好結果的靈感。讓我驚訝的是,我發現有一則評論是被
分類在
neg
之下,但其實它是在 pos 5 顆星的分類中:
它很吵且一杯酒的價錢太貴。這是它唯一的缺點,因為它很好。
被分類在
pos
之下,但其實是在 neg 1 顆星的分類中的評論如下:
在紐約中,其中一個最佳的享受浪漫夜晚的地點。在合理的價位下擁有非常
好的食物以及服務。
我們愛它!服務生很棒、上菜速度很快而且又好吃。我們給 5 顆星!
結果,分類器在偵測情緒上,反而比用來建立訓練語料庫的評分還要準確!顯然的,其
中一個人們在線上做的怪事,就是撰寫與評分完全相反的評論。當我們試圖建立一個情
緒分類器時,我也意外的建立了一個辨識說謊以及混亂狀況的方法。以下便是一些說謊
者的 1 顆星評論: ...
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.

Read now

Unlock full access

More than 5,000 organizations count on O’Reilly

AirBnbBlueOriginElectronic ArtsHomeDepotNasdaqRakutenTata Consultancy Services

QuotationMarkO’Reilly covers everything we've got, with content to help us build a world-class technology community, upgrade the capabilities and competencies of our teams, and improve overall team performance as well as their engagement.
Julian F.
Head of Cybersecurity
QuotationMarkI wanted to learn C and C++, but it didn't click for me until I picked up an O'Reilly book. When I went on the O’Reilly platform, I was astonished to find all the books there, plus live events and sandboxes so you could play around with the technology.
Addison B.
Field Engineer
QuotationMarkI’ve been on the O’Reilly platform for more than eight years. I use a couple of learning platforms, but I'm on O'Reilly more than anybody else. When you're there, you start learning. I'm never disappointed.
Amir M.
Data Platform Tech Lead
QuotationMarkI'm always learning. So when I got on to O'Reilly, I was like a kid in a candy store. There are playlists. There are answers. There's on-demand training. It's worth its weight in gold, in terms of what it allows me to do.
Mark W.
Embedded Software Engineer

You might also like

RxJava反应式编程

RxJava反应式编程

Tomasz Nurkiewicz, Ben Christensen
高效能PYTHON程式設計

高效能PYTHON程式設計

Micha Gorelick, Ian Ozsvald
Kubernetes编程

Kubernetes编程

Michael Hausenblas, Stefan Schimanski

Publisher Resources

ISBN: 9789862768952