Skip to content

Instantly share code, notes, and snippets.

@ajitesh123
Created May 27, 2019 20:33
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save ajitesh123/5f750e45472b144d0ddef1b2e3c854d0 to your computer and use it in GitHub Desktop.
Save ajitesh123/5f750e45472b144d0ddef1b2e3c854d0 to your computer and use it in GitHub Desktop.
Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "code",
"execution_count": 354,
"metadata": {
"scrolled": true
},
"outputs": [
{
"data": {
"text/html": [
"\n",
"<link rel=\"stylesheet\" type=\"text/css\" href=\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.css\">\n",
"\n",
"\n",
"<div id=\"ldavis_el1316821927442918082938389136\"></div>\n",
"<script type=\"text/javascript\">\n",
"\n",
"var ldavis_el1316821927442918082938389136_data = {\"mdsDat\": {\"x\": [-0.06368923461641318, 0.23928870371056574, -0.19059560603530473, 0.24785613952097385, -0.23286000257982192], \"y\": [0.10224638654326206, -0.0008189181769159554, -0.33796146061173366, -0.005464163062386382, 0.2419981553077738], \"topics\": [1, 2, 3, 4, 5], \"cluster\": [1, 1, 1, 1, 1], \"Freq\": [24.396487300818148, 19.867734494421867, 19.37076448079313, 19.130424804619185, 17.234588919347654]}, \"tinfo\": {\"Category\": [\"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Default\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic1\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic2\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic3\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic4\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\", \"Topic5\"], \"Freq\": [235.0, 381.0, 234.0, 152.0, 155.0, 179.0, 93.0, 91.0, 251.0, 100.0, 122.0, 102.0, 69.0, 64.0, 69.0, 69.0, 72.0, 59.0, 161.0, 57.0, 56.0, 53.0, 83.0, 54.0, 64.0, 50.0, 75.0, 48.0, 47.0, 45.0, 71.2088712812616, 63.32070854437814, 49.6549825790595, 48.84975166731584, 42.135479323318485, 39.705751875852634, 40.20194188172747, 37.362172012406, 34.967660464197145, 32.95852525216655, 32.33956950574245, 31.82914224340586, 28.30746358962928, 25.309606846126027, 24.60362424681384, 24.142923708249572, 23.57297176199295, 23.182440554658662, 22.794325330240067, 22.720496601661228, 21.994313591919845, 21.127336124227714, 21.473778972910313, 21.03012885208039, 20.833138413319162, 19.857827822446144, 18.79238348852063, 18.05003285356862, 17.27508589029141, 16.044297415979397, 26.52138284196107, 94.20758753121048, 36.79415403484632, 266.6491735018167, 56.00864980333836, 46.15186564286838, 50.62531535226499, 45.22334494896619, 91.11341211879338, 33.56303621243027, 35.41522431149549, 44.70621050040263, 32.6815407921159, 35.36099852056201, 27.690115539946035, 90.32426066726899, 153.51105376856788, 68.38352046094207, 46.61961485169324, 37.59546481357984, 33.19340477521247, 31.33556071811792, 31.173381687842756, 28.510353547838115, 27.71107908336063, 27.63192268832957, 27.169942284011857, 25.27351662181367, 24.938056130761584, 23.22403506026042, 22.79953063662019, 22.30293527840325, 21.61904730688896, 21.149465113878748, 21.07340583149044, 20.66221229830998, 20.192205989214916, 19.181484172203103, 19.676811393685142, 21.202044130376855, 18.021479199861375, 19.755805615454936, 18.031425873355907, 17.852095069437905, 17.929449152397456, 40.497432241450426, 18.16562164810934, 109.22471190682732, 43.645329475040015, 124.41804514096708, 86.70355658950491, 46.98721180029833, 30.056367337832185, 53.49340615423396, 28.98351793709818, 30.60612791259938, 25.46008611874507, 23.194953080574923, 22.9250180102801, 68.83112037447593, 150.38098080702315, 56.4674445414089, 55.4813340637727, 54.072145053219565, 38.6289181056967, 36.30405290805499, 39.53429810841015, 35.334569826244056, 31.19066119547104, 28.90716584500295, 26.890883417391397, 26.151258861849637, 25.39208822983463, 25.14831235269695, 24.749699285869376, 24.415588448666874, 24.846216015693724, 23.808827561769682, 22.693189376870762, 21.849153316140885, 21.434446626169645, 20.91926180148231, 20.35857708817276, 20.266125437874237, 18.625426343618205, 18.590820178078857, 18.10880845235135, 18.235341186542673, 18.077808265210823, 204.90692032999402, 82.09334815994144, 53.08672589746965, 60.23590751742624, 29.86407925193761, 29.68747817987576, 21.386089053060395, 235.0718393473221, 68.83102983232196, 58.82110621160503, 48.19648778159033, 44.903743737782015, 39.509851226772085, 35.41171234427691, 35.47438122479864, 32.28174937429534, 30.255827375947202, 28.133727693650805, 27.77875042444384, 25.738071784157896, 24.97628093652198, 35.98362657923392, 28.724292095742303, 23.00454177426657, 30.418903684138584, 21.21463516685353, 21.478633565930433, 20.135779064385897, 19.785139198362383, 19.507034929095873, 19.82096943041849, 19.29454651231134, 19.072718721103094, 18.898137383317987, 39.661231228002684, 18.08971523331414, 17.58105930955556, 18.962210166281743, 34.84592931554371, 59.977812583599764, 27.06343363062974, 68.57307852049536, 69.77033396074992, 34.33452960766965, 37.43295253698963, 29.329040856397715, 24.447597884125653, 35.340348444728896, 26.07072151301199, 92.9613996109094, 64.12867809846594, 49.23572892066266, 38.243394390679526, 37.074592790460514, 35.7784105416789, 33.757721877326595, 33.90442880421732, 30.29843154165275, 29.19974527299514, 52.18856955607544, 24.737908253760132, 23.605020512793217, 23.053866240597905, 21.738384322360186, 21.485591928820558, 20.497056434892254, 20.343522231218028, 20.396251888838457, 20.776962859089497, 20.249056963741026, 19.79598901617154, 20.38929773821866, 19.467723763319455, 19.46562323255914, 19.409365875962724, 18.76419314644917, 17.77167695742014, 17.55295909017413, 16.496924920134955, 33.854569119661285, 38.029143846650484, 23.853571709716714, 114.06846157445986, 28.952941770089495, 32.17607951819987, 33.21315575879838, 33.93809551976111, 26.163502756990344], \"Term\": [\"watch\", \"india\", \"thank\", \"wishes\", \"congress\", \"bjp\", \"great\", \"pradesh\", \"people\", \"greetings\", \"rally\", \"government\", \"meeting\", \"indian\", \"shri\", \"state\", \"work\", \"speech\", \"today\", \"gandhi\", \"vaishnava\", \"proud\", \"addressing\", \"jana\", \"team\", \"special\", \"best\", \"public\", \"bengal\", \"tomorrow\", \"work\", \"team\", \"young\", \"interaction\", \"efforts\", \"kashi\", \"new\", \"looking\", \"thanks\", \"lives\", \"excellent\", \"culture\", \"poor\", \"lok\", \"youth\", \"sabha\", \"making\", \"entire\", \"effort\", \"congratulate\", \"country\", \"friends\", \"better\", \"peace\", \"jan\", \"doing\", \"ensure\", \"met\", \"history\", \"vaishnav\", \"family\", \"government\", \"dear\", \"india\", \"wonderful\", \"forward\", \"nation\", \"happy\", \"people\", \"working\", \"president\", \"today\", \"years\", \"development\", \"thank\", \"pradesh\", \"congress\", \"state\", \"bengal\", \"west\", \"leaders\", \"way\", \"know\", \"rallies\", \"come\", \"madhya\", \"massive\", \"corruption\", \"tmc\", \"farmers\", \"opportunity\", \"record\", \"want\", \"large\", \"place\", \"delight\", \"got\", \"ensuring\", \"took\", \"didi\", \"living\", \"welfare\", \"talked\", \"andhra\", \"join\", \"sector\", \"politics\", \"bjp\", \"support\", \"people\", \"today\", \"nda\", \"pictures\", \"rally\", \"strong\", \"party\", \"city\", \"development\", \"addressing\", \"shri\", \"wishes\", \"gandhi\", \"vaishnava\", \"jana\", \"bapu\", \"mahatma\", \"life\", \"birthday\", \"indians\", \"affection\", \"grateful\", \"sisters\", \"brothers\", \"crore\", \"words\", \"tributes\", \"singer\", \"power\", \"visit\", \"kind\", \"patel\", \"singh\", \"health\", \"healthcare\", \"honour\", \"sardar\", \"praying\", \"justice\", \"foundation\", \"thank\", \"greetings\", \"good\", \"best\", \"glad\", \"today\", \"like\", \"watch\", \"meeting\", \"speech\", \"public\", \"tomorrow\", \"projects\", \"minister\", \"rajasthan\", \"national\", \"various\", \"gujarat\", \"wide\", \"meet\", \"range\", \"delighted\", \"nadu\", \"energy\", \"tamil\", \"high\", \"mark\", \"issues\", \"chief\", \"bihar\", \"aspirations\", \"inaugurating\", \"central\", \"future\", \"speaking\", \"prime\", \"works\", \"karyakarta\", \"spoke\", \"addressing\", \"maharashtra\", \"rally\", \"bjp\", \"odisha\", \"development\", \"karyakartas\", \"look\", \"people\", \"nda\", \"great\", \"indian\", \"special\", \"men\", \"medal\", \"world\", \"para\", \"asian\", \"games\", \"shakti\", \"proud\", \"silver\", \"thoughts\", \"commitment\", \"contribution\", \"historic\", \"extremely\", \"forces\", \"bronze\", \"kumar\", \"technology\", \"gold\", \"appreciate\", \"spirit\", \"hockey\", \"rendition\", \"occasion\", \"yuva\", \"hardworking\", \"garu\", \"women\", \"won\", \"home\", \"india\", \"congratulations\", \"programme\", \"day\", \"years\", \"nation\"], \"Total\": [235.0, 381.0, 234.0, 152.0, 155.0, 179.0, 93.0, 91.0, 251.0, 100.0, 122.0, 102.0, 69.0, 64.0, 69.0, 69.0, 72.0, 59.0, 161.0, 57.0, 56.0, 53.0, 83.0, 54.0, 64.0, 50.0, 75.0, 48.0, 47.0, 45.0, 72.01034959952335, 64.14205039640672, 50.456796047513656, 49.65155413967868, 42.93354636884604, 40.508411568292956, 41.02587986035707, 38.16447406307914, 35.76285024072692, 33.75731610262217, 33.14094697600991, 32.63268705888651, 29.102855687853317, 26.105905546489147, 25.410278807393947, 24.94085640000912, 24.371420667645147, 23.978968262979798, 23.590639943113324, 23.523446658120054, 22.791656247583813, 21.92104781755317, 22.281587295130073, 21.827345216289892, 21.630424989649324, 20.655998811763393, 19.59171688277493, 18.84752122682892, 18.07628749667958, 16.84012783426197, 27.888862446570087, 102.06825075342509, 40.41949333673174, 381.324998819549, 74.80816539897876, 68.04297855728502, 82.83470547714579, 77.15545539704264, 251.24944120375392, 47.672805254495785, 69.79930996303106, 161.5216262801475, 67.22528196115977, 96.36447298837405, 234.02798363742914, 91.18564733614986, 155.63171158751885, 69.44176466716453, 47.41242563388904, 38.40368035617759, 33.97248766957011, 32.110560119702455, 31.982128900647545, 29.27818080216728, 28.48219180933883, 28.403976802599505, 27.94279843265309, 26.05082864561154, 25.737083034525035, 23.9949169106444, 23.57329984250977, 23.07768847138384, 22.393087972679535, 21.92065637777517, 21.850198999692775, 21.4439933782935, 20.966920487346417, 19.95676752974941, 20.478983201925644, 22.073174659794365, 18.791236542774328, 20.603009506964842, 18.806220599420545, 18.62155730409968, 18.71347406196726, 43.88378773731978, 19.013540011596177, 179.56201618469305, 60.752054520288276, 251.24944120375392, 161.5216262801475, 77.76187075783047, 39.830206594091266, 122.65460823497817, 44.91937865326746, 54.91622784548684, 35.680061815670726, 96.36447298837405, 83.46734237118596, 69.64339296703375, 152.38021057680953, 57.27086941226626, 56.29556727553074, 54.9341519840731, 39.432949681344645, 37.1068190236458, 40.43419676758063, 36.13938668120992, 32.00042145999478, 29.721529438936876, 27.701904832992646, 26.95953688343977, 26.20064605341171, 25.96067033535038, 25.554070170383703, 25.222229047135905, 25.67057754065667, 24.630500761601727, 23.510714799730003, 22.653169504194537, 22.245507590967, 21.73778044225263, 21.167485878462312, 21.079170262467965, 19.43691016317546, 19.401585224955888, 18.91435620302642, 19.053266764702794, 18.904051708034974, 234.02798363742914, 100.51723608064464, 63.289443439507245, 75.70728153241154, 34.867528000134264, 161.5216262801475, 37.5861211527762, 235.91917123690683, 69.60961473998958, 59.63424465328009, 48.973409059968375, 45.68074176570352, 40.28592242000906, 36.1925969106368, 36.259838958672404, 33.06929328354806, 31.034589049616, 28.9100885710392, 28.551348493272688, 26.524896678148785, 25.749672707711696, 37.105155310173046, 29.68750014539197, 23.788123581367884, 31.473948090787047, 21.99916994358161, 22.278900306979892, 20.914489518899682, 20.569629654275495, 20.284658212928175, 20.613884199651526, 20.069321063679443, 19.852722774097717, 19.689569602108485, 41.36435102720292, 18.86870504090077, 18.35729147139228, 19.805897423454127, 41.53073690282381, 83.46734237118596, 31.749905687642098, 122.65460823497817, 179.56201618469305, 56.88011344692569, 96.36447298837405, 57.09845037890436, 48.47201342336539, 251.24944120375392, 77.76187075783047, 93.80201877877505, 64.91613221506842, 50.0278257323727, 39.02677544108212, 37.86274901626345, 36.56836394317603, 34.54018102112545, 34.69291449948908, 31.08201686032599, 29.984206551293898, 53.68520204293173, 25.522494266605566, 24.393308818265492, 23.84400360357051, 22.529121263155396, 22.274368915384667, 21.288197231090642, 21.129250807805718, 21.18426329323634, 21.58244679415817, 21.0395612146029, 20.57866495681995, 21.197123274893354, 20.252928620612625, 20.270460472385484, 20.219572379104022, 19.55029689102126, 18.555481271197575, 18.353185366089985, 17.301379801432965, 37.955726064453955, 45.197165399843286, 27.43038992613967, 381.324998819549, 42.30765585003776, 53.456769272185305, 59.112747328075734, 67.22528196115977, 82.83470547714579], \"loglift\": [30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, 1.3995, 1.3978, 1.3947, 1.3945, 1.392, 1.3907, 1.3904, 1.3895, 1.3882, 1.3868, 1.3863, 1.3858, 1.383, 1.3798, 1.3785, 1.3782, 1.3774, 1.3769, 1.3764, 1.376, 1.3751, 1.3739, 1.3738, 1.3735, 1.3732, 1.3713, 1.3691, 1.3675, 1.3654, 1.3623, 1.3605, 1.3306, 1.3168, 1.053, 1.1213, 1.0225, 0.9183, 0.8765, 0.3964, 1.0598, 0.7322, 0.1262, 0.6895, 0.4082, -0.7236, 1.6066, 1.6024, 1.6007, 1.5992, 1.5948, 1.5929, 1.5916, 1.5905, 1.5895, 1.5886, 1.5885, 1.588, 1.5858, 1.5845, 1.5834, 1.5827, 1.5819, 1.5809, 1.5803, 1.5799, 1.5789, 1.5784, 1.5765, 1.5761, 1.5758, 1.5742, 1.5741, 1.574, 1.5739, 1.5733, 1.5358, 1.5705, 1.119, 1.2854, 0.9133, 0.9939, 1.1123, 1.3345, 0.7863, 1.1779, 1.0315, 1.2786, 0.1919, 0.3238, 1.6297, 1.6282, 1.6273, 1.6268, 1.6256, 1.6208, 1.6195, 1.6189, 1.6189, 1.6158, 1.6136, 1.6117, 1.611, 1.6101, 1.6096, 1.6094, 1.6089, 1.6088, 1.6075, 1.606, 1.6053, 1.6043, 1.603, 1.6024, 1.6021, 1.5988, 1.5987, 1.5979, 1.5975, 1.5967, 1.5085, 1.4389, 1.4656, 1.4128, 1.4865, -0.0525, 1.0775, 1.6503, 1.6426, 1.6402, 1.6379, 1.6367, 1.6344, 1.6321, 1.632, 1.6298, 1.6285, 1.6267, 1.6265, 1.6238, 1.6234, 1.6232, 1.6209, 1.6204, 1.6198, 1.6176, 1.6173, 1.6159, 1.615, 1.6148, 1.6147, 1.6145, 1.6138, 1.6129, 1.6118, 1.6117, 1.6107, 1.6104, 1.4784, 1.3234, 1.4942, 1.0724, 0.7086, 1.1491, 0.7083, 0.9877, 0.9694, -0.3075, 0.5611, 1.7492, 1.746, 1.7423, 1.738, 1.7372, 1.7364, 1.7353, 1.7353, 1.7327, 1.7317, 1.73, 1.727, 1.7254, 1.7246, 1.7225, 1.7222, 1.7204, 1.7204, 1.7203, 1.7202, 1.72, 1.7195, 1.7194, 1.7187, 1.7177, 1.7174, 1.7172, 1.7151, 1.7137, 1.7106, 1.6439, 1.5856, 1.6185, 0.5514, 1.379, 1.2506, 1.1818, 1.0747, 0.6058], \"logprob\": [30.0, 29.0, 28.0, 27.0, 26.0, 25.0, 24.0, 23.0, 22.0, 21.0, 20.0, 19.0, 18.0, 17.0, 16.0, 15.0, 14.0, 13.0, 12.0, 11.0, 10.0, 9.0, 8.0, 7.0, 6.0, 5.0, 4.0, 3.0, 2.0, 1.0, -3.749, -3.8664, -4.1095, -4.1259, -4.2737, -4.3331, -4.3207, -4.394, -4.4602, -4.5194, -4.5383, -4.5543, -4.6715, -4.7835, -4.8117, -4.8306, -4.8545, -4.8712, -4.8881, -4.8914, -4.9239, -4.9641, -4.9478, -4.9687, -4.9781, -5.026, -5.0812, -5.1215, -5.1654, -5.2393, -4.7367, -3.4691, -4.4093, -2.4287, -3.9891, -4.1827, -4.0902, -4.203, -3.5025, -4.5012, -4.4475, -4.2145, -4.5278, -4.449, -4.6936, -3.3059, -2.7755, -3.5842, -3.9673, -4.1824, -4.3069, -4.3645, -4.3697, -4.459, -4.4875, -4.4903, -4.5072, -4.5795, -4.5929, -4.6641, -4.6826, -4.7046, -4.7357, -4.7577, -4.7613, -4.781, -4.804, -4.8554, -4.8299, -4.7552, -4.9177, -4.8259, -4.9172, -4.9272, -4.9229, -4.1081, -4.9098, -3.1159, -4.0332, -2.9857, -3.3468, -3.9594, -4.4062, -3.8297, -4.4426, -4.3881, -4.5722, -4.6654, -4.6771, -3.5523, -2.7708, -3.7503, -3.7679, -3.7936, -4.13, -4.192, -4.1068, -4.2191, -4.3438, -4.4199, -4.4922, -4.5201, -4.5495, -4.5592, -4.5752, -4.5887, -4.5713, -4.6139, -4.6619, -4.6998, -4.719, -4.7433, -4.7705, -4.775, -4.8594, -4.8613, -4.8876, -4.8806, -4.8893, -2.4614, -3.3761, -3.812, -3.6857, -4.3873, -4.3932, -4.7212, -2.3116, -3.5398, -3.697, -3.8962, -3.967, -4.0949, -4.2044, -4.2027, -4.297, -4.3618, -4.4345, -4.4472, -4.5235, -4.5536, -4.1884, -4.4137, -4.6358, -4.3564, -4.7168, -4.7044, -4.769, -4.7865, -4.8007, -4.7847, -4.8117, -4.8232, -4.8324, -4.0911, -4.8761, -4.9047, -4.829, -4.2205, -3.6775, -4.4733, -3.5436, -3.5263, -4.2353, -4.1489, -4.3929, -4.5749, -4.2065, -4.5107, -3.1349, -3.5062, -3.7705, -4.0231, -4.0542, -4.0898, -4.1479, -4.1436, -4.256, -4.293, -3.7123, -4.4588, -4.5057, -4.5293, -4.588, -4.5997, -4.6468, -4.6544, -4.6518, -4.6333, -4.659, -4.6816, -4.6521, -4.6984, -4.6985, -4.7014, -4.7352, -4.7895, -4.8019, -4.8639, -4.145, -4.0288, -4.4952, -2.9303, -4.3014, -4.1959, -4.1642, -4.1426, -4.4028]}, \"token.table\": {\"Topic\": [2, 4, 3, 2, 5, 5, 4, 3, 2, 1, 3, 1, 4, 3, 2, 4, 5, 3, 4, 4, 2, 4, 2, 5, 1, 1, 5, 2, 4, 5, 2, 1, 3, 1, 3, 4, 5, 1, 2, 5, 2, 2, 4, 1, 2, 4, 2, 1, 1, 1, 4, 1, 2, 1, 1, 5, 1, 3, 2, 5, 1, 4, 3, 1, 4, 5, 3, 5, 3, 4, 5, 1, 2, 3, 2, 1, 3, 3, 5, 3, 5, 4, 1, 2, 4, 5, 3, 3, 4, 5, 1, 5, 1, 4, 5, 3, 4, 1, 5, 5, 3, 1, 4, 1, 3, 2, 3, 4, 1, 2, 4, 1, 3, 2, 5, 2, 2, 3, 1, 3, 1, 2, 1, 1, 4, 1, 2, 3, 4, 3, 1, 4, 2, 5, 4, 4, 5, 1, 4, 4, 1, 4, 5, 4, 1, 2, 4, 1, 5, 1, 2, 4, 2, 5, 1, 2, 3, 1, 1, 2, 4, 2, 4, 2, 2, 1, 3, 2, 3, 1, 3, 4, 5, 4, 1, 5, 4, 1, 5, 4, 4, 2, 2, 4, 4, 2, 5, 1, 3, 2, 3, 5, 3, 5, 3, 3, 3, 2, 4, 5, 4, 5, 2, 4, 2, 1, 2, 2, 4, 5, 2, 4, 1, 5, 1, 3, 5, 1, 5, 2, 1, 2, 3, 4, 2, 3, 1, 3, 4, 3, 2, 4, 2, 2, 2, 4, 1, 3, 2, 5, 1, 2, 5, 1, 4, 3, 1, 1, 2, 3, 5, 4, 5, 1, 5, 1, 1, 5], \"Freq\": [0.27555687466023726, 0.7188440208527929, 0.9757236773289455, 0.9666216260031678, 0.9435242575434153, 0.9800272041284026, 0.9702198676529917, 0.9890206113201451, 0.9913013175686533, 0.198131536311712, 0.792526145246848, 0.9424822263263901, 0.9859668223176296, 0.9684724400206182, 0.6070326136674992, 0.3898374583185774, 0.9440970272676676, 0.9541749447336484, 0.9570475655253554, 0.9723072479257255, 0.7006714318252658, 0.2802685727301063, 0.9830704107125376, 0.9646031087059505, 0.9777478757374457, 0.30727299205797043, 0.6854551361293187, 0.9895155584239574, 0.012850851408103343, 0.9765138969702857, 0.9596623715925997, 0.9652655235326421, 0.9629951644953387, 0.9806118614215001, 0.25375237453860844, 0.1860850746616462, 0.5582552239849387, 0.9153998960787509, 0.049481075463716266, 0.024740537731858133, 0.9792952100636756, 0.026950432942287994, 0.9702155859223678, 0.3632043938456717, 0.23867717309858427, 0.38395893063685294, 0.9513810461641876, 0.9682417288197264, 0.9749629537588808, 0.9782560154517436, 0.9668690311502676, 0.969797599346938, 0.9520579909385043, 0.9591738788657063, 0.9655728915400089, 0.9394877256581747, 0.9681284079523508, 0.035856607701938915, 0.9585363469125812, 0.9465550947320601, 0.6760433034434676, 0.3086284646154961, 0.9521768284388095, 0.9579834036575731, 0.964977924045905, 0.9651883317228649, 0.977809496777186, 0.924781733227706, 0.8603993951014961, 0.11471991934686615, 0.9718803451033312, 0.12640338680883628, 0.03160084670220907, 0.8374224376085404, 0.953883523909486, 0.9209523951486516, 0.06858156134085704, 0.9746622177346922, 0.9914498772071575, 0.8157804889721767, 0.1790737658719412, 0.9685200351841576, 0.5832380843121152, 0.19441269477070505, 0.22033438740679906, 0.980756181608532, 0.9448453214913815, 0.9488039496322368, 0.9545814707489396, 0.9427876533685103, 0.9404585982117577, 0.9373245381319169, 0.03645591632830032, 0.10936774898490098, 0.8749419918792078, 0.9775216246045517, 0.9467186229027622, 0.700190128700033, 0.29895758304046355, 0.9858874491777598, 0.9687372411252315, 0.9868774673629401, 0.9562748343404084, 0.970854710901381, 0.9829950595333858, 0.9618737782410319, 0.9447198856915168, 0.959310229361292, 0.36778581311129027, 0.10508166088894008, 0.5078946942965437, 0.9874492346500473, 0.9711665290778143, 0.9692913219223608, 0.9730129396489084, 0.9580005104815839, 0.9713742579280944, 0.9892616447885331, 0.4256890445003581, 0.5587168709067201, 0.9775658674901782, 0.9578933221891363, 0.9576377251300568, 0.47450061129321913, 0.49513107265379386, 0.9694880096826575, 0.9857774562552616, 0.1259846262018002, 0.8503962268621513, 0.9701720855419999, 0.9847599911096593, 0.9425958961457708, 0.9662596989014757, 0.977213777692347, 0.9802111697354435, 0.9912423773315417, 0.9736904873775128, 0.9550327485174815, 0.9670485952256633, 0.976842100479158, 0.6156839661133457, 0.07243340777804066, 0.3138781003715096, 0.96766506999773, 0.05143909169131207, 0.6044093273729169, 0.33435409599352844, 0.974994323976745, 0.9718522488896835, 0.03516167389268978, 0.3691975758732427, 0.5977484561757263, 0.9756801191882378, 0.9843607935698119, 0.43702928882017855, 0.564496164726064, 0.9440108261915879, 0.9620959302154419, 0.36218986026003697, 0.49353343595873167, 0.13930379240770652, 0.7531971979389743, 0.2259591593816923, 0.961089645009424, 0.9466937765940467, 0.9621048978944834, 0.9744016263532628, 0.986997434675448, 0.9516580848318741, 0.5014376219268875, 0.2435554163644882, 0.1862482595728439, 0.07163394598955536, 0.9539605373544331, 0.3928407998821348, 0.5986145522013483, 0.9929026716323356, 0.018627106948397178, 0.9686095613166533, 0.9801237226761889, 0.9652552522335159, 0.9904986992174497, 0.4321076946286773, 0.5625553005543158, 0.9708861267394991, 0.9533017150864063, 0.9396835721231972, 0.9622764998555231, 0.9793014220075514, 0.9114983473950012, 0.0683623760546251, 0.967175834731187, 0.9907616079627496, 0.9795280876097908, 0.9738775826295837, 0.9660599919935442, 0.9644082579167308, 0.02417540648328698, 0.9670162593314793, 0.9794549189910606, 0.9893644221207519, 0.9381359286805838, 0.14447131082790973, 0.8427493131628068, 0.9792377876041178, 0.3339316003408006, 0.6456010939922145, 0.7242553416083419, 0.18106383540208548, 0.09876209203750118, 0.9571301104781582, 0.9531692660057955, 0.9821949814614799, 0.9505901665914318, 0.11964381167074173, 0.8759636211607876, 0.004272993273955062, 0.978669199026587, 0.9838763645721164, 0.9713610499862679, 0.2786004638286069, 0.5386275634019734, 0.18573364255240463, 0.9850978390588523, 0.9766109871177293, 0.9515415927413959, 0.9501115524460156, 0.976986335901195, 0.966663355910337, 0.9782773597451037, 0.9824460131108708, 0.9961038722199316, 0.965414489328044, 0.9707319696784591, 0.9894884981742993, 0.9806892310742311, 0.006562531946994095, 0.9843797920491142, 0.10538594343334282, 0.895780519183414, 0.04425056266928932, 0.1106264066732233, 0.840760690716497, 0.7485813841488015, 0.24061544490497191, 0.9783177330777681, 0.9859693834963684, 0.7131948669371335, 0.06292895884739413, 0.020976319615798045, 0.2307395157737785, 0.9805368089323484, 0.9844574959913651, 0.49088674732619425, 0.5057621033057759, 0.9909467884745693, 0.9838538250404965, 0.9700637637429641], \"Term\": [\"addressing\", \"addressing\", \"affection\", \"andhra\", \"appreciate\", \"asian\", \"aspirations\", \"bapu\", \"bengal\", \"best\", \"best\", \"better\", \"bihar\", \"birthday\", \"bjp\", \"bjp\", \"bronze\", \"brothers\", \"central\", \"chief\", \"city\", \"city\", \"come\", \"commitment\", \"congratulate\", \"congratulations\", \"congratulations\", \"congress\", \"congress\", \"contribution\", \"corruption\", \"country\", \"crore\", \"culture\", \"day\", \"day\", \"day\", \"dear\", \"dear\", \"dear\", \"delight\", \"delighted\", \"delighted\", \"development\", \"development\", \"development\", \"didi\", \"doing\", \"effort\", \"efforts\", \"energy\", \"ensure\", \"ensuring\", \"entire\", \"excellent\", \"extremely\", \"family\", \"family\", \"farmers\", \"forces\", \"forward\", \"forward\", \"foundation\", \"friends\", \"future\", \"games\", \"gandhi\", \"garu\", \"glad\", \"glad\", \"gold\", \"good\", \"good\", \"good\", \"got\", \"government\", \"government\", \"grateful\", \"great\", \"greetings\", \"greetings\", \"gujarat\", \"happy\", \"happy\", \"happy\", \"hardworking\", \"health\", \"healthcare\", \"high\", \"historic\", \"history\", \"hockey\", \"home\", \"home\", \"home\", \"honour\", \"inaugurating\", \"india\", \"india\", \"indian\", \"indians\", \"interaction\", \"issues\", \"jan\", \"jana\", \"join\", \"justice\", \"karyakarta\", \"karyakartas\", \"karyakartas\", \"karyakartas\", \"kashi\", \"kind\", \"know\", \"kumar\", \"large\", \"leaders\", \"life\", \"like\", \"like\", \"lives\", \"living\", \"lok\", \"look\", \"look\", \"looking\", \"madhya\", \"maharashtra\", \"maharashtra\", \"mahatma\", \"making\", \"mark\", \"massive\", \"medal\", \"meet\", \"meeting\", \"men\", \"met\", \"minister\", \"nadu\", \"nation\", \"nation\", \"nation\", \"national\", \"nda\", \"nda\", \"nda\", \"new\", \"occasion\", \"odisha\", \"odisha\", \"odisha\", \"opportunity\", \"para\", \"party\", \"party\", \"patel\", \"peace\", \"people\", \"people\", \"people\", \"pictures\", \"pictures\", \"place\", \"politics\", \"poor\", \"power\", \"pradesh\", \"praying\", \"president\", \"president\", \"president\", \"president\", \"prime\", \"programme\", \"programme\", \"projects\", \"proud\", \"proud\", \"public\", \"rajasthan\", \"rallies\", \"rally\", \"rally\", \"range\", \"record\", \"rendition\", \"sabha\", \"sardar\", \"sector\", \"sector\", \"shakti\", \"shri\", \"silver\", \"singer\", \"singh\", \"sisters\", \"speaking\", \"speaking\", \"special\", \"speech\", \"spirit\", \"spoke\", \"spoke\", \"state\", \"strong\", \"strong\", \"support\", \"support\", \"support\", \"talked\", \"tamil\", \"team\", \"technology\", \"thank\", \"thank\", \"thank\", \"thanks\", \"thoughts\", \"tmc\", \"today\", \"today\", \"today\", \"tomorrow\", \"took\", \"tributes\", \"vaishnav\", \"vaishnava\", \"various\", \"visit\", \"want\", \"watch\", \"way\", \"welfare\", \"west\", \"wide\", \"wishes\", \"wishes\", \"women\", \"women\", \"won\", \"won\", \"won\", \"wonderful\", \"wonderful\", \"words\", \"work\", \"working\", \"working\", \"working\", \"working\", \"works\", \"world\", \"years\", \"years\", \"young\", \"youth\", \"yuva\"]}, \"R\": 30, \"lambda.step\": 0.01, \"plot.opts\": {\"xlab\": \"PC1\", \"ylab\": \"PC2\"}, \"topic.order\": [2, 1, 3, 5, 4]};\n",
"\n",
"function LDAvis_load_lib(url, callback){\n",
" var s = document.createElement('script');\n",
" s.src = url;\n",
" s.async = true;\n",
" s.onreadystatechange = s.onload = callback;\n",
" s.onerror = function(){console.warn(\"failed to load library \" + url);};\n",
" document.getElementsByTagName(\"head\")[0].appendChild(s);\n",
"}\n",
"\n",
"if(typeof(LDAvis) !== \"undefined\"){\n",
" // already loaded: just create the visualization\n",
" !function(LDAvis){\n",
" new LDAvis(\"#\" + \"ldavis_el1316821927442918082938389136\", ldavis_el1316821927442918082938389136_data);\n",
" }(LDAvis);\n",
"}else if(typeof define === \"function\" && define.amd){\n",
" // require.js is available: use it to load d3/LDAvis\n",
" require.config({paths: {d3: \"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min\"}});\n",
" require([\"d3\"], function(d3){\n",
" window.d3 = d3;\n",
" LDAvis_load_lib(\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.js\", function(){\n",
" new LDAvis(\"#\" + \"ldavis_el1316821927442918082938389136\", ldavis_el1316821927442918082938389136_data);\n",
" });\n",
" });\n",
"}else{\n",
" // require.js not available: dynamically load d3 & LDAvis\n",
" LDAvis_load_lib(\"https://cdnjs.cloudflare.com/ajax/libs/d3/3.5.5/d3.min.js\", function(){\n",
" LDAvis_load_lib(\"https://cdn.rawgit.com/bmabey/pyLDAvis/files/ldavis.v1.0.0.js\", function(){\n",
" new LDAvis(\"#\" + \"ldavis_el1316821927442918082938389136\", ldavis_el1316821927442918082938389136_data);\n",
" })\n",
" });\n",
"}\n",
"</script>"
],
"text/plain": [
"PreparedData(topic_coordinates= x y topics cluster Freq\n",
"topic \n",
"1 -0.063689 0.102246 1 1 24.396487\n",
"0 0.239289 -0.000819 2 1 19.867734\n",
"2 -0.190596 -0.337961 3 1 19.370764\n",
"4 0.247856 -0.005464 4 1 19.130425\n",
"3 -0.232860 0.241998 5 1 17.234589, topic_info= Category Freq Term Total loglift logprob\n",
"term \n",
"441 Default 235.000000 watch 235.000000 30.0000 30.0000\n",
"192 Default 381.000000 india 381.000000 29.0000 29.0000\n",
"405 Default 234.000000 thank 234.000000 28.0000 28.0000\n",
"449 Default 152.000000 wishes 152.000000 27.0000 27.0000\n",
"77 Default 155.000000 congress 155.000000 26.0000 26.0000\n",
"38 Default 179.000000 bjp 179.000000 25.0000 25.0000\n",
"155 Default 93.000000 great 93.000000 24.0000 24.0000\n",
"308 Default 91.000000 pradesh 91.000000 23.0000 23.0000\n",
"294 Default 251.000000 people 251.000000 22.0000 22.0000\n",
"157 Default 100.000000 greetings 100.000000 21.0000 21.0000\n",
"328 Default 122.000000 rally 122.000000 20.0000 20.0000\n",
"152 Default 102.000000 government 102.000000 19.0000 19.0000\n",
"257 Default 69.000000 meeting 69.000000 18.0000 18.0000\n",
"193 Default 64.000000 indian 64.000000 17.0000 17.0000\n",
"361 Default 69.000000 shri 69.000000 16.0000 16.0000\n",
"379 Default 69.000000 state 69.000000 15.0000 15.0000\n",
"455 Default 72.000000 work 72.000000 14.0000 14.0000\n",
"375 Default 59.000000 speech 59.000000 13.0000 13.0000\n",
"412 Default 161.000000 today 161.000000 12.0000 12.0000\n",
"140 Default 57.000000 gandhi 57.000000 11.0000 11.0000\n",
"428 Default 56.000000 vaishnava 56.000000 10.0000 10.0000\n",
"322 Default 53.000000 proud 53.000000 9.0000 9.0000\n",
"2 Default 83.000000 addressing 83.000000 8.0000 8.0000\n",
"206 Default 54.000000 jana 54.000000 7.0000 7.0000\n",
"401 Default 64.000000 team 64.000000 6.0000 6.0000\n",
"374 Default 50.000000 special 50.000000 5.0000 5.0000\n",
"31 Default 75.000000 best 75.000000 4.0000 4.0000\n",
"324 Default 48.000000 public 48.000000 3.0000 3.0000\n",
"30 Default 47.000000 bengal 47.000000 2.0000 2.0000\n",
"413 Default 45.000000 tomorrow 45.000000 1.0000 1.0000\n",
"... ... ... ... ... ... ...\n",
"357 Topic5 29.199745 shakti 29.984207 1.7317 -4.2930\n",
"322 Topic5 52.188570 proud 53.685202 1.7300 -3.7123\n",
"363 Topic5 24.737908 silver 25.522494 1.7270 -4.4588\n",
"407 Topic5 23.605021 thoughts 24.393309 1.7254 -4.5057\n",
"71 Topic5 23.053866 commitment 23.844004 1.7246 -4.5293\n",
"80 Topic5 21.738384 contribution 22.529121 1.7225 -4.5880\n",
"173 Topic5 21.485592 historic 22.274369 1.7222 -4.5997\n",
"122 Topic5 20.497056 extremely 21.288197 1.7204 -4.6468\n",
"129 Topic5 20.343522 forces 21.129251 1.7204 -4.6544\n",
"47 Topic5 20.396252 bronze 21.184263 1.7203 -4.6518\n",
"224 Topic5 20.776963 kumar 21.582447 1.7202 -4.6333\n",
"402 Topic5 20.249057 technology 21.039561 1.7200 -4.6590\n",
"148 Topic5 19.795989 gold 20.578665 1.7195 -4.6816\n",
"12 Topic5 20.389298 appreciate 21.197123 1.7194 -4.6521\n",
"376 Topic5 19.467724 spirit 20.252929 1.7187 -4.6984\n",
"175 Topic5 19.465623 hockey 20.270460 1.7177 -4.6985\n",
"336 Topic5 19.409366 rendition 20.219572 1.7174 -4.7014\n",
"281 Topic5 18.764193 occasion 19.550297 1.7172 -4.7352\n",
"467 Topic5 17.771677 yuva 18.555481 1.7151 -4.7895\n",
"162 Topic5 17.552959 hardworking 18.353185 1.7137 -4.8019\n",
"141 Topic5 16.496925 garu 17.301380 1.7106 -4.8639\n",
"451 Topic5 33.854569 women 37.955726 1.6439 -4.1450\n",
"452 Topic5 38.029144 won 45.197165 1.5856 -4.0288\n",
"176 Topic5 23.853572 home 27.430390 1.6185 -4.4952\n",
"192 Topic5 114.068462 india 381.324999 0.5514 -2.9303\n",
"76 Topic5 28.952942 congratulations 42.307656 1.3790 -4.3014\n",
"316 Topic5 32.176080 programme 53.456769 1.2506 -4.1959\n",
"89 Topic5 33.213156 day 59.112747 1.1818 -4.1642\n",
"461 Topic5 33.938096 years 67.225282 1.0747 -4.1426\n",
"274 Topic5 26.163503 nation 82.834705 0.6058 -4.4028\n",
"\n",
"[237 rows x 6 columns], token_table= Topic Freq Term\n",
"term \n",
"2 2 0.275557 addressing\n",
"2 4 0.718844 addressing\n",
"3 3 0.975724 affection\n",
"8 2 0.966622 andhra\n",
"12 5 0.943524 appreciate\n",
"18 5 0.980027 asian\n",
"21 4 0.970220 aspirations\n",
"29 3 0.989021 bapu\n",
"30 2 0.991301 bengal\n",
"31 1 0.198132 best\n",
"31 3 0.792526 best\n",
"32 1 0.942482 better\n",
"35 4 0.985967 bihar\n",
"37 3 0.968472 birthday\n",
"38 2 0.607033 bjp\n",
"38 4 0.389837 bjp\n",
"47 5 0.944097 bronze\n",
"48 3 0.954175 brothers\n",
"55 4 0.957048 central\n",
"59 4 0.972307 chief\n",
"62 2 0.700671 city\n",
"62 4 0.280269 city\n",
"68 2 0.983070 come\n",
"71 5 0.964603 commitment\n",
"75 1 0.977748 congratulate\n",
"76 1 0.307273 congratulations\n",
"76 5 0.685455 congratulations\n",
"77 2 0.989516 congress\n",
"77 4 0.012851 congress\n",
"80 5 0.976514 contribution\n",
"... ... ... ...\n",
"430 4 0.966663 various\n",
"433 3 0.978277 visit\n",
"439 2 0.982446 want\n",
"441 4 0.996104 watch\n",
"442 2 0.965414 way\n",
"444 2 0.970732 welfare\n",
"445 2 0.989488 west\n",
"446 4 0.980689 wide\n",
"449 1 0.006563 wishes\n",
"449 3 0.984380 wishes\n",
"451 2 0.105386 women\n",
"451 5 0.895781 women\n",
"452 1 0.044251 won\n",
"452 2 0.110626 won\n",
"452 5 0.840761 won\n",
"453 1 0.748581 wonderful\n",
"453 4 0.240615 wonderful\n",
"454 3 0.978318 words\n",
"455 1 0.985969 work\n",
"457 1 0.713195 working\n",
"457 2 0.062929 working\n",
"457 3 0.020976 working\n",
"457 5 0.230740 working\n",
"458 4 0.980537 works\n",
"459 5 0.984457 world\n",
"461 1 0.490887 years\n",
"461 5 0.505762 years\n",
"464 1 0.990947 young\n",
"466 1 0.983854 youth\n",
"467 5 0.970064 yuva\n",
"\n",
"[258 rows x 3 columns], R=30, lambda_step=0.01, plot_opts={'xlab': 'PC1', 'ylab': 'PC2'}, topic_order=[2, 1, 3, 5, 4])"
]
},
"execution_count": 354,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pyLDAvis.sklearn.prepare(lda_tf, dtm_tf, tf_vectorizer)"
]
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.7.0"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment