{"id":1066,"date":"2018-05-19T20:07:12","date_gmt":"2018-05-19T20:07:12","guid":{"rendered":"http:\/\/www.codeastar.com\/?p=1066"},"modified":"2018-05-29T21:35:52","modified_gmt":"2018-05-29T21:35:52","slug":"bartener-machine-learning","status":"publish","type":"post","link":"https:\/\/www.codeastar.com\/bartener-machine-learning\/","title":{"rendered":"“Do you have a dog?” explained in Machine Learning"},"content":{"rendered":"
You have probably read the above comic in 9gag or imgur<\/a> before. It is a funny joke, but on the other hand, it is also a material for our Machine Learning topic. It sounds weird? Oh yeah, sometimes knowledge comes from strange ideas.<\/p>\n <\/p>\n Here is the comic, for people who have not read it before. If you have read it or just tl;dr, we can go to the analysis<\/a> section after the comic.<\/p>\n <\/p>\n From our first ever Data Science post<\/a> in this blog, we know that Data Science is all about solving problems. In the comic, the problem that the bartender trying to solve was: see rather someone is gay or not.<\/p>\n Since the bartender would predict the outcome, he was a learning model there. A learning model needed to be trained, so he met his training dataset, a consultant in his bar. After a brief training session with the consultant, he made a prediction using his testing dataset, a new customer in his bar. Then we found three major machine learning components in the comic: a learning model (the bartender), a training dataset (the consultant, the “logic” thinker) and a testing dataset (a new customer in red shirt). And then, a disaster just happened.<\/p>\n <\/p>\n The bartender model made a groundless prediction. We found that the bartender model was underfitting. As it had a limited training dataset with few features.<\/p>\n <\/p>\n At the end, the bartender became a weak learner, i.e. a model with high bias and low variance, which hardly made a accurate prediction.<\/p>\n <\/p>\n In order to improve the learning model, we can increase the number of records and features in training dataset.<\/p>\n <\/p>\n Thus the model can have more data to build more decision trees and increase its variance<\/a>.<\/p>\n <\/p>\n <\/p>\n Then the learning model can verify its accuracy by cross validation<\/a> with training dataset.<\/p>\n <\/p>\n Other than using a single model, we can ensemble<\/a> the prediction from the learning model with other trained models. So we can have a better result with higher variance.<\/p>\n <\/p>\n After applying above improvements, we can have a better\u00a0model again!<\/p>\n <\/p>\n Well, although the bartender model just sounds laughable, there is a study<\/a> from\u00a0Stanford University using deep neural networks<\/a>\u00a0to\u00a0do the ‘gay test’ in real life as well.<\/p>\n","protected":false},"excerpt":{"rendered":" You have probably read the above comic in 9gag or imgur before. It is a funny joke, but on the other hand, it is also a material for our Machine Learning topic. It sounds weird? Oh yeah, sometimes knowledge comes from strange ideas.<\/p>\n","protected":false},"author":1,"featured_media":1076,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"om_disable_all_campaigns":false,"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"site-sidebar-layout":"default","site-content-layout":"","ast-site-content-layout":"","site-content-style":"default","site-sidebar-style":"default","ast-global-header-display":"","ast-banner-title-visibility":"","ast-main-header-display":"","ast-hfb-above-header-display":"","ast-hfb-below-header-display":"","ast-hfb-mobile-header-display":"","site-post-title":"","ast-breadcrumbs-content":"","ast-featured-img":"","footer-sml-layout":"","theme-transparent-header-meta":"","adv-header-id-meta":"","stick-header-meta":"","header-above-stick-meta":"","header-main-stick-meta":"","header-below-stick-meta":"","astra-migrate-meta-layouts":"default","ast-page-background-enabled":"default","ast-page-background-meta":{"desktop":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"ast-content-background-meta":{"desktop":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"tablet":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""},"mobile":{"background-color":"var(--ast-global-color-5)","background-image":"","background-repeat":"repeat","background-position":"center center","background-size":"auto","background-attachment":"scroll","background-type":"","background-media":"","overlay-type":"","overlay-color":"","overlay-opacity":"","overlay-gradient":""}},"jetpack_post_was_ever_published":false,"_jetpack_newsletter_access":"","_jetpack_newsletter_tier_id":0,"jetpack_publicize_message":"","jetpack_is_tweetstorm":false,"jetpack_publicize_feature_enabled":true,"jetpack_social_post_already_shared":true,"jetpack_social_options":{"image_generator_settings":{"template":"highway","enabled":false}}},"categories":[18],"tags":[79,19,41,26,22,81],"jetpack_publicize_connections":[],"yoast_head":"\nThe Comic<\/h3>\n
The Analysis<\/h3>\n
The Problem<\/h3>\n
The Action<\/h3>\n