{ "cells": [ { "cell_type": "code", "execution_count": 1, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:32:56.684738Z", "start_time": "2019-01-16T18:32:50.425370Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
WordV.Mean.SumV.SD.SumV.Rat.SumA.Mean.SumA.SD.SumA.Rat.SumD.Mean.SumD.SD.SumD.Rat.Sum...A.Rat.LA.Mean.HA.SD.HA.Rat.HD.Mean.LD.SD.LD.Rat.LD.Mean.HD.SD.HD.Rat.H
0aardvark6.262.21192.411.40224.271.7515...112.551.29114.121.6484.431.997
1abalone5.301.59202.651.90204.951.7922...122.381.9285.552.21114.361.0311
2abandon2.841.54193.732.43223.322.5022...113.822.14112.772.09134.112.939
3abandonment2.631.74194.952.64212.641.8128...145.292.6372.311.45163.082.1912
4abbey5.851.69202.201.70205.002.0225...92.551.92114.832.18185.431.627
5abdomen5.431.75213.682.23225.151.9427...104.171.70125.931.90144.311.6513
6abdominal4.481.59233.501.82225.322.1119...123.901.60106.501.5264.772.1713
7abduct2.421.61195.902.57202.752.1324...106.402.50102.892.5292.671.9515
8abduction2.051.31195.332.20213.022.4248...105.002.72113.032.39303.002.5418
9abide5.521.75213.262.22235.332.8318...113.672.39123.442.2497.221.999
10abiding5.571.75233.592.26226.602.3020...103.582.27126.302.16106.902.5110
11ability7.001.59204.852.74206.552.4822...135.432.9977.002.59126.002.3610
12abject4.001.29193.942.41174.352.6017...115.332.4264.572.9974.202.4410
13ablaze5.151.79206.752.12204.582.3936...116.672.4094.362.57224.932.1314
14able6.641.79223.382.25216.172.6218...63.272.09157.301.95104.752.768
15abnormal3.531.22194.482.29214.702.4423...103.642.42114.853.00134.501.5810
16abnormality3.051.81195.002.62223.962.5023...116.002.00113.772.42134.202.7010
17abode5.281.27182.901.89215.052.4420...93.171.80124.623.1685.331.9212
18abolish3.841.54194.182.07174.652.4217...105.001.9175.573.2174.001.5610
19abominable4.051.23205.452.44224.621.8321...126.302.16104.671.83124.561.949
20abomination2.501.65185.902.59203.801.3825...116.221.7994.001.25193.171.726
21abort3.101.37205.802.44203.382.2126...125.502.3983.251.84163.602.8010
22abortion2.581.84195.432.38474.732.9544...255.772.39224.163.10255.472.6319
23abracadabra5.112.52185.272.64224.961.9724...94.542.76134.942.05165.001.938
24abrasive4.261.69196.101.89214.942.3234...146.291.5075.882.34174.001.9417
25abreast4.621.94214.612.33235.191.9921...193.252.0645.071.69145.432.647
26abrupt3.281.64185.232.00223.751.8024...95.922.14134.061.81163.121.738
27abscess2.791.58194.002.38203.952.3120...103.902.18103.561.8194.272.6911
28absence3.862.08214.302.13204.242.3221...144.001.6763.172.29125.671.509
29absent4.101.55213.722.48254.212.3719...162.672.1294.272.72114.121.968
..................................................................
13885young6.311.59394.092.22225.602.8458...103.672.23126.122.78324.962.8426
13886youngster6.051.72214.552.19205.002.5521...143.331.0365.252.73124.672.409
13887youth6.531.58194.142.58445.002.0548...304.572.79145.502.21264.411.7122
13888youthful6.891.97195.682.50226.002.2823...115.452.25115.922.53136.102.0210
13889yucky3.362.01224.352.58204.362.5222...124.502.1485.002.41123.602.5510
13890yuletide6.191.99214.002.24195.082.1025...124.142.6174.782.1195.252.1416
13891yummy7.521.94214.482.50256.842.0619...163.332.5597.092.30116.501.778
13892yuppie4.642.48224.652.37205.391.8523...105.301.34105.252.5585.471.4615
13893zap5.392.52184.412.44224.872.6323...115.362.34115.312.75134.302.5010
13894zeal6.152.08205.332.71215.592.3534...145.862.9775.181.98176.002.6717
13895zebra6.472.34193.902.75205.262.2319...103.702.87103.892.2096.501.4310
13896zenith5.201.79203.712.12245.362.0928...124.002.30125.331.30125.382.5816
13897zephyr5.501.50203.412.20225.222.5027...163.832.2364.672.81125.672.2315
13898zest6.761.53415.412.44226.581.7926...95.772.98136.191.80167.201.6910
13899zeta5.550.94203.752.20205.202.0225...123.002.0085.671.63154.502.4210
13900zigzag5.181.30225.422.34195.002.2121...86.361.75114.561.5995.332.6112
13901zilch3.891.78184.052.21204.251.9624...113.672.7894.721.81182.831.836
13902zillion5.812.23214.262.83234.892.7218...113.502.39123.782.1796.002.879
13903zinc4.791.65193.172.04185.002.1517...114.002.0875.002.0075.002.3610
13904zing6.951.90194.812.69216.361.9722...84.542.50136.862.03145.501.608
13905zip5.061.35184.242.23214.672.2818...94.922.31124.332.3464.832.3312
13906zipper5.112.13193.732.21225.182.1522...114.092.12114.772.20135.782.059
13907zit3.301.49204.292.43214.402.9725...113.802.74104.443.33184.291.987
13908zodiac5.551.99204.252.51204.322.0822...123.622.5684.822.40113.821.6611
13909zombie3.572.46216.531.95193.572.4621...135.670.8262.752.42124.672.189
13910zone4.752.05203.782.53185.231.8222...94.891.7695.091.81115.361.9111
13911zoning4.651.60203.771.95224.472.2019...123.701.57105.172.3264.152.1513
13912zoo7.001.58215.632.54196.332.5621...135.172.1465.672.87127.221.869
13913zoom5.861.53215.682.54195.902.1721...86.272.45116.002.1295.832.2912
13914zucchini6.302.36204.182.20226.191.8321...124.602.46106.331.87126.001.879
\n", "

13915 rows × 64 columns

\n", "
" ], "text/plain": [ " Word V.Mean.Sum V.SD.Sum V.Rat.Sum A.Mean.Sum A.SD.Sum \\\n", "0 aardvark 6.26 2.21 19 2.41 1.40 \n", "1 abalone 5.30 1.59 20 2.65 1.90 \n", "2 abandon 2.84 1.54 19 3.73 2.43 \n", "3 abandonment 2.63 1.74 19 4.95 2.64 \n", "4 abbey 5.85 1.69 20 2.20 1.70 \n", "5 abdomen 5.43 1.75 21 3.68 2.23 \n", "6 abdominal 4.48 1.59 23 3.50 1.82 \n", "7 abduct 2.42 1.61 19 5.90 2.57 \n", "8 abduction 2.05 1.31 19 5.33 2.20 \n", "9 abide 5.52 1.75 21 3.26 2.22 \n", "10 abiding 5.57 1.75 23 3.59 2.26 \n", "11 ability 7.00 1.59 20 4.85 2.74 \n", "12 abject 4.00 1.29 19 3.94 2.41 \n", "13 ablaze 5.15 1.79 20 6.75 2.12 \n", "14 able 6.64 1.79 22 3.38 2.25 \n", "15 abnormal 3.53 1.22 19 4.48 2.29 \n", "16 abnormality 3.05 1.81 19 5.00 2.62 \n", "17 abode 5.28 1.27 18 2.90 1.89 \n", "18 abolish 3.84 1.54 19 4.18 2.07 \n", "19 abominable 4.05 1.23 20 5.45 2.44 \n", "20 abomination 2.50 1.65 18 5.90 2.59 \n", "21 abort 3.10 1.37 20 5.80 2.44 \n", "22 abortion 2.58 1.84 19 5.43 2.38 \n", "23 abracadabra 5.11 2.52 18 5.27 2.64 \n", "24 abrasive 4.26 1.69 19 6.10 1.89 \n", "25 abreast 4.62 1.94 21 4.61 2.33 \n", "26 abrupt 3.28 1.64 18 5.23 2.00 \n", "27 abscess 2.79 1.58 19 4.00 2.38 \n", "28 absence 3.86 2.08 21 4.30 2.13 \n", "29 absent 4.10 1.55 21 3.72 2.48 \n", "... ... ... ... ... ... ... \n", "13885 young 6.31 1.59 39 4.09 2.22 \n", "13886 youngster 6.05 1.72 21 4.55 2.19 \n", "13887 youth 6.53 1.58 19 4.14 2.58 \n", "13888 youthful 6.89 1.97 19 5.68 2.50 \n", "13889 yucky 3.36 2.01 22 4.35 2.58 \n", "13890 yuletide 6.19 1.99 21 4.00 2.24 \n", "13891 yummy 7.52 1.94 21 4.48 2.50 \n", "13892 yuppie 4.64 2.48 22 4.65 2.37 \n", "13893 zap 5.39 2.52 18 4.41 2.44 \n", "13894 zeal 6.15 2.08 20 5.33 2.71 \n", "13895 zebra 6.47 2.34 19 3.90 2.75 \n", "13896 zenith 5.20 1.79 20 3.71 2.12 \n", "13897 zephyr 5.50 1.50 20 3.41 2.20 \n", "13898 zest 6.76 1.53 41 5.41 2.44 \n", "13899 zeta 5.55 0.94 20 3.75 2.20 \n", "13900 zigzag 5.18 1.30 22 5.42 2.34 \n", "13901 zilch 3.89 1.78 18 4.05 2.21 \n", "13902 zillion 5.81 2.23 21 4.26 2.83 \n", "13903 zinc 4.79 1.65 19 3.17 2.04 \n", "13904 zing 6.95 1.90 19 4.81 2.69 \n", "13905 zip 5.06 1.35 18 4.24 2.23 \n", "13906 zipper 5.11 2.13 19 3.73 2.21 \n", "13907 zit 3.30 1.49 20 4.29 2.43 \n", "13908 zodiac 5.55 1.99 20 4.25 2.51 \n", "13909 zombie 3.57 2.46 21 6.53 1.95 \n", "13910 zone 4.75 2.05 20 3.78 2.53 \n", "13911 zoning 4.65 1.60 20 3.77 1.95 \n", "13912 zoo 7.00 1.58 21 5.63 2.54 \n", "13913 zoom 5.86 1.53 21 5.68 2.54 \n", "13914 zucchini 6.30 2.36 20 4.18 2.20 \n", "\n", " A.Rat.Sum D.Mean.Sum D.SD.Sum D.Rat.Sum ... A.Rat.L A.Mean.H \\\n", "0 22 4.27 1.75 15 ... 11 2.55 \n", "1 20 4.95 1.79 22 ... 12 2.38 \n", "2 22 3.32 2.50 22 ... 11 3.82 \n", "3 21 2.64 1.81 28 ... 14 5.29 \n", "4 20 5.00 2.02 25 ... 9 2.55 \n", "5 22 5.15 1.94 27 ... 10 4.17 \n", "6 22 5.32 2.11 19 ... 12 3.90 \n", "7 20 2.75 2.13 24 ... 10 6.40 \n", "8 21 3.02 2.42 48 ... 10 5.00 \n", "9 23 5.33 2.83 18 ... 11 3.67 \n", "10 22 6.60 2.30 20 ... 10 3.58 \n", "11 20 6.55 2.48 22 ... 13 5.43 \n", "12 17 4.35 2.60 17 ... 11 5.33 \n", "13 20 4.58 2.39 36 ... 11 6.67 \n", "14 21 6.17 2.62 18 ... 6 3.27 \n", "15 21 4.70 2.44 23 ... 10 3.64 \n", "16 22 3.96 2.50 23 ... 11 6.00 \n", "17 21 5.05 2.44 20 ... 9 3.17 \n", "18 17 4.65 2.42 17 ... 10 5.00 \n", "19 22 4.62 1.83 21 ... 12 6.30 \n", "20 20 3.80 1.38 25 ... 11 6.22 \n", "21 20 3.38 2.21 26 ... 12 5.50 \n", "22 47 4.73 2.95 44 ... 25 5.77 \n", "23 22 4.96 1.97 24 ... 9 4.54 \n", "24 21 4.94 2.32 34 ... 14 6.29 \n", "25 23 5.19 1.99 21 ... 19 3.25 \n", "26 22 3.75 1.80 24 ... 9 5.92 \n", "27 20 3.95 2.31 20 ... 10 3.90 \n", "28 20 4.24 2.32 21 ... 14 4.00 \n", "29 25 4.21 2.37 19 ... 16 2.67 \n", "... ... ... ... ... ... ... ... \n", "13885 22 5.60 2.84 58 ... 10 3.67 \n", "13886 20 5.00 2.55 21 ... 14 3.33 \n", "13887 44 5.00 2.05 48 ... 30 4.57 \n", "13888 22 6.00 2.28 23 ... 11 5.45 \n", "13889 20 4.36 2.52 22 ... 12 4.50 \n", "13890 19 5.08 2.10 25 ... 12 4.14 \n", "13891 25 6.84 2.06 19 ... 16 3.33 \n", "13892 20 5.39 1.85 23 ... 10 5.30 \n", "13893 22 4.87 2.63 23 ... 11 5.36 \n", "13894 21 5.59 2.35 34 ... 14 5.86 \n", "13895 20 5.26 2.23 19 ... 10 3.70 \n", "13896 24 5.36 2.09 28 ... 12 4.00 \n", "13897 22 5.22 2.50 27 ... 16 3.83 \n", "13898 22 6.58 1.79 26 ... 9 5.77 \n", "13899 20 5.20 2.02 25 ... 12 3.00 \n", "13900 19 5.00 2.21 21 ... 8 6.36 \n", "13901 20 4.25 1.96 24 ... 11 3.67 \n", "13902 23 4.89 2.72 18 ... 11 3.50 \n", "13903 18 5.00 2.15 17 ... 11 4.00 \n", "13904 21 6.36 1.97 22 ... 8 4.54 \n", "13905 21 4.67 2.28 18 ... 9 4.92 \n", "13906 22 5.18 2.15 22 ... 11 4.09 \n", "13907 21 4.40 2.97 25 ... 11 3.80 \n", "13908 20 4.32 2.08 22 ... 12 3.62 \n", "13909 19 3.57 2.46 21 ... 13 5.67 \n", "13910 18 5.23 1.82 22 ... 9 4.89 \n", "13911 22 4.47 2.20 19 ... 12 3.70 \n", "13912 19 6.33 2.56 21 ... 13 5.17 \n", "13913 19 5.90 2.17 21 ... 8 6.27 \n", "13914 22 6.19 1.83 21 ... 12 4.60 \n", "\n", " A.SD.H A.Rat.H D.Mean.L D.SD.L D.Rat.L D.Mean.H D.SD.H D.Rat.H \n", "0 1.29 11 4.12 1.64 8 4.43 1.99 7 \n", "1 1.92 8 5.55 2.21 11 4.36 1.03 11 \n", "2 2.14 11 2.77 2.09 13 4.11 2.93 9 \n", "3 2.63 7 2.31 1.45 16 3.08 2.19 12 \n", "4 1.92 11 4.83 2.18 18 5.43 1.62 7 \n", "5 1.70 12 5.93 1.90 14 4.31 1.65 13 \n", "6 1.60 10 6.50 1.52 6 4.77 2.17 13 \n", "7 2.50 10 2.89 2.52 9 2.67 1.95 15 \n", "8 2.72 11 3.03 2.39 30 3.00 2.54 18 \n", "9 2.39 12 3.44 2.24 9 7.22 1.99 9 \n", "10 2.27 12 6.30 2.16 10 6.90 2.51 10 \n", "11 2.99 7 7.00 2.59 12 6.00 2.36 10 \n", "12 2.42 6 4.57 2.99 7 4.20 2.44 10 \n", "13 2.40 9 4.36 2.57 22 4.93 2.13 14 \n", "14 2.09 15 7.30 1.95 10 4.75 2.76 8 \n", "15 2.42 11 4.85 3.00 13 4.50 1.58 10 \n", "16 2.00 11 3.77 2.42 13 4.20 2.70 10 \n", "17 1.80 12 4.62 3.16 8 5.33 1.92 12 \n", "18 1.91 7 5.57 3.21 7 4.00 1.56 10 \n", "19 2.16 10 4.67 1.83 12 4.56 1.94 9 \n", "20 1.79 9 4.00 1.25 19 3.17 1.72 6 \n", "21 2.39 8 3.25 1.84 16 3.60 2.80 10 \n", "22 2.39 22 4.16 3.10 25 5.47 2.63 19 \n", "23 2.76 13 4.94 2.05 16 5.00 1.93 8 \n", "24 1.50 7 5.88 2.34 17 4.00 1.94 17 \n", "25 2.06 4 5.07 1.69 14 5.43 2.64 7 \n", "26 2.14 13 4.06 1.81 16 3.12 1.73 8 \n", "27 2.18 10 3.56 1.81 9 4.27 2.69 11 \n", "28 1.67 6 3.17 2.29 12 5.67 1.50 9 \n", "29 2.12 9 4.27 2.72 11 4.12 1.96 8 \n", "... ... ... ... ... ... ... ... ... \n", "13885 2.23 12 6.12 2.78 32 4.96 2.84 26 \n", "13886 1.03 6 5.25 2.73 12 4.67 2.40 9 \n", "13887 2.79 14 5.50 2.21 26 4.41 1.71 22 \n", "13888 2.25 11 5.92 2.53 13 6.10 2.02 10 \n", "13889 2.14 8 5.00 2.41 12 3.60 2.55 10 \n", "13890 2.61 7 4.78 2.11 9 5.25 2.14 16 \n", "13891 2.55 9 7.09 2.30 11 6.50 1.77 8 \n", "13892 1.34 10 5.25 2.55 8 5.47 1.46 15 \n", "13893 2.34 11 5.31 2.75 13 4.30 2.50 10 \n", "13894 2.97 7 5.18 1.98 17 6.00 2.67 17 \n", "13895 2.87 10 3.89 2.20 9 6.50 1.43 10 \n", "13896 2.30 12 5.33 1.30 12 5.38 2.58 16 \n", "13897 2.23 6 4.67 2.81 12 5.67 2.23 15 \n", "13898 2.98 13 6.19 1.80 16 7.20 1.69 10 \n", "13899 2.00 8 5.67 1.63 15 4.50 2.42 10 \n", "13900 1.75 11 4.56 1.59 9 5.33 2.61 12 \n", "13901 2.78 9 4.72 1.81 18 2.83 1.83 6 \n", "13902 2.39 12 3.78 2.17 9 6.00 2.87 9 \n", "13903 2.08 7 5.00 2.00 7 5.00 2.36 10 \n", "13904 2.50 13 6.86 2.03 14 5.50 1.60 8 \n", "13905 2.31 12 4.33 2.34 6 4.83 2.33 12 \n", "13906 2.12 11 4.77 2.20 13 5.78 2.05 9 \n", "13907 2.74 10 4.44 3.33 18 4.29 1.98 7 \n", "13908 2.56 8 4.82 2.40 11 3.82 1.66 11 \n", "13909 0.82 6 2.75 2.42 12 4.67 2.18 9 \n", "13910 1.76 9 5.09 1.81 11 5.36 1.91 11 \n", "13911 1.57 10 5.17 2.32 6 4.15 2.15 13 \n", "13912 2.14 6 5.67 2.87 12 7.22 1.86 9 \n", "13913 2.45 11 6.00 2.12 9 5.83 2.29 12 \n", "13914 2.46 10 6.33 1.87 12 6.00 1.87 9 \n", "\n", "[13915 rows x 64 columns]" ] }, "execution_count": 1, "metadata": {}, "output_type": "execute_result" } ], "source": [ "import pandas as pd\n", "orig_df = pd.read_csv('https://github.com/gopalkoduri/flisound/blob/master/data/Ratings_Warriner_et_al.csv?raw=true', index_col=0)\n", "orig_df.to_csv('Ratings_Warriner_et_al.csv', index=False)\n", "\n", "df = pd.read_csv('Ratings_Warriner_et_al.csv')\n", "df" ] }, { "cell_type": "code", "execution_count": 2, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:32:56.695031Z", "start_time": "2019-01-16T18:32:56.688252Z" } }, "outputs": [ { "data": { "text/plain": [ "defaultdict(set,\n", " {'Mean': {'F', 'H', 'L', 'M', 'O', 'S', 'Y', 'm', 'u'},\n", " 'SD': {'F', 'H', 'L', 'M', 'O', 'S', 'Y', 'm', 'u'},\n", " 'Rat': {'F', 'H', 'L', 'M', 'O', 'S', 'Y', 'm', 'u'}})" ] }, "execution_count": 2, "metadata": {}, "output_type": "execute_result" } ], "source": [ "# WTF do the keys mean?\n", "from collections import defaultdict\n", "\n", "k_d = defaultdict(set)\n", "\n", "for striped in [k.split('.') for k in df.keys()]:\n", " if len(striped) > 1:\n", " dim, measure, sub = striped\n", " k_d[measure].update(sub)\n", "k_d" ] }, { "cell_type": "code", "execution_count": 3, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:32:56.701232Z", "start_time": "2019-01-16T18:32:56.697601Z" } }, "outputs": [], "source": [ "# From http://crr.ugent.be/papers/Warriner_et_al_affective_ratings.pdf\n", "key_map = {\n", " 'M':'Male',\n", " 'F':'Female',\n", " 'H': 'High Education (Degree or higher)',\n", " 'L': 'Low Education (Partial degree or lower)',\n", " 'Y': 'Younger',\n", " 'O': 'Older',\n", " 'm': 'm',\n", " 'u': 'u'\n", "}" ] }, { "cell_type": "code", "execution_count": 4, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:32:57.230722Z", "start_time": "2019-01-16T18:32:56.703886Z" } }, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support.' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
');\n", " var titletext = $(\n", " '
');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
')\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('');\n", " button.click(method_name, toolbar_event);\n", " button.mouseover(tooltip, toolbar_mouse_event);\n", " nav_element.append(button);\n", " }\n", "\n", " // Add the status bar.\n", " var status_bar = $('');\n", " nav_element.append(status_bar);\n", " this.message = status_bar[0];\n", "\n", " // Add the close button to the window.\n", " var buttongrp = $('
');\n", " var button = $('');\n", " button.click(function (evt) { fig.handle_close(fig, {}); } );\n", " button.mouseover('Stop Interaction', toolbar_mouse_event);\n", " buttongrp.append(button);\n", " var titlebar = this.root.find($('.ui-dialog-titlebar'));\n", " titlebar.prepend(buttongrp);\n", "}\n", "\n", "mpl.figure.prototype._root_extra_style = function(el){\n", " var fig = this\n", " el.on(\"remove\", function(){\n", "\tfig.close_ws(fig, {});\n", " });\n", "}\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(el){\n", " // this is important to make the div 'focusable\n", " el.attr('tabindex', 0)\n", " // reach out to IPython and tell the keyboard manager to turn it's self\n", " // off when our div gets focus\n", "\n", " // location in version 3\n", " if (IPython.notebook.keyboard_manager) {\n", " IPython.notebook.keyboard_manager.register_events(el);\n", " }\n", " else {\n", " // location in version 2\n", " IPython.keyboard_manager.register_events(el);\n", " }\n", "\n", "}\n", "\n", "mpl.figure.prototype._key_event_extra = function(event, name) {\n", " var manager = IPython.notebook.keyboard_manager;\n", " if (!manager)\n", " manager = IPython.keyboard_manager;\n", "\n", " // Check for shift+enter\n", " if (event.shiftKey && event.which == 13) {\n", " this.canvas_div.blur();\n", " event.shiftKey = false;\n", " // Send a \"J\" for go to next cell\n", " event.which = 74;\n", " event.keyCode = 74;\n", " manager.command_mode();\n", " manager.handle_keydown(event);\n", " }\n", "}\n", "\n", "mpl.figure.prototype.handle_save = function(fig, msg) {\n", " fig.ondownload(fig, null);\n", "}\n", "\n", "\n", "mpl.find_output_cell = function(html_output) {\n", " // Return the cell and output element which can be found *uniquely* in the notebook.\n", " // Note - this is a bit hacky, but it is done because the \"notebook_saving.Notebook\"\n", " // IPython event is triggered only after the cells have been serialised, which for\n", " // our purposes (turning an active figure into a static one), is too late.\n", " var cells = IPython.notebook.get_cells();\n", " var ncells = cells.length;\n", " for (var i=0; i= 3 moved mimebundle to data attribute of output\n", " data = data.data;\n", " }\n", " if (data['text/html'] == html_output) {\n", " return [cell, data, j];\n", " }\n", " }\n", " }\n", " }\n", "}\n", "\n", "// Register the function which deals with the matplotlib target/channel.\n", "// The kernel may be null if the page has been refreshed.\n", "if (IPython.notebook.kernel != null) {\n", " IPython.notebook.kernel.comm_manager.register_target('matplotlib', mpl.mpl_figure_comm);\n", "}\n" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "
" ], "text/plain": [ "" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "from scipy.spatial.distance import pdist, squareform\n", "from scipy.cluster.hierarchy import linkage, dendrogram\n", "row_clusters = linkage(pdist(df[targets], metric='euclidean'), method='complete')\n", "f,ax = plt.subplots(figsize=(16,44))\n", "row_dendr = dendrogram(row_clusters, \n", " labels=df['Word'].values, \n", " orientation='right'\n", " )\n", "f.tight_layout()\n", "ax.set_ylabel('Distance')\n", "f.savefig('WarrinerDendrogram.png')" ] }, { "cell_type": "code", "execution_count": 6, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:34:20.955801Z", "start_time": "2019-01-16T18:34:13.108606Z" } }, "outputs": [], "source": [ "from sklearn.cluster import AgglomerativeClustering\n", "ac = AgglomerativeClustering(n_clusters=3, affinity='euclidean', linkage='complete')\n", "labels = ac.fit_predict(df[targets].values)" ] }, { "cell_type": "code", "execution_count": 7, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:34:20.990608Z", "start_time": "2019-01-16T18:34:20.964826Z" } }, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
V.Mean.SumA.Mean.SumD.Mean.Sum
label
05.5006303.6564195.437269
13.3871724.8399744.007651
25.6552094.9265575.730107
\n", "
" ], "text/plain": [ " V.Mean.Sum A.Mean.Sum D.Mean.Sum\n", "label \n", "0 5.500630 3.656419 5.437269\n", "1 3.387172 4.839974 4.007651\n", "2 5.655209 4.926557 5.730107" ] }, "execution_count": 7, "metadata": {}, "output_type": "execute_result" } ], "source": [ "df['label'] = labels\n", "df.groupby('label')[targets].mean()" ] }, { "cell_type": "code", "execution_count": 8, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:34:21.010025Z", "start_time": "2019-01-16T18:34:20.996805Z" } }, "outputs": [], "source": [ "colors = ['b','r','g']\n", "df['label_color'] = df['label'].apply(lambda l: colors[l])\n", "\n", "sample_words = \"\"\"\n", "Stress\n", "Intoxication\n", "Fatigue\n", "Positivity\n", "Negativity\n", "Emotionality\n", "Focus\n", "Activity\n", "Engagement\n", "Arousal\n", "Excitement\n", "Dominance\n", "Valence\n", "Affection\n", "Anger\n", "Boredom\n", "Contentment\n", "Depression\n", "Disgust\n", "Enthusiasm\n", "Excitement\n", "Fear\n", "Frustration\n", "Happiness\n", "Interest\n", "Joy\n", "Nervousness\n", "Panic\n", "Pride\n", "Relaxation\n", "Sadness\n", "Surprise\n", "Satisfaction\n", "Tension\n", "Worry\n", "Activation\"\"\".lower().split()\n", "\n", "df['in_sample'] = df['Word'].isin(sample_words)" ] }, { "cell_type": "code", "execution_count": 11, "metadata": { "ExecuteTime": { "end_time": "2019-01-16T18:34:51.138224Z", "start_time": "2019-01-16T18:34:50.503364Z" } }, "outputs": [ { "data": { "application/javascript": [ "/* Put everything inside the global mpl namespace */\n", "window.mpl = {};\n", "\n", "\n", "mpl.get_websocket_type = function() {\n", " if (typeof(WebSocket) !== 'undefined') {\n", " return WebSocket;\n", " } else if (typeof(MozWebSocket) !== 'undefined') {\n", " return MozWebSocket;\n", " } else {\n", " alert('Your browser does not have WebSocket support.' +\n", " 'Please try Chrome, Safari or Firefox ≥ 6. ' +\n", " 'Firefox 4 and 5 are also supported but you ' +\n", " 'have to enable WebSockets in about:config.');\n", " };\n", "}\n", "\n", "mpl.figure = function(figure_id, websocket, ondownload, parent_element) {\n", " this.id = figure_id;\n", "\n", " this.ws = websocket;\n", "\n", " this.supports_binary = (this.ws.binaryType != undefined);\n", "\n", " if (!this.supports_binary) {\n", " var warnings = document.getElementById(\"mpl-warnings\");\n", " if (warnings) {\n", " warnings.style.display = 'block';\n", " warnings.textContent = (\n", " \"This browser does not support binary websocket messages. \" +\n", " \"Performance may be slow.\");\n", " }\n", " }\n", "\n", " this.imageObj = new Image();\n", "\n", " this.context = undefined;\n", " this.message = undefined;\n", " this.canvas = undefined;\n", " this.rubberband_canvas = undefined;\n", " this.rubberband_context = undefined;\n", " this.format_dropdown = undefined;\n", "\n", " this.image_mode = 'full';\n", "\n", " this.root = $('
');\n", " this._root_extra_style(this.root)\n", " this.root.attr('style', 'display: inline-block');\n", "\n", " $(parent_element).append(this.root);\n", "\n", " this._init_header(this);\n", " this._init_canvas(this);\n", " this._init_toolbar(this);\n", "\n", " var fig = this;\n", "\n", " this.waiting = false;\n", "\n", " this.ws.onopen = function () {\n", " fig.send_message(\"supports_binary\", {value: fig.supports_binary});\n", " fig.send_message(\"send_image_mode\", {});\n", " if (mpl.ratio != 1) {\n", " fig.send_message(\"set_dpi_ratio\", {'dpi_ratio': mpl.ratio});\n", " }\n", " fig.send_message(\"refresh\", {});\n", " }\n", "\n", " this.imageObj.onload = function() {\n", " if (fig.image_mode == 'full') {\n", " // Full images could contain transparency (where diff images\n", " // almost always do), so we need to clear the canvas so that\n", " // there is no ghosting.\n", " fig.context.clearRect(0, 0, fig.canvas.width, fig.canvas.height);\n", " }\n", " fig.context.drawImage(fig.imageObj, 0, 0);\n", " };\n", "\n", " this.imageObj.onunload = function() {\n", " fig.ws.close();\n", " }\n", "\n", " this.ws.onmessage = this._make_on_message_function(this);\n", "\n", " this.ondownload = ondownload;\n", "}\n", "\n", "mpl.figure.prototype._init_header = function() {\n", " var titlebar = $(\n", " '
');\n", " var titletext = $(\n", " '
');\n", " titlebar.append(titletext)\n", " this.root.append(titlebar);\n", " this.header = titletext[0];\n", "}\n", "\n", "\n", "\n", "mpl.figure.prototype._canvas_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "\n", "mpl.figure.prototype._root_extra_style = function(canvas_div) {\n", "\n", "}\n", "\n", "mpl.figure.prototype._init_canvas = function() {\n", " var fig = this;\n", "\n", " var canvas_div = $('
');\n", "\n", " canvas_div.attr('style', 'position: relative; clear: both; outline: 0');\n", "\n", " function canvas_keyboard_event(event) {\n", " return fig.key_event(event, event['data']);\n", " }\n", "\n", " canvas_div.keydown('key_press', canvas_keyboard_event);\n", " canvas_div.keyup('key_release', canvas_keyboard_event);\n", " this.canvas_div = canvas_div\n", " this._canvas_extra_style(canvas_div)\n", " this.root.append(canvas_div);\n", "\n", " var canvas = $('');\n", " canvas.addClass('mpl-canvas');\n", " canvas.attr('style', \"left: 0; top: 0; z-index: 0; outline: 0\")\n", "\n", " this.canvas = canvas[0];\n", " this.context = canvas[0].getContext(\"2d\");\n", "\n", " var backingStore = this.context.backingStorePixelRatio ||\n", "\tthis.context.webkitBackingStorePixelRatio ||\n", "\tthis.context.mozBackingStorePixelRatio ||\n", "\tthis.context.msBackingStorePixelRatio ||\n", "\tthis.context.oBackingStorePixelRatio ||\n", "\tthis.context.backingStorePixelRatio || 1;\n", "\n", " mpl.ratio = (window.devicePixelRatio || 1) / backingStore;\n", "\n", " var rubberband = $('');\n", " rubberband.attr('style', \"position: absolute; left: 0; top: 0; z-index: 1;\")\n", "\n", " var pass_mouse_events = true;\n", "\n", " canvas_div.resizable({\n", " start: function(event, ui) {\n", " pass_mouse_events = false;\n", " },\n", " resize: function(event, ui) {\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " stop: function(event, ui) {\n", " pass_mouse_events = true;\n", " fig.request_resize(ui.size.width, ui.size.height);\n", " },\n", " });\n", "\n", " function mouse_event_fn(event) {\n", " if (pass_mouse_events)\n", " return fig.mouse_event(event, event['data']);\n", " }\n", "\n", " rubberband.mousedown('button_press', mouse_event_fn);\n", " rubberband.mouseup('button_release', mouse_event_fn);\n", " // Throttle sequential mouse events to 1 every 20ms.\n", " rubberband.mousemove('motion_notify', mouse_event_fn);\n", "\n", " rubberband.mouseenter('figure_enter', mouse_event_fn);\n", " rubberband.mouseleave('figure_leave', mouse_event_fn);\n", "\n", " canvas_div.on(\"wheel\", function (event) {\n", " event = event.originalEvent;\n", " event['data'] = 'scroll'\n", " if (event.deltaY < 0) {\n", " event.step = 1;\n", " } else {\n", " event.step = -1;\n", " }\n", " mouse_event_fn(event);\n", " });\n", "\n", " canvas_div.append(canvas);\n", " canvas_div.append(rubberband);\n", "\n", " this.rubberband = rubberband;\n", " this.rubberband_canvas = rubberband[0];\n", " this.rubberband_context = rubberband[0].getContext(\"2d\");\n", " this.rubberband_context.strokeStyle = \"#000000\";\n", "\n", " this._resize_canvas = function(width, height) {\n", " // Keep the size of the canvas, canvas container, and rubber band\n", " // canvas in synch.\n", " canvas_div.css('width', width)\n", " canvas_div.css('height', height)\n", "\n", " canvas.attr('width', width * mpl.ratio);\n", " canvas.attr('height', height * mpl.ratio);\n", " canvas.attr('style', 'width: ' + width + 'px; height: ' + height + 'px;');\n", "\n", " rubberband.attr('width', width);\n", " rubberband.attr('height', height);\n", " }\n", "\n", " // Set the figure to an initial 600x600px, this will subsequently be updated\n", " // upon first draw.\n", " this._resize_canvas(600, 600);\n", "\n", " // Disable right mouse context menu.\n", " $(this.rubberband_canvas).bind(\"contextmenu\",function(e){\n", " return false;\n", " });\n", "\n", " function set_focus () {\n", " canvas.focus();\n", " canvas_div.focus();\n", " }\n", "\n", " window.setTimeout(set_focus, 100);\n", "}\n", "\n", "mpl.figure.prototype._init_toolbar = function() {\n", " var fig = this;\n", "\n", " var nav_element = $('
')\n", " nav_element.attr('style', 'width: 100%');\n", " this.root.append(nav_element);\n", "\n", " // Define a callback function for later on.\n", " function toolbar_event(event) {\n", " return fig.toolbar_button_onclick(event['data']);\n", " }\n", " function toolbar_mouse_event(event) {\n", " return fig.toolbar_button_onmouseover(event['data']);\n", " }\n", "\n", " for(var toolbar_ind in mpl.toolbar_items) {\n", " var name = mpl.toolbar_items[toolbar_ind][0];\n", " var tooltip = mpl.toolbar_items[toolbar_ind][1];\n", " var image = mpl.toolbar_items[toolbar_ind][2];\n", " var method_name = mpl.toolbar_items[toolbar_ind][3];\n", "\n", " if (!name) {\n", " // put a spacer in here.\n", " continue;\n", " }\n", " var button = $('