Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Machine Learning and Sentiment Classification i...
Search
Matt D.
May 30, 2011
Programming
1
1k
Machine Learning and Sentiment Classification in Ruby
Matt D.
May 30, 2011
Tweet
Share
Other Decks in Programming
See All in Programming
Software Architecture
hschwentner
6
2.3k
Reactive Thinking with Signals and the Resource API
manfredsteyer
PRO
0
100
Devoxx BE - Local Development in the AI Era
kdubois
0
130
デミカツ切り抜きで面倒くさいことはPythonにやらせよう
aokswork3
0
260
Webサーバーサイド言語としてのRustについて
kouyuume
1
4.2k
開発組織の戦略的な役割と 設計スキル向上の効果
masuda220
PRO
7
1.2k
コード生成なしでモック処理を実現!ovechkin-dm/mockioで学ぶメタプログラミング
qualiarts
0
250
AI駆動で0→1をやって見えた光と伸びしろ
passion0102
1
780
Go言語の特性を活かした公式MCP SDKの設計
hond0413
1
450
品質ワークショップをやってみた
nealle
0
610
AI Coding Meetup #3 - 導入セッション / ai-coding-meetup-3
izumin5210
0
3.4k
理論と実務のギャップを超える
eycjur
0
170
Featured
See All Featured
How to Create Impact in a Changing Tech Landscape [PerfNow 2023]
tammyeverts
55
3k
Optimising Largest Contentful Paint
csswizardry
37
3.5k
jQuery: Nuts, Bolts and Bling
dougneiner
65
7.9k
Keith and Marios Guide to Fast Websites
keithpitt
411
23k
Responsive Adventures: Dirty Tricks From The Dark Corners of Front-End
smashingmag
253
22k
Principles of Awesome APIs and How to Build Them.
keavy
127
17k
The Invisible Side of Design
smashingmag
302
51k
The Success of Rails: Ensuring Growth for the Next 100 Years
eileencodes
46
7.7k
Stop Working from a Prison Cell
hatefulcrawdad
271
21k
How to train your dragon (web standard)
notwaldorf
97
6.3k
Designing for Performance
lara
610
69k
A designer walks into a library…
pauljervisheath
209
24k
Transcript
.BDIJOF -FBSOJOH BOE 4FOUJNFOU $MBTTJGJDBUJPO JO 3VCZ by Matt Drozdzynski
@matid
None
.BDIJOF -FBSOJOH … or how to teach your computer to
do back flips for you.
4FOUJNFOU $MBTTJGJDBUJPO … or how to quantify people’s opinions.
#euruko is definitely the most amazing Ruby conference ever!
I’ve been to many dreadful conferences, but #euruko is certainly
not one of them.
Ruby is a true delight compared to how horrendous Java
can be.
d JO 3VCZ
None
None
%BUB (BUIFSJOH
None
None
-BOHVBHF "DDVSBDZ 0% 25% 50% 75% 100% 2007 English Spanish
German Italian Polish
"OOPUBUJPOT … or I have the tweets—now what?
%BUB $MFBOJOH … or how to separate wheat from the
chaff.
'FBUVSF 3FEVDUJPO … or Matt’s crash course in selective ignorance.
$MBTTJGJDBUJPO … and the ‘not so rocket’ science behind it
all.
/BJWF #BZFT Simple and robust Assumes independence of features Scalable!
require "ankusa" require "ankusa/memory_storage" storage = Ankusa::MemoryStorage.new classifier = Ankusa::NaiveBayesClassifier.new(storage)
training.each do |tweet| classifier.train tweet.sentiment, tweet.to_s end sentiment = classifier.classify tweet.to_s
.BYJNVN &OUSPQZ No independence assumptions Suffers from overfitting Substantially slower
than Naive Bayes
require "maxent_string_classifier" classifier = MaxentStringClassifier::Loader.train(Classifier.root + "max_ent" + "data") classification
= classifier.classify tweet.to_s
4VQQPSU 7FDUPS .BDIJOFT Non-probabilistic binary linear classifier Only directly applicable
to two-class problems “Works by constructing a set of hyperplanes in a high or infinite dimensional space”—what?
None
require "eluka" classifier = Eluka::Model.new training.each do |tweet| classifier.add(tweet.features, tweet.sentiment)
end classifier.build sentiment = classifier.classify tweet.features
$PODMVTJPOT … or is the whole thing worth the hassle?
2VFTUJPOT
@matid spkr8.com/t/7678 bit.ly/matid-dissertation bit.ly/matid-dissertation-pdf 5IBOLT