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 in Ruby
Search
Matt D.
May 30, 2011
Programming
1
990
Machine Learning and Sentiment Classification in Ruby
Matt D.
May 30, 2011
Tweet
Share
Other Decks in Programming
See All in Programming
Exploring the Implementation of “t.Run”, “t.Parallel”, and “t.Cleanup”
akarin
1
140
ServerAction で Progressive Enhancement はどこまで頑張れるか? / progressive-enhancement-with-server-action
takefumiyoshii
6
460
Go製Webアプリケーションのエラーとの向き合い方大全、あるいはやっぱりスタックトレース欲しいやん / Kyoto.go #50
utgwkk
6
1.8k
PostmanでAPIの動作確認が楽になった話
h455h1
0
190
Fast JSX: Don't clone props object #28768
yossydev
1
200
GNU Makeの使い方 / How to use GNU Make
kaityo256
PRO
12
4.2k
Node.js v22 で変わること
yosuke_furukawa
PRO
12
4k
From Spring Boot 2 to Spring Boot 3 with Java 21 and Jakarta EE
ivargrimstad
0
780
Let's learn code review
riofujimon
2
610
Scalable Customer Journey Orchestration (CJO)
lewuathe
0
450
Goのmultiple errorsについて (2024年4月版)
syumai
4
1.2k
Milestoner
bkuhlmann
1
420
Featured
See All Featured
Embracing the Ebb and Flow
colly
80
4.2k
How to Ace a Technical Interview
jacobian
273
22k
Large-scale JavaScript Application Architecture
addyosmani
504
110k
Done Done
chrislema
178
15k
What the flash - Photography Introduction
edds
64
11k
Making the Leap to Tech Lead
cromwellryan
125
8.5k
ParisWeb 2013: Learning to Love: Crash Course in Emotional UX Design
dotmariusz
104
6.6k
Writing Fast Ruby
sferik
622
60k
The Language of Interfaces
destraynor
151
23k
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
126
32k
How To Stay Up To Date on Web Technology
chriscoyier
782
250k
Navigating Team Friction
lara
179
13k
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