├── .gitignore ├── data ├── t tests .jpg ├── Kernel PCA .jpg ├── MSE vs MAE .jpg ├── Fstatistics .jpg ├── Cross Entropy .jpg ├── Euclidean Norm .jpg ├── Learning Curve .jpg ├── Standardization .jpg ├── Confusion Matrix .jpg ├── Handling Outliers .jpg ├── Mean Square Error .jpg ├── Ridge Regression .jpg ├── Knearest Neighbors .jpg ├── Principal Components .jpg ├── Training Error Rate .jpg ├── Youdens JStatistic .jpg ├── General Additive Model .jpg ├── KFold Cross-Validation .jpg ├── Naive Bayes Classifier .jpg ├── How to avoid overfitting .jpg ├── Precision Recall Tradeoff .jpg ├── Leave One Out CrossValidation .jpg ├── Singular Value Decomposition .jpg ├── What Are Principal Components .jpg ├── Why is nearest neighbor lazy .jpg ├── Chisquared For Feature Selection .jpg ├── Fundamental Theorem Of Calculus .jpg ├── Convex Hulls and Support Vector Machines .jpg ├── Heteroscedasticity with a k, apparently) .jpg └── Preprocessing When You Have Training And Test Sets .jpg ├── twitter-ml-flashcards_files ├── bootstrap-3.3.5 │ ├── css │ │ ├── fonts │ │ │ ├── Lato.ttf │ │ │ ├── Raleway.ttf │ │ │ ├── Roboto.ttf │ │ │ ├── Ubuntu.ttf │ │ │ ├── LatoBold.ttf │ │ │ ├── NewsCycle.ttf │ │ │ ├── OpenSans.ttf │ │ │ ├── LatoItalic.ttf │ │ │ ├── OpenSansBold.ttf │ │ │ ├── RalewayBold.ttf │ │ │ ├── RobotoBold.ttf │ │ │ ├── RobotoLight.ttf │ │ │ ├── RobotoMedium.ttf │ │ │ ├── NewsCycleBold.ttf │ │ │ ├── OpenSansItalic.ttf │ │ │ ├── OpenSansLight.ttf │ │ │ ├── SourceSansPro.ttf │ │ │ ├── SourceSansProBold.ttf │ │ │ ├── OpenSansBoldItalic.ttf │ │ │ ├── OpenSansLightItalic.ttf │ │ │ ├── SourceSansProItalic.ttf │ │ │ └── SourceSansProLight.ttf │ │ ├── bootstrap-theme.min.css │ │ ├── bootstrap-theme.css │ │ └── bootstrap-theme.css.map │ ├── fonts │ │ ├── glyphicons-halflings-regular.eot │ │ ├── glyphicons-halflings-regular.ttf │ │ ├── glyphicons-halflings-regular.woff │ │ └── glyphicons-halflings-regular.woff2 │ ├── js │ │ ├── npm.js │ │ └── bootstrap.min.js │ └── shim │ │ ├── html5shiv.min.js │ │ └── respond.min.js ├── navigation-1.1 │ ├── sourceembed.js │ ├── codefolding.js │ ├── FileSaver.min.js │ └── tabsets.js └── highlightjs-1.1 │ ├── default.css │ ├── textmate.css │ └── highlight.js ├── ml-flashcards.Rproj ├── README.md ├── twitter-ml-flashcards.Rmd └── twitter-ml-flashcards.html /.gitignore: -------------------------------------------------------------------------------- 1 | .Rproj.user 2 | .Rhistory 3 | .RData 4 | .Ruserdata 5 | -------------------------------------------------------------------------------- /data/t tests .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/t tests .jpg -------------------------------------------------------------------------------- /data/Kernel PCA .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Kernel PCA .jpg -------------------------------------------------------------------------------- /data/MSE vs MAE .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/MSE vs MAE .jpg -------------------------------------------------------------------------------- /data/Fstatistics .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Fstatistics .jpg -------------------------------------------------------------------------------- /data/Cross Entropy .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Cross Entropy .jpg -------------------------------------------------------------------------------- /data/Euclidean Norm .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Euclidean Norm .jpg -------------------------------------------------------------------------------- /data/Learning Curve .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Learning Curve .jpg -------------------------------------------------------------------------------- /data/Standardization .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Standardization .jpg -------------------------------------------------------------------------------- /data/Confusion Matrix .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Confusion Matrix .jpg -------------------------------------------------------------------------------- /data/Handling Outliers .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Handling Outliers .jpg -------------------------------------------------------------------------------- /data/Mean Square Error .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Mean Square Error .jpg -------------------------------------------------------------------------------- /data/Ridge Regression .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Ridge Regression .jpg -------------------------------------------------------------------------------- /data/Knearest Neighbors .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Knearest Neighbors .jpg -------------------------------------------------------------------------------- /data/Principal Components .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Principal Components .jpg -------------------------------------------------------------------------------- /data/Training Error Rate .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Training Error Rate .jpg -------------------------------------------------------------------------------- /data/Youdens JStatistic .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Youdens JStatistic .jpg -------------------------------------------------------------------------------- /data/General Additive Model .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/General Additive Model .jpg -------------------------------------------------------------------------------- /data/KFold Cross-Validation .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/KFold Cross-Validation .jpg -------------------------------------------------------------------------------- /data/Naive Bayes Classifier .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Naive Bayes Classifier .jpg -------------------------------------------------------------------------------- /data/How to avoid overfitting .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/How to avoid overfitting .jpg -------------------------------------------------------------------------------- /data/Precision Recall Tradeoff .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Precision Recall Tradeoff .jpg -------------------------------------------------------------------------------- /data/Leave One Out CrossValidation .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Leave One Out CrossValidation .jpg -------------------------------------------------------------------------------- /data/Singular Value Decomposition .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Singular Value Decomposition .jpg -------------------------------------------------------------------------------- /data/What Are Principal Components .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/What Are Principal Components .jpg -------------------------------------------------------------------------------- /data/Why is nearest neighbor lazy .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Why is nearest neighbor lazy .jpg -------------------------------------------------------------------------------- /data/Chisquared For Feature Selection .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Chisquared For Feature Selection .jpg -------------------------------------------------------------------------------- /data/Fundamental Theorem Of Calculus .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Fundamental Theorem Of Calculus .jpg -------------------------------------------------------------------------------- /data/Convex Hulls and Support Vector Machines .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Convex Hulls and Support Vector Machines .jpg -------------------------------------------------------------------------------- /data/Heteroscedasticity with a k, apparently) .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Heteroscedasticity with a k, apparently) .jpg -------------------------------------------------------------------------------- /data/Preprocessing When You Have Training And Test Sets .jpg: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/data/Preprocessing When You Have Training And Test Sets .jpg -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Lato.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Lato.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Raleway.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Raleway.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Roboto.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Roboto.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Ubuntu.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/Ubuntu.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/LatoBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/LatoBold.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/NewsCycle.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/NewsCycle.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSans.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSans.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/LatoItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/LatoItalic.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansBold.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RalewayBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RalewayBold.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RobotoBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RobotoBold.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RobotoLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RobotoLight.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RobotoMedium.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/RobotoMedium.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/NewsCycleBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/NewsCycleBold.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansItalic.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansLight.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansPro.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansPro.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansProBold.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansProBold.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansBoldItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansBoldItalic.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansLightItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/OpenSansLightItalic.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansProItalic.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansProItalic.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansProLight.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/css/fonts/SourceSansProLight.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.eot: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.eot -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.ttf -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff2: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/jasdumas/ml-flashcards/HEAD/twitter-ml-flashcards_files/bootstrap-3.3.5/fonts/glyphicons-halflings-regular.woff2 -------------------------------------------------------------------------------- /ml-flashcards.Rproj: -------------------------------------------------------------------------------- 1 | Version: 1.0 2 | 3 | RestoreWorkspace: Default 4 | SaveWorkspace: Default 5 | AlwaysSaveHistory: Default 6 | 7 | EnableCodeIndexing: Yes 8 | UseSpacesForTab: Yes 9 | NumSpacesForTab: 2 10 | Encoding: UTF-8 11 | 12 | RnwWeave: knitr 13 | LaTeX: pdfLaTeX 14 | -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/navigation-1.1/sourceembed.js: -------------------------------------------------------------------------------- 1 | 2 | 3 | window.initializeSourceEmbed = function(filename) { 4 | $("#rmd-download-source").click(function() { 5 | var src = window.atob($("#rmd-source-code").html()); 6 | var blob = new Blob([src], {type: "text/x-r-markdown"}); 7 | saveAs(blob, filename); 8 | }); 9 | }; 10 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # Extracting data from Twitter to get Chris Albon's Machine Learning Flashcards 2 | 3 | *All work on these Machine Learning Flashcards are the work of Chris Albon [@chrisalbon](https://github.com/chrisalbon), so thanks for your time and commitment to sharing your knowledge with others.* 4 | 5 | ## Contact Me 6 | 7 | Jasmine Daly | [@jasdumas](https://twitter.com/jasdumas) | [jasdumas.github.io](http://jasdumas.github.io/) 8 | -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/highlightjs-1.1/default.css: -------------------------------------------------------------------------------- 1 | pre .operator, 2 | pre .paren { 3 | color: rgb(104, 118, 135) 4 | } 5 | 6 | pre .literal { 7 | color: #990073 8 | } 9 | 10 | pre .number { 11 | color: #099; 12 | } 13 | 14 | pre .comment { 15 | color: #998; 16 | font-style: italic 17 | } 18 | 19 | pre .keyword { 20 | color: #900; 21 | font-weight: bold 22 | } 23 | 24 | pre .identifier { 25 | color: rgb(0, 0, 0); 26 | } 27 | 28 | pre .string { 29 | color: #d14; 30 | } 31 | -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/highlightjs-1.1/textmate.css: -------------------------------------------------------------------------------- 1 | pre .operator, 2 | pre .paren { 3 | color: rgb(104, 118, 135) 4 | } 5 | 6 | pre .literal { 7 | color: rgb(88, 72, 246) 8 | } 9 | 10 | pre .number { 11 | color: rgb(0, 0, 205); 12 | } 13 | 14 | pre .comment { 15 | color: rgb(76, 136, 107); 16 | } 17 | 18 | pre .keyword { 19 | color: rgb(0, 0, 255); 20 | } 21 | 22 | pre .identifier { 23 | color: rgb(0, 0, 0); 24 | } 25 | 26 | pre .string { 27 | color: rgb(3, 106, 7); 28 | } 29 | 30 | -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/js/npm.js: -------------------------------------------------------------------------------- 1 | // This file is autogenerated via the `commonjs` Grunt task. You can require() this file in a CommonJS environment. 2 | require('../../js/transition.js') 3 | require('../../js/alert.js') 4 | require('../../js/button.js') 5 | require('../../js/carousel.js') 6 | require('../../js/collapse.js') 7 | require('../../js/dropdown.js') 8 | require('../../js/modal.js') 9 | require('../../js/tooltip.js') 10 | require('../../js/popover.js') 11 | require('../../js/scrollspy.js') 12 | require('../../js/tab.js') 13 | require('../../js/affix.js') -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/navigation-1.1/codefolding.js: -------------------------------------------------------------------------------- 1 | 2 | window.initializeCodeFolding = function(show) { 3 | 4 | // handlers for show-all and hide all 5 | $("#rmd-show-all-code").click(function() { 6 | $('div.r-code-collapse').each(function() { 7 | $(this).collapse('show'); 8 | }); 9 | }); 10 | $("#rmd-hide-all-code").click(function() { 11 | $('div.r-code-collapse').each(function() { 12 | $(this).collapse('hide'); 13 | }); 14 | }); 15 | 16 | // index for unique code element ids 17 | var currentIndex = 1; 18 | 19 | // select all R code blocks 20 | var rCodeBlocks = $('pre.r'); 21 | rCodeBlocks.each(function() { 22 | 23 | // create a collapsable div to wrap the code in 24 | var div = $('
'); 25 | if (show) 26 | div.addClass('in'); 27 | var id = 'rcode-643E0F36' + currentIndex++; 28 | div.attr('id', id); 29 | $(this).before(div); 30 | $(this).detach().appendTo(div); 31 | 32 | // add a show code button right above 33 | var showCodeText = $('' + (show ? 'Hide' : 'Code') + ''); 34 | var showCodeButton = $(''); 35 | showCodeButton.append(showCodeText); 36 | showCodeButton 37 | .attr('data-toggle', 'collapse') 38 | .attr('data-target', '#' + id) 39 | .attr('aria-expanded', show) 40 | .attr('aria-controls', id); 41 | 42 | var buttonRow = $(''); 43 | var buttonCol = $(''); 44 | 45 | buttonCol.append(showCodeButton); 46 | buttonRow.append(buttonCol); 47 | 48 | div.before(buttonRow); 49 | 50 | // update state of button on show/hide 51 | div.on('hidden.bs.collapse', function () { 52 | showCodeText.text('Code'); 53 | }); 54 | div.on('show.bs.collapse', function () { 55 | showCodeText.text('Hide'); 56 | }); 57 | }); 58 | 59 | } 60 | -------------------------------------------------------------------------------- /twitter-ml-flashcards_files/bootstrap-3.3.5/shim/html5shiv.min.js: -------------------------------------------------------------------------------- 1 | /** 2 | * @preserve HTML5 Shiv 3.7.2 | @afarkas @jdalton @jon_neal @rem | MIT/GPL2 Licensed 3 | */ 4 | // Only run this code in IE 8 5 | if (!!window.navigator.userAgent.match("MSIE 8")) { 6 | !function(a,b){function c(a,b){var c=a.createElement("p"),d=a.getElementsByTagName("head")[0]||a.documentElement;return c.innerHTML="x",d.insertBefore(c.lastChild,d.firstChild)}function d(){var a=t.elements;return"string"==typeof a?a.split(" "):a}function e(a,b){var c=t.elements;"string"!=typeof c&&(c=c.join(" ")),"string"!=typeof a&&(a=a.join(" ")),t.elements=c+" "+a,j(b)}function f(a){var b=s[a[q]];return b||(b={},r++,a[q]=r,s[r]=b),b}function g(a,c,d){if(c||(c=b),l)return c.createElement(a);d||(d=f(c));var e;return e=d.cache[a]?d.cache[a].cloneNode():p.test(a)?(d.cache[a]=d.createElem(a)).cloneNode():d.createElem(a),!e.canHaveChildren||o.test(a)||e.tagUrn?e:d.frag.appendChild(e)}function h(a,c){if(a||(a=b),l)return a.createDocumentFragment();c=c||f(a);for(var e=c.frag.cloneNode(),g=0,h=d(),i=h.length;i>g;g++)e.createElement(h[g]);return e}function i(a,b){b.cache||(b.cache={},b.createElem=a.createElement,b.createFrag=a.createDocumentFragment,b.frag=b.createFrag()),a.createElement=function(c){return t.shivMethods?g(c,a,b):b.createElem(c)},a.createDocumentFragment=Function("h,f","return function(){var n=f.cloneNode(),c=n.createElement;h.shivMethods&&("+d().join().replace(/[\w\-:]+/g,function(a){return b.createElem(a),b.frag.createElement(a),'c("'+a+'")'})+");return n}")(t,b.frag)}function j(a){a||(a=b);var d=f(a);return!t.shivCSS||k||d.hasCSS||(d.hasCSS=!!c(a,"article,aside,dialog,figcaption,figure,footer,header,hgroup,main,nav,section{display:block}mark{background:#FF0;color:#000}template{display:none}")),l||i(a,d),a}var k,l,m="3.7.2",n=a.html5||{},o=/^<|^(?:button|map|select|textarea|object|iframe|option|optgroup)$/i,p=/^(?:a|b|code|div|fieldset|h1|h2|h3|h4|h5|h6|i|label|li|ol|p|q|span|strong|style|table|tbody|td|th|tr|ul)$/i,q="_html5shiv",r=0,s={};!function(){try{var a=b.createElement("a");a.innerHTML="I’m a fan of Chris Albon’s recent project #machinelearningflashcards on Twitter where generalized topics and methodologies are drawn out with key takeaways. It’s a great approach to sharing concepts about machine learning for everyone and a timely refresher for those of us who frequently forget algorithm basics.
124 |I leveraged Maëlle Salmon’s recent blog post on the Faces of #rstats Twitter heavily as a tutorial for this attempt at extracting data from Twitter to download the #Machinelearningflashcards.
125 |Source Repo for this work: jasdumas/ml-flashcards ___
126 |For this project I used rtweet to connect the Twitter API to search for relevant tweets by the hash tag, dplyr to filter and pipe things, stringr to clean up the tweet description, and magick to process the images.
Note: I previously ran into trouble when downloading ImageMagick and detailed the errors and approaches, if you fall into the same trap I did: https://gist.github.com/jasdumas/29caf5a9ce0104aa6bf14183ee1e3cd8
133 |library(rtweet)
134 | library(dplyr)
135 | library(magick)
136 | library(stringr)
137 | ml_tweets <- search_tweets("#machinelearningflashcards", n = 500, include_rts = FALSE) %>% filter(screen_name == 'chrisalbon')
141 | library(kableExtra)
142 | library(knitr)
143 | mt <- head(ml_tweets)
144 |
145 | kable(mt, format = "html") %>%
146 | kable_styling(bootstrap_options = "striped",
147 | full_width = F)
148 |
149 | | 153 | screen_name 154 | | 155 |156 | user_id 157 | | 158 |159 | created_at 160 | | 161 |162 | status_id 163 | | 164 |165 | text 166 | | 167 |168 | retweet_count 169 | | 170 |171 | favorite_count 172 | | 173 |174 | is_quote_status 175 | | 176 |177 | quote_status_id 178 | | 179 |180 | is_retweet 181 | | 182 |183 | retweet_status_id 184 | | 185 |186 | in_reply_to_status_status_id 187 | | 188 |189 | in_reply_to_status_user_id 190 | | 191 |192 | in_reply_to_status_screen_name 193 | | 194 |195 | lang 196 | | 197 |198 | source 199 | | 200 |201 | media_id 202 | | 203 |204 | media_url 205 | | 206 |207 | media_url_expanded 208 | | 209 |210 | urls 211 | | 212 |213 | urls_display 214 | | 215 |216 | urls_expanded 217 | | 218 |219 | mentions_screen_name 220 | | 221 |222 | mentions_user_id 223 | | 224 |225 | symbols 226 | | 227 |228 | hashtags 229 | | 230 |231 | coordinates 232 | | 233 |234 | place_id 235 | | 236 |237 | place_type 238 | | 239 |240 | place_name 241 | | 242 |243 | place_full_name 244 | | 245 |246 | country_code 247 | | 248 |249 | country 250 | | 251 |252 | bounding_box_coordinates 253 | | 254 |255 | bounding_box_type 256 | | 257 |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 262 | chrisalbon 263 | | 264 |265 | 11518572 266 | | 267 |268 | 2017-05-08 22:16:26 269 | | 270 |271 | 861706382877147136 272 | | 273 |274 | Ridge Regression #machinelearningflashcards https://t.co/yEuyM7TkaT 275 | | 276 |277 | 2 278 | | 279 |280 | 5 281 | | 282 |283 | FALSE 284 | | 285 |286 | NA 287 | | 288 |289 | FALSE 290 | | 291 |292 | NA 293 | | 294 |295 | NA 296 | | 297 |298 | NA 299 | | 300 |301 | NA 302 | | 303 |304 | en 305 | | 306 |307 | Machine Learning Flashcards 308 | | 309 |310 | 861706380352249857 311 | | 312 |313 | http://pbs.twimg.com/media/C_VlYy2VYAEctP6.jpg 314 | | 315 |316 | https://twitter.com/chrisalbon/status/861706382877147136/photo/1 317 | | 318 |319 | NA 320 | | 321 |322 | NA 323 | | 324 |325 | NA 326 | | 327 |328 | NA 329 | | 330 |331 | NA 332 | | 333 |334 | NA 335 | | 336 |337 | machinelearningflashcards 338 | | 339 |340 | NA 341 | | 342 |343 | NA 344 | | 345 |346 | NA 347 | | 348 |349 | NA 350 | | 351 |352 | NA 353 | | 354 |355 | NA 356 | | 357 |358 | NA 359 | | 360 |361 | NA 362 | | 363 |364 | NA 365 | | 366 |
| 369 | chrisalbon 370 | | 371 |372 | 11518572 373 | | 374 |375 | 2017-05-08 18:36:52 376 | | 377 |378 | 861651129251135488 379 | | 380 |381 | Euclidean Norm #machinelearningflashcards https://t.co/gCCCw9ZswA 382 | | 383 |384 | 1 385 | | 386 |387 | 6 388 | | 389 |390 | FALSE 391 | | 392 |393 | NA 394 | | 395 |396 | FALSE 397 | | 398 |399 | NA 400 | | 401 |402 | NA 403 | | 404 |405 | NA 406 | | 407 |408 | NA 409 | | 410 |411 | en 412 | | 413 |414 | Machine Learning Flashcards 415 | | 416 |417 | 861651127187554304 418 | | 419 |420 | http://pbs.twimg.com/media/C_UzIoxUQAA2VHH.jpg 421 | | 422 |423 | https://twitter.com/chrisalbon/status/861651129251135488/photo/1 424 | | 425 |426 | NA 427 | | 428 |429 | NA 430 | | 431 |432 | NA 433 | | 434 |435 | NA 436 | | 437 |438 | NA 439 | | 440 |441 | NA 442 | | 443 |444 | machinelearningflashcards 445 | | 446 |447 | NA 448 | | 449 |450 | NA 451 | | 452 |453 | NA 454 | | 455 |456 | NA 457 | | 458 |459 | NA 460 | | 461 |462 | NA 463 | | 464 |465 | NA 466 | | 467 |468 | NA 469 | | 470 |471 | NA 472 | | 473 |
| 476 | chrisalbon 477 | | 478 |479 | 11518572 480 | | 481 |482 | 2017-05-08 16:35:43 483 | | 484 |485 | 861620640297631744 486 | | 487 |488 | What Are Principal Components #machinelearningflashcards https://t.co/bpagWQb7ev 489 | | 490 |491 | 5 492 | | 493 |494 | 17 495 | | 496 |497 | FALSE 498 | | 499 |500 | NA 501 | | 502 |503 | FALSE 504 | | 505 |506 | NA 507 | | 508 |509 | NA 510 | | 511 |512 | NA 513 | | 514 |515 | NA 516 | | 517 |518 | en 519 | | 520 |521 | Machine Learning Flashcards 522 | | 523 |524 | 861620637982314496 525 | | 526 |527 | http://pbs.twimg.com/media/C_UXZ7oU0AAHKfS.jpg 528 | | 529 |530 | https://twitter.com/chrisalbon/status/861620640297631744/photo/1 531 | | 532 |533 | NA 534 | | 535 |536 | NA 537 | | 538 |539 | NA 540 | | 541 |542 | NA 543 | | 544 |545 | NA 546 | | 547 |548 | NA 549 | | 550 |551 | machinelearningflashcards 552 | | 553 |554 | NA 555 | | 556 |557 | NA 558 | | 559 |560 | NA 561 | | 562 |563 | NA 564 | | 565 |566 | NA 567 | | 568 |569 | NA 570 | | 571 |572 | NA 573 | | 574 |575 | NA 576 | | 577 |578 | NA 579 | | 580 |
| 583 | chrisalbon 584 | | 585 |586 | 11518572 587 | | 588 |589 | 2017-05-05 22:52:34 590 | | 591 |592 | 860628312476930048 593 | | 594 |595 | MSE vs MAE #machinelearningflashcards https://t.co/urqRnNfEFD 596 | | 597 |598 | 3 599 | | 600 |601 | 3 602 | | 603 |604 | FALSE 605 | | 606 |607 | NA 608 | | 609 |610 | FALSE 611 | | 612 |613 | NA 614 | | 615 |616 | NA 617 | | 618 |619 | NA 620 | | 621 |622 | NA 623 | | 624 |625 | tl 626 | | 627 |628 | Machine Learning Flashcards 629 | | 630 |631 | 860628310711091200 632 | | 633 |634 | http://pbs.twimg.com/media/C_GQ44eUQAAATkI.jpg 635 | | 636 |637 | https://twitter.com/chrisalbon/status/860628312476930048/photo/1 638 | | 639 |640 | NA 641 | | 642 |643 | NA 644 | | 645 |646 | NA 647 | | 648 |649 | NA 650 | | 651 |652 | NA 653 | | 654 |655 | NA 656 | | 657 |658 | machinelearningflashcards 659 | | 660 |661 | NA 662 | | 663 |664 | NA 665 | | 666 |667 | NA 668 | | 669 |670 | NA 671 | | 672 |673 | NA 674 | | 675 |676 | NA 677 | | 678 |679 | NA 680 | | 681 |682 | NA 683 | | 684 |685 | NA 686 | | 687 |
| 690 | chrisalbon 691 | | 692 |693 | 11518572 694 | | 695 |696 | 2017-05-05 18:25:35 697 | | 698 |699 | 860561126970372096 700 | | 701 |702 | Convex Hulls and Support Vector Machines #machinelearningflashcards https://t.co/Uopa3NkXNu 703 | | 704 |705 | 2 706 | | 707 |708 | 15 709 | | 710 |711 | FALSE 712 | | 713 |714 | NA 715 | | 716 |717 | FALSE 718 | | 719 |720 | NA 721 | | 722 |723 | NA 724 | | 725 |726 | NA 727 | | 728 |729 | NA 730 | | 731 |732 | en 733 | | 734 |735 | Machine Learning Flashcards 736 | | 737 |738 | 860561124390862848 739 | | 740 |741 | http://pbs.twimg.com/media/C_FTyH7UAAAUKiI.jpg 742 | | 743 |744 | https://twitter.com/chrisalbon/status/860561126970372096/photo/1 745 | | 746 |747 | NA 748 | | 749 |750 | NA 751 | | 752 |753 | NA 754 | | 755 |756 | NA 757 | | 758 |759 | NA 760 | | 761 |762 | NA 763 | | 764 |765 | machinelearningflashcards 766 | | 767 |768 | NA 769 | | 770 |771 | NA 772 | | 773 |774 | NA 775 | | 776 |777 | NA 778 | | 779 |780 | NA 781 | | 782 |783 | NA 784 | | 785 |786 | NA 787 | | 788 |789 | NA 790 | | 791 |792 | NA 793 | | 794 |
| 797 | chrisalbon 798 | | 799 |800 | 11518572 801 | | 802 |803 | 2017-05-05 16:27:32 804 | | 805 |806 | 860531419335991297 807 | | 808 |809 | t tests #machinelearningflashcards https://t.co/XsaDSgCtEI 810 | | 811 |812 | 5 813 | | 814 |815 | 20 816 | | 817 |818 | FALSE 819 | | 820 |821 | NA 822 | | 823 |824 | FALSE 825 | | 826 |827 | NA 828 | | 829 |830 | NA 831 | | 832 |833 | NA 834 | | 835 |836 | NA 837 | | 838 |839 | en 840 | | 841 |842 | Machine Learning Flashcards 843 | | 844 |845 | 860531415900749824 846 | | 847 |848 | http://pbs.twimg.com/media/C_E4w3LUAAAfp2X.jpg 849 | | 850 |851 | https://twitter.com/chrisalbon/status/860531419335991297/photo/1 852 | | 853 |854 | NA 855 | | 856 |857 | NA 858 | | 859 |860 | NA 861 | | 862 |863 | NA 864 | | 865 |866 | NA 867 | | 868 |869 | NA 870 | | 871 |872 | machinelearningflashcards 873 | | 874 |875 | NA 876 | | 877 |878 | NA 879 | | 880 |881 | NA 882 | | 883 |884 | NA 885 | | 886 |887 | NA 888 | | 889 |890 | NA 891 | | 892 |893 | NA 894 | | 895 |896 | NA 897 | | 898 |899 | NA 900 | | 901 |
ml_tweets$clean_text <- ml_tweets$text
908 | ml_tweets$clean_text <- str_replace(ml_tweets$clean_text,"#[a-zA-Z0-9]{1,}", "") # remove the hashtag
909 | ml_tweets$clean_text <- str_replace(ml_tweets$clean_text, " ?(f|ht)(tp)(s?)(://)(.*)[.|/](.*)", "") # remove the url link
910 | ml_tweets$clean_text <- str_replace(ml_tweets$clean_text, "[[:punct:]]", "") # remove punctuation
911 | media_url column and append the file name from the cleaned tweet text description and save into a folder:save_image <- function(df){
915 | for (i in c(1:nrow(df))){
916 | image <- try(image_read(df$media_url[i]), silent = F)
917 | if(class(image)[1] != "try-error"){
918 | image %>%
919 | image_scale("1200x700") %>%
920 | image_write(paste0("data/", ml_tweets$clean_text[i],".jpg"))
921 | }
922 |
923 | }
924 | cat("Function complete...\n")
925 | }
926 | save_image(ml_tweets)
930 | ## Function complete...
931 | At the end of this process you can view all of the #machinelearningflashcards in one place! Thanks to Chris Albon for his work on this, and I’m looking forward to re-running this script to gain additional knowledge from new #machinelearningflashcards that are developed in the future!
932 |"+y.value+"";t=p.firstChild.firstChild;p.firstChild.cN=s.cN;s.parentNode.replaceChild(p.firstChild,s)}else{t.innerHTML=y.value}t.className=u;t.result={language:v,kw:y.keyword_count,re:y.r};if(y.second_best){t.second_best={language:y.second_best.language,kw:y.second_best.keyword_count,re:y.second_best.r}}}function o(){if(o.called){return}o.called=true;var r=document.getElementsByTagName("pre");for(var p=0;p