{"action":"created","comment":{"url":"https://api.github.com/repos/solita/solita.github.com/pulls/comments/186052265","pull_request_review_id":117564701,"id":186052265,"diff_hunk":"@@ -0,0 +1,271 @@\n+---\n+layout: post\n+title: A Machine Learning Example For Business\n+author: mikaelahonen\n+excerpt: A practical example of predictive machine learning. Targeted for business people how want to harness machine learning for business but also understand how it actually works.\n+tags:\n+- machine learning\n+- business\n+- predictive analytics\n+- data science\n+---\n+\n+## Introduction\n+A practical example of predictive machine learning.\n+Targeted for business people how want to harness machine learning for business but also understand how it actually works.\n+\n+The aim is to demonstrate:\n+* A concrete example without going too deep in theory.\n+* The difference between machine learning and reporting.\n+* Benefits to business.\n+\n+For those who are interested in technical part, the `R` code and data is available at the end of the post.\n+\n+<blockquote>\n+According to a definition\n+<b>machine learning means\n+that a machine can learn without having explicitly\n+programmed for the task</b>.\n+This doesn't mean that the program code would evolve by itself, but\n+different results are produces in different situations depending on the data\n+and the set of rules that are applied.\n+</blockquote>\n+\n+## Machine learning use cases\n+Let's quickly see some machine learning use cases.\n+\n+### #1 Predicting by variables\n+For example predicting number of visitors in an event according to\n+weather, day of week and ticket price. In the simplest case\n+the algorithm might just naively count average number of visitor in the similar cases in the past.\n+\n+![Predicting by variables](/img/a-machine-learning-example-for-business/visitors.png)\n+\n+### #2 Clustering\n+Customers can be segmented automatically according to\n+selected variables. The algorithm might not need any input\n+to make the grouping.\n+\n+![Machine learning clustering example](/img/a-machine-learning-example-for-business/machine-learning-example-clustering.png)\n+\n+### #3 Image recognition and classification\n+Identifying the object from an image. The algorithm\n+has to be \"trained\" with already known cases\n+to recognize which kind of pixel and color\n+combinations are cats and which are dog.\n+\n+![Image recognition example](/img/a-machine-learning-example-for-business/image-recognition.png)\n+\n+## A business problem: Online store deliveries\n+In the example, I will go through similar case than the #1: The process\n+of predicting by variables as it's very common\n+scenario in business analytics. Also many of the\n+concepts can be used even in image recognition once the\n+image pixels has been converted to tabular data.\n+\n+Let's imagine that we are running an online shop that\n+orders nutrition supplements from a wholesaler and sells the products to consumers.\n+\n+![Machine learning on supply chain management](/img/a-machine-learning-example-for-business/machine-learning-supply-chain.png)\n+\n+The online store wants to <b>maximize those wholesale orders that will arrive on time</b>. This increases predictability and that way the satisfaction in end users and sales as well.","path":"_posts/2018-05-07-A-Machine-Learning-Example-For-Business.md","position":71,"original_position":71,"commit_id":"af8936b47c6dab86d2ca1db0bb7f19c01c95814a","original_commit_id":"af8936b47c6dab86d2ca1db0bb7f19c01c95814a","user":{"login":"solitateppo","id":15907426,"avatar_url":"https://avatars2.githubusercontent.com/u/15907426?v=4","gravatar_id":"","url":"https://api.github.com/users/solitateppo","html_url":"https://github.com/solitateppo","followers_url":"https://api.github.com/users/solitateppo/followers","following_url":"https://api.github.com/users/solitateppo/following{/other_user}","gists_url":"https://api.github.com/users/solitateppo/gists{/gist_id}","starred_url":"https://api.github.com/users/solitateppo/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solitateppo/subscriptions","organizations_url":"https://api.github.com/users/solitateppo/orgs","repos_url":"https://api.github.com/users/solitateppo/repos","events_url":"https://api.github.com/users/solitateppo/events{/privacy}","received_events_url":"https://api.github.com/users/solitateppo/received_events","type":"User","site_admin":false},"body":"\"satisfaction in end users\" sounds a bit weird. \"the end user satisfaction\" maybe?","created_at":"2018-05-04T11:11:03Z","updated_at":"2018-05-04T11:48:47Z","html_url":"https://github.com/solita/solita.github.com/pull/292#discussion_r186052265","pull_request_url":"https://api.github.com/repos/solita/solita.github.com/pulls/292","author_association":"NONE","_links":{"self":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/comments/186052265"},"html":{"href":"https://github.com/solita/solita.github.com/pull/292#discussion_r186052265"},"pull_request":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/292"}}},"pull_request":{"url":"https://api.github.com/repos/solita/solita.github.com/pulls/292","id":185761637,"html_url":"https://github.com/solita/solita.github.com/pull/292","diff_url":"https://github.com/solita/solita.github.com/pull/292.diff","patch_url":"https://github.com/solita/solita.github.com/pull/292.patch","issue_url":"https://api.github.com/repos/solita/solita.github.com/issues/292","number":292,"state":"open","locked":false,"title":"A Machine Learning Example For Business. Version 1.","user":{"login":"mikaelahonen","id":20364241,"avatar_url":"https://avatars3.githubusercontent.com/u/20364241?v=4","gravatar_id":"","url":"https://api.github.com/users/mikaelahonen","html_url":"https://github.com/mikaelahonen","followers_url":"https://api.github.com/users/mikaelahonen/followers","following_url":"https://api.github.com/users/mikaelahonen/following{/other_user}","gists_url":"https://api.github.com/users/mikaelahonen/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelahonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelahonen/subscriptions","organizations_url":"https://api.github.com/users/mikaelahonen/orgs","repos_url":"https://api.github.com/users/mikaelahonen/repos","events_url":"https://api.github.com/users/mikaelahonen/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelahonen/received_events","type":"User","site_admin":false},"body":"","created_at":"2018-05-03T15:53:02Z","updated_at":"2018-05-04T11:48:47Z","closed_at":null,"merged_at":null,"merge_commit_sha":"fd04c4678e08cdb612fd55d7adf974f242449280","assignee":null,"assignees":[],"requested_reviewers":[],"requested_teams":[],"labels":[],"milestone":null,"commits_url":"https://api.github.com/repos/solita/solita.github.com/pulls/292/commits","review_comments_url":"https://api.github.com/repos/solita/solita.github.com/pulls/292/comments","review_comment_url":"https://api.github.com/repos/solita/solita.github.com/pulls/comments{/number}","comments_url":"https://api.github.com/repos/solita/solita.github.com/issues/292/comments","statuses_url":"https://api.github.com/repos/solita/solita.github.com/statuses/af8936b47c6dab86d2ca1db0bb7f19c01c95814a","head":{"label":"mikaelahonen:master","ref":"master","sha":"af8936b47c6dab86d2ca1db0bb7f19c01c95814a","user":{"login":"mikaelahonen","id":20364241,"avatar_url":"https://avatars3.githubusercontent.com/u/20364241?v=4","gravatar_id":"","url":"https://api.github.com/users/mikaelahonen","html_url":"https://github.com/mikaelahonen","followers_url":"https://api.github.com/users/mikaelahonen/followers","following_url":"https://api.github.com/users/mikaelahonen/following{/other_user}","gists_url":"https://api.github.com/users/mikaelahonen/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelahonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelahonen/subscriptions","organizations_url":"https://api.github.com/users/mikaelahonen/orgs","repos_url":"https://api.github.com/users/mikaelahonen/repos","events_url":"https://api.github.com/users/mikaelahonen/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelahonen/received_events","type":"User","site_admin":false},"repo":{"id":121524970,"name":"solita.github.com","full_name":"mikaelahonen/solita.github.com","owner":{"login":"mikaelahonen","id":20364241,"avatar_url":"https://avatars3.githubusercontent.com/u/20364241?v=4","gravatar_id":"","url":"https://api.github.com/users/mikaelahonen","html_url":"https://github.com/mikaelahonen","followers_url":"https://api.github.com/users/mikaelahonen/followers","following_url":"https://api.github.com/users/mikaelahonen/following{/other_user}","gists_url":"https://api.github.com/users/mikaelahonen/gists{/gist_id}","starred_url":"https://api.github.com/users/mikaelahonen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/mikaelahonen/subscriptions","organizations_url":"https://api.github.com/users/mikaelahonen/orgs","repos_url":"https://api.github.com/users/mikaelahonen/repos","events_url":"https://api.github.com/users/mikaelahonen/events{/privacy}","received_events_url":"https://api.github.com/users/mikaelahonen/received_events","type":"User","site_admin":false},"private":false,"html_url":"https://github.com/mikaelahonen/solita.github.com","description":"Solita Developer Blog","fork":true,"url":"https://api.github.com/repos/mikaelahonen/solita.github.com","forks_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/forks","keys_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/teams","hooks_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/hooks","issue_events_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/events","assignees_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/tags","blobs_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/languages","stargazers_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/stargazers","contributors_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/contributors","subscribers_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/subscribers","subscription_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/subscription","commits_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/merges","archive_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/downloads","issues_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/labels{/name}","releases_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/releases{/id}","deployments_url":"https://api.github.com/repos/mikaelahonen/solita.github.com/deployments","created_at":"2018-02-14T15:14:56Z","updated_at":"2018-05-03T15:50:28Z","pushed_at":"2018-05-03T15:50:26Z","git_url":"git://github.com/mikaelahonen/solita.github.com.git","ssh_url":"git@github.com:mikaelahonen/solita.github.com.git","clone_url":"https://github.com/mikaelahonen/solita.github.com.git","svn_url":"https://github.com/mikaelahonen/solita.github.com","homepage":"http://dev.solita.fi","size":193747,"stargazers_count":0,"watchers_count":0,"language":"CSS","has_issues":false,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":false,"forks_count":0,"mirror_url":null,"archived":false,"open_issues_count":0,"license":null,"forks":0,"open_issues":0,"watchers":0,"default_branch":"master"}},"base":{"label":"solita:master","ref":"master","sha":"a90c16b2b3ee77c284e90a516403505e4290ddcb","user":{"login":"solita","id":1804169,"avatar_url":"https://avatars1.githubusercontent.com/u/1804169?v=4","gravatar_id":"","url":"https://api.github.com/users/solita","html_url":"https://github.com/solita","followers_url":"https://api.github.com/users/solita/followers","following_url":"https://api.github.com/users/solita/following{/other_user}","gists_url":"https://api.github.com/users/solita/gists{/gist_id}","starred_url":"https://api.github.com/users/solita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solita/subscriptions","organizations_url":"https://api.github.com/users/solita/orgs","repos_url":"https://api.github.com/users/solita/repos","events_url":"https://api.github.com/users/solita/events{/privacy}","received_events_url":"https://api.github.com/users/solita/received_events","type":"Organization","site_admin":false},"repo":{"id":5763055,"name":"solita.github.com","full_name":"solita/solita.github.com","owner":{"login":"solita","id":1804169,"avatar_url":"https://avatars1.githubusercontent.com/u/1804169?v=4","gravatar_id":"","url":"https://api.github.com/users/solita","html_url":"https://github.com/solita","followers_url":"https://api.github.com/users/solita/followers","following_url":"https://api.github.com/users/solita/following{/other_user}","gists_url":"https://api.github.com/users/solita/gists{/gist_id}","starred_url":"https://api.github.com/users/solita/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/solita/subscriptions","organizations_url":"https://api.github.com/users/solita/orgs","repos_url":"https://api.github.com/users/solita/repos","events_url":"https://api.github.com/users/solita/events{/privacy}","received_events_url":"https://api.github.com/users/solita/received_events","type":"Organization","site_admin":false},"private":false,"html_url":"https://github.com/solita/solita.github.com","description":"Solita Developer Blog","fork":false,"url":"https://api.github.com/repos/solita/solita.github.com","forks_url":"https://api.github.com/repos/solita/solita.github.com/forks","keys_url":"https://api.github.com/repos/solita/solita.github.com/keys{/key_id}","collaborators_url":"https://api.github.com/repos/solita/solita.github.com/collaborators{/collaborator}","teams_url":"https://api.github.com/repos/solita/solita.github.com/teams","hooks_url":"https://api.github.com/repos/solita/solita.github.com/hooks","issue_events_url":"https://api.github.com/repos/solita/solita.github.com/issues/events{/number}","events_url":"https://api.github.com/repos/solita/solita.github.com/events","assignees_url":"https://api.github.com/repos/solita/solita.github.com/assignees{/user}","branches_url":"https://api.github.com/repos/solita/solita.github.com/branches{/branch}","tags_url":"https://api.github.com/repos/solita/solita.github.com/tags","blobs_url":"https://api.github.com/repos/solita/solita.github.com/git/blobs{/sha}","git_tags_url":"https://api.github.com/repos/solita/solita.github.com/git/tags{/sha}","git_refs_url":"https://api.github.com/repos/solita/solita.github.com/git/refs{/sha}","trees_url":"https://api.github.com/repos/solita/solita.github.com/git/trees{/sha}","statuses_url":"https://api.github.com/repos/solita/solita.github.com/statuses/{sha}","languages_url":"https://api.github.com/repos/solita/solita.github.com/languages","stargazers_url":"https://api.github.com/repos/solita/solita.github.com/stargazers","contributors_url":"https://api.github.com/repos/solita/solita.github.com/contributors","subscribers_url":"https://api.github.com/repos/solita/solita.github.com/subscribers","subscription_url":"https://api.github.com/repos/solita/solita.github.com/subscription","commits_url":"https://api.github.com/repos/solita/solita.github.com/commits{/sha}","git_commits_url":"https://api.github.com/repos/solita/solita.github.com/git/commits{/sha}","comments_url":"https://api.github.com/repos/solita/solita.github.com/comments{/number}","issue_comment_url":"https://api.github.com/repos/solita/solita.github.com/issues/comments{/number}","contents_url":"https://api.github.com/repos/solita/solita.github.com/contents/{+path}","compare_url":"https://api.github.com/repos/solita/solita.github.com/compare/{base}...{head}","merges_url":"https://api.github.com/repos/solita/solita.github.com/merges","archive_url":"https://api.github.com/repos/solita/solita.github.com/{archive_format}{/ref}","downloads_url":"https://api.github.com/repos/solita/solita.github.com/downloads","issues_url":"https://api.github.com/repos/solita/solita.github.com/issues{/number}","pulls_url":"https://api.github.com/repos/solita/solita.github.com/pulls{/number}","milestones_url":"https://api.github.com/repos/solita/solita.github.com/milestones{/number}","notifications_url":"https://api.github.com/repos/solita/solita.github.com/notifications{?since,all,participating}","labels_url":"https://api.github.com/repos/solita/solita.github.com/labels{/name}","releases_url":"https://api.github.com/repos/solita/solita.github.com/releases{/id}","deployments_url":"https://api.github.com/repos/solita/solita.github.com/deployments","created_at":"2012-09-11T09:59:48Z","updated_at":"2018-05-02T09:04:23Z","pushed_at":"2018-05-03T15:53:03Z","git_url":"git://github.com/solita/solita.github.com.git","ssh_url":"git@github.com:solita/solita.github.com.git","clone_url":"https://github.com/solita/solita.github.com.git","svn_url":"https://github.com/solita/solita.github.com","homepage":"http://dev.solita.fi","size":193314,"stargazers_count":7,"watchers_count":7,"language":"CSS","has_issues":true,"has_projects":true,"has_downloads":true,"has_wiki":true,"has_pages":true,"forks_count":58,"mirror_url":null,"archived":false,"open_issues_count":4,"license":null,"forks":58,"open_issues":4,"watchers":7,"default_branch":"master"}},"_links":{"self":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/292"},"html":{"href":"https://github.com/solita/solita.github.com/pull/292"},"issue":{"href":"https://api.github.com/repos/solita/solita.github.com/issues/292"},"comments":{"href":"https://api.github.com/repos/solita/solita.github.com/issues/292/comments"},"review_comments":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/292/comments"},"review_comment":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/comments{/number}"},"commits":{"href":"https://api.github.com/repos/solita/solita.github.com/pulls/292/commits"},"statuses":{"href":"https://api.github.com/repos/solita/solita.github.com/statuses/af8936b47c6dab86d2ca1db0bb7f19c01c95814a"}},"author_association":"NONE"}}
{"actor":{"display_login":"solitateppo"}}