{"id":50787,"date":"2020-07-01T10:21:00","date_gmt":"2020-07-01T14:21:00","guid":{"rendered":"https:\/\/ibkrcampus.com\/?p=50787"},"modified":"2023-02-28T09:43:05","modified_gmt":"2023-02-28T14:43:05","slug":"evaluate-your-model-with-mlmetrics","status":"publish","type":"post","link":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/","title":{"rendered":"Evaluate Your Model with MLmetrics"},"content":{"rendered":"\n<p>This post will explore using R\u2019s&nbsp;<strong>MLmetrics<\/strong>&nbsp;to evaluate machine learning models.&nbsp;<strong>MLmetrics<\/strong>&nbsp;provides several functions to calculate common metrics for ML models, including AUC, precision, recall, accuracy, etc.<\/p>\n\n\n\n<p><strong>Building an example model<\/strong><\/p>\n\n\n\n<p>Firstly, we need to build a model to use as an example. For this post, we\u2019ll be using a dataset on\u00a0<a href=\"https:\/\/www.kaggle.com\/\">pulsar stars from Kaggle<\/a>. Let\u2019s save the file as \u201cpulsar_stars.csv\u201d. Each record in the file represents a pulsar star candidate. The goal will be to predict if a record is a pulsar star based upon the attributes available.<\/p>\n\n\n\n<p>To get started, let\u2019s load the packages we\u2019ll need and read in our dataset.<\/p>\n\n\n\n<p style=\"background-color:#fcfcdb;font-size:11px\" class=\"has-background\">\nlibrary(MLmetrics)<br>\nlibrary(dplyr)<br><br>\n \nstars = read.csv(&#8220;pulsar_stars.csv&#8221;)\n<\/p>\n\n\n\n<p>Next, let\u2019s split our data into train vs. test. We\u2019ll do a standard 70\/30 split here.<\/p>\n\n\n\n<p style=\"background-color:#fcfcdb;font-size:11px\" class=\"has-background\">\nset.seed(0)<br>\ntrain_indexes = sample(1:nrow(stars), .7 * nrow(stars))<br><br>\n \ntrain_set <- stars[train_indexes,]<br>\ntest_set <- stars[-train_indexes,]<br>\n<\/p>\n\n\n\n<p>Now, let\u2019s build a simple&nbsp;<a href=\"https:\/\/theautomatic.net\/2018\/10\/02\/how-to-build-a-logistic-regression-model-from-scratch-in-r\/\">logistic regression model<\/a>.<\/p>\n\n\n\n<p style=\"background-color:#fcfcdb;font-size:11px\" class=\"has-background\">\ntrain_set <- data.frame(train_set %>% select(target_class), train_set %>% select(-target_class))<br><br>\n \n# build model<br>\nmodel <- glm(formula(train_set), train_set, family = \"binomial\")<br><br>\n \n# get predictions on train and test datasets<br>\ntrain_pred <- predict(model, train_set, type = \"response\")<br>\ntest_pred <- predict(model, test_set, type = \"response\")<br>\n<\/p>\n\n\n\n<p><strong>AUC \/ precision \/ recall \/ accuracy<\/strong><\/p>\n\n\n\n<p>Let\u2019s calculate a few metrics. One of the most common metrics for classification is calculating AUC, which can be done using&nbsp;<strong>MLMetrics\u2019<\/strong>&nbsp;AUC function. Intuitively, AUC is a score between 0 and 1 that measures how well a model rank-orders predictions.&nbsp;<a href=\"https:\/\/stats.stackexchange.com\/questions\/132777\/what-does-auc-stand-for-and-what-is-it\">See here<\/a>&nbsp;for a more detailed explanation.<\/p>\n\n\n\n<p style=\"background-color:#fcfcdb;font-size:11px\" class=\"has-background\">\n# get AUC on test and train set<br>\nAUC(test_pred, test_set$target_class) # 0.974172<br>\nAUC(train_pred, train_set$target_class) # 0.9773794\n<\/p>\n\n\n\n<p>As a refresher, here\u2019s a quick overview of precision, recall, and accuracy:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Precision:<\/strong>&nbsp;The true positive rate. If the model predicts there are 10 pulsar stars, and 8 of those 10 actually are pulsars, then the precision would be 8 \/ 10, or 80%.<\/li>\n\n\n\n<li><strong>Recall:<\/strong>The proportion of the positive labels that are captured with the model. For example, suppose there are 10 pulsar stars in the data and that the model predicts 7 of those to be pulsar stars. That would mean the recall is 7 \/ 10, or 70%.<\/li>\n\n\n\n<li><strong>Accuracy:<\/strong>Generally the most intuitive of the metrics here. Accuracy is simply the number of correct predictions divided by the total number of predictions.<\/li>\n<\/ul>\n\n\n\n<p>Visit TheAutomatic.net to read the full article:<br><a href=\"https:\/\/theautomatic.net\/2020\/01\/29\/evaluate-your-r-model-with-mlmetrics\/\">https:\/\/theautomatic.net\/2020\/01\/29\/evaluate-your-r-model-with-mlmetrics\/<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.<\/p>\n","protected":false},"author":388,"featured_media":50791,"comment_status":"closed","ping_status":"open","sticky":true,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[339,343,338,341,352,344,342],"tags":[806,2535,852,7921,487,6591],"contributors-categories":[13695],"class_list":{"0":"post-50787","1":"post","2":"type-post","3":"status-publish","4":"format-standard","5":"has-post-thumbnail","7":"category-data-science","8":"category-programing-languages","9":"category-ibkr-quant-news","10":"category-quant-development","11":"category-quant-north-america","12":"category-quant-regions","13":"category-r-development","14":"tag-data-science","15":"tag-dplyr","16":"tag-machine-learning","17":"tag-mlmetrics","18":"tag-r","19":"tag-rstats","20":"contributors-categories-theautomatic-net"},"pp_statuses_selecting_workflow":false,"pp_workflow_action":"current","pp_status_selection":"publish","acf":[],"yoast_head":"<!-- This site is optimized with the Yoast SEO Premium plugin v26.9 (Yoast SEO v27.4) - https:\/\/yoast.com\/product\/yoast-seo-premium-wordpress\/ -->\n<title>Evaluate Your Model with MLmetrics | IBKR Quant<\/title>\n<meta name=\"description\" content=\"Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/50787\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Evaluate Your Model with MLmetrics | IBKR Quant Blog\" \/>\n<meta property=\"og:description\" content=\"Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/\" \/>\n<meta property=\"og:site_name\" content=\"IBKR Campus US\" \/>\n<meta property=\"article:published_time\" content=\"2020-07-01T14:21:00+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-02-28T14:43:05+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"900\" \/>\n\t<meta property=\"og:image:height\" content=\"550\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"Andrew Treadway\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Andrew Treadway\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"2 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\n\t    \"@context\": \"https:\\\/\\\/schema.org\",\n\t    \"@graph\": [\n\t        {\n\t            \"@type\": \"NewsArticle\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/#article\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/\"\n\t            },\n\t            \"author\": {\n\t                \"name\": \"Andrew Treadway\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\"\n\t            },\n\t            \"headline\": \"Evaluate Your Model with MLmetrics\",\n\t            \"datePublished\": \"2020-07-01T14:21:00+00:00\",\n\t            \"dateModified\": \"2023-02-28T14:43:05+00:00\",\n\t            \"mainEntityOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/\"\n\t            },\n\t            \"wordCount\": 160,\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/07\\\/machine-learning-sphere.jpg\",\n\t            \"keywords\": [\n\t                \"Data Science\",\n\t                \"dplyr\",\n\t                \"Machine Learning\",\n\t                \"MLmetrics\",\n\t                \"R\",\n\t                \"rstats\"\n\t            ],\n\t            \"articleSection\": [\n\t                \"Data Science\",\n\t                \"Programming Languages\",\n\t                \"Quant\",\n\t                \"Quant Development\",\n\t                \"Quant North America\",\n\t                \"Quant Regions\",\n\t                \"R Development\"\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"WebPage\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/\",\n\t            \"name\": \"Evaluate Your Model with MLmetrics | IBKR Quant Blog\",\n\t            \"isPartOf\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\"\n\t            },\n\t            \"primaryImageOfPage\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/#primaryimage\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/#primaryimage\"\n\t            },\n\t            \"thumbnailUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/07\\\/machine-learning-sphere.jpg\",\n\t            \"datePublished\": \"2020-07-01T14:21:00+00:00\",\n\t            \"dateModified\": \"2023-02-28T14:43:05+00:00\",\n\t            \"description\": \"Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"ReadAction\",\n\t                    \"target\": [\n\t                        \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/\"\n\t                    ]\n\t                }\n\t            ]\n\t        },\n\t        {\n\t            \"@type\": \"ImageObject\",\n\t            \"inLanguage\": \"en-US\",\n\t            \"@id\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/ibkr-quant-news\\\/evaluate-your-model-with-mlmetrics\\\/#primaryimage\",\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/07\\\/machine-learning-sphere.jpg\",\n\t            \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2020\\\/07\\\/machine-learning-sphere.jpg\",\n\t            \"width\": 900,\n\t            \"height\": 550,\n\t            \"caption\": \"Machine Learning\"\n\t        },\n\t        {\n\t            \"@type\": \"WebSite\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#website\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"name\": \"IBKR Campus US\",\n\t            \"description\": \"Financial Education from Interactive Brokers\",\n\t            \"publisher\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\"\n\t            },\n\t            \"potentialAction\": [\n\t                {\n\t                    \"@type\": \"SearchAction\",\n\t                    \"target\": {\n\t                        \"@type\": \"EntryPoint\",\n\t                        \"urlTemplate\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/?s={search_term_string}\"\n\t                    },\n\t                    \"query-input\": {\n\t                        \"@type\": \"PropertyValueSpecification\",\n\t                        \"valueRequired\": true,\n\t                        \"valueName\": \"search_term_string\"\n\t                    }\n\t                }\n\t            ],\n\t            \"inLanguage\": \"en-US\"\n\t        },\n\t        {\n\t            \"@type\": \"Organization\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#organization\",\n\t            \"name\": \"Interactive Brokers\",\n\t            \"alternateName\": \"IBKR\",\n\t            \"url\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/\",\n\t            \"logo\": {\n\t                \"@type\": \"ImageObject\",\n\t                \"inLanguage\": \"en-US\",\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\",\n\t                \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"contentUrl\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/wp-content\\\/uploads\\\/sites\\\/2\\\/2024\\\/05\\\/ibkr-campus-logo.jpg\",\n\t                \"width\": 669,\n\t                \"height\": 669,\n\t                \"caption\": \"Interactive Brokers\"\n\t            },\n\t            \"image\": {\n\t                \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/logo\\\/image\\\/\"\n\t            },\n\t            \"publishingPrinciples\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/about-ibkr-campus\\\/\",\n\t            \"ethicsPolicy\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/cyber-security-notice\\\/\"\n\t        },\n\t        {\n\t            \"@type\": \"Person\",\n\t            \"@id\": \"https:\\\/\\\/ibkrcampus.com\\\/campus\\\/#\\\/schema\\\/person\\\/d4018570a16fb867f1c08412fc9c64bc\",\n\t            \"name\": \"Andrew Treadway\",\n\t            \"description\": \"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \\\/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\\\/\\\/www.linkedin.com\\\/in\\\/andrew-treadway-a3b19b103\\\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.\",\n\t            \"sameAs\": [\n\t                \"https:\\\/\\\/theautomatic.net\\\/about-me\\\/\"\n\t            ],\n\t            \"url\": \"https:\\\/\\\/www.interactivebrokers.com\\\/campus\\\/author\\\/andrewtreadway\\\/\"\n\t        }\n\t    ]\n\t}<\/script>\n<!-- \/ Yoast SEO Premium plugin. -->","yoast_head_json":{"title":"Evaluate Your Model with MLmetrics | IBKR Quant","description":"Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/www.interactivebrokers.com\/campus\/wp-json\/wp\/v2\/posts\/50787\/","og_locale":"en_US","og_type":"article","og_title":"Evaluate Your Model with MLmetrics | IBKR Quant Blog","og_description":"Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.","og_url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/","og_site_name":"IBKR Campus US","article_published_time":"2020-07-01T14:21:00+00:00","article_modified_time":"2023-02-28T14:43:05+00:00","og_image":[{"width":900,"height":550,"url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg","type":"image\/jpeg"}],"author":"Andrew Treadway","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Andrew Treadway","Est. reading time":"2 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"NewsArticle","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/#article","isPartOf":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/"},"author":{"name":"Andrew Treadway","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc"},"headline":"Evaluate Your Model with MLmetrics","datePublished":"2020-07-01T14:21:00+00:00","dateModified":"2023-02-28T14:43:05+00:00","mainEntityOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/"},"wordCount":160,"publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg","keywords":["Data Science","dplyr","Machine Learning","MLmetrics","R","rstats"],"articleSection":["Data Science","Programming Languages","Quant","Quant Development","Quant North America","Quant Regions","R Development"],"inLanguage":"en-US"},{"@type":"WebPage","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/","url":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/","name":"Evaluate Your Model with MLmetrics | IBKR Quant Blog","isPartOf":{"@id":"https:\/\/ibkrcampus.com\/campus\/#website"},"primaryImageOfPage":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/#primaryimage"},"image":{"@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/#primaryimage"},"thumbnailUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg","datePublished":"2020-07-01T14:21:00+00:00","dateModified":"2023-02-28T14:43:05+00:00","description":"Andrew Treadway explores R\u2019s MLmetrics and uses it to evaluate machine learning models. Download ready-to-use code.","inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/www.interactivebrokers.com\/campus\/ibkr-quant-news\/evaluate-your-model-with-mlmetrics\/#primaryimage","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg","width":900,"height":550,"caption":"Machine Learning"},{"@type":"WebSite","@id":"https:\/\/ibkrcampus.com\/campus\/#website","url":"https:\/\/ibkrcampus.com\/campus\/","name":"IBKR Campus US","description":"Financial Education from Interactive Brokers","publisher":{"@id":"https:\/\/ibkrcampus.com\/campus\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/ibkrcampus.com\/campus\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/ibkrcampus.com\/campus\/#organization","name":"Interactive Brokers","alternateName":"IBKR","url":"https:\/\/ibkrcampus.com\/campus\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/","url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","contentUrl":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2024\/05\/ibkr-campus-logo.jpg","width":669,"height":669,"caption":"Interactive Brokers"},"image":{"@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/logo\/image\/"},"publishingPrinciples":"https:\/\/www.interactivebrokers.com\/campus\/about-ibkr-campus\/","ethicsPolicy":"https:\/\/www.interactivebrokers.com\/campus\/cyber-security-notice\/"},{"@type":"Person","@id":"https:\/\/ibkrcampus.com\/campus\/#\/schema\/person\/d4018570a16fb867f1c08412fc9c64bc","name":"Andrew Treadway","description":"Andrew Treadway currently works as a Senior Data Scientist, and has experience doing analytics, software automation, and ETL. He completed a master\u2019s degree in computer science \/ machine learning, and an undergraduate degree in pure mathematics. Connect with him on LinkedIn: https:\/\/www.linkedin.com\/in\/andrew-treadway-a3b19b103\/In addition to TheAutomatic.net blog, he also teaches in-person courses on Python and R through my NYC meetup: more details.","sameAs":["https:\/\/theautomatic.net\/about-me\/"],"url":"https:\/\/www.interactivebrokers.com\/campus\/author\/andrewtreadway\/"}]}},"jetpack_featured_media_url":"https:\/\/www.interactivebrokers.com\/campus\/wp-content\/uploads\/sites\/2\/2020\/07\/machine-learning-sphere.jpg","_links":{"self":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/50787","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/users\/388"}],"replies":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/comments?post=50787"}],"version-history":[{"count":0,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/posts\/50787\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media\/50791"}],"wp:attachment":[{"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/media?parent=50787"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/categories?post=50787"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/tags?post=50787"},{"taxonomy":"contributors-categories","embeddable":true,"href":"https:\/\/ibkrcampus.com\/campus\/wp-json\/wp\/v2\/contributors-categories?post=50787"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}