<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_notes" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Notes – Chapters 1 and 2</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_notes_top">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_notes_top" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
You can sequence through the Introduction and Linear Classifier lecture video and note segments (go to Next page). </p><p>
You can also (or alternatively) download the <a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Chapter 1: Introduction to ML</a> and <a href="/assets/courseware/v1/9d904854b4ae0878cfdcedcdceabf937/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Linear_classifiers.pdf" target="_blank">Chapter 2: Linear classifiers</a> notes as PDF files. </p>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@MIT6036L01a_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Introduction to ML - perspective and history</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01a">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01a" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Introduction to ML - perspective and history</h3>
<div
id="video_MIT6036L01a"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01a/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:kXOsRyIVAdo", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01a/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01a/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01a/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01a"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_top_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Introduction to ML</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_top">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_top" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
The main focus of machine learning is <em>making decisions or predictions based on data</em>. There are a number of other fields with significant overlap in technique, but <span options="" class="marginote"><span class="marginote_desc" style="display:none">This story paraphrased from a post on 9/4/12 at <tt class="tt">andrewgelman.com</tt></span><span>difference in focus: </span></span> in economics and psychology, the goal is to discover underlying causal processes and in statistics it is to find a model that fits a data set well. In those fields, the end product is a model. In machine learning, we often fit models, but as a means to the end of making good predictions or decisions. </p><p>
As machine-learning (ML) methods have improved in their capability and scope, ML has become the best way, measured in terms of speed, human engineering time, and robustness, to make many applications. Great examples are face detection and speech recognition and many kinds of language-processing tasks. Almost any application that involves understanding data or signals that come from the real world can be best addressed using machine learning. </p><p><span options="" class="marginote"><span class="marginote_desc" style="display:none">and often undervalued</span><span>One crucial </span></span> aspect of machine learning approaches to solving problems is that human engineering plays an important role. A human still has to <em>frame</em> the problem: acquire and organize data, design a space of possible solutions, select a learning algorithm and its parameters, apply the algorithm to the data, validate the resulting solution to decide whether it's good enough to use, etc. These steps are of great importance. </p><p>
The conceptual basis of learning from data is the <span options="" class="marginote"><span class="marginote_desc" style="display:none">Bertrand Russell is my hero. –lpk</span><span><em>problem of induction</em>: </span></span> Why do we think that previously seen data will help us predict the future? This is a serious philosophical problem of long standing. We will operationalize it by making assumptions, such as that all training data are IID (independent and identically distributed) and that queries will be drawn from the same distribution as the training data, or that the answer comes from a set of possible answers known in advance. </p><p>
In general, we need to solve these two problems: </p><ul class="itemize"><li><p><b class="bf">estimation:</b> When we have data that are noisy reflections of some underlying quantity of interest, we have to aggregate the data and make estimates or predictions about the quantity. How do we deal with the fact that, for example, the same treatment may end up with different results on different trials? How can we predict how well an estimate may compare to future results? </p></li><li><p><b class="bf">generalization:</b> How can we predict results of a situation or experiment that we have never encountered before in our data set? </p></li></ul><p>
We can describe problems and their solutions using six characteristics, three of which characterize the problem and three of which characterize the solution: </p><ol class="enumerate"><li value="1"><p><b class="bf">Problem class:</b> What is the nature of the training data and what kinds of queries will be made at testing time? </p></li><li value="2"><p><b class="bf">Assumptions:</b> What do we know about the source of the data or the form of the solution? </p></li><li value="3"><p><b class="bf">Evaluation criteria:</b> What is the goal of the prediction or estimation system? How will the answers to individual queries be evaluated? How will the overall performance of the system be measured? </p></li><li value="4"><p><b class="bf">Model type:</b> Will an intermediate model be made? What aspects of the data will be modeled? How will the model be used to make predictions? </p></li><li value="5"><p><b class="bf">Model class:</b> What particular parametric class of models will be used? What criterion will we use to pick a particular model from the model class? </p></li><li value="6"><p><b class="bf">Algorithm:</b> What computational process will be used to fit the model to the data and/or to make predictions? </p></li></ol><p>
Without making some assumptions about the nature of the process generating the data, we cannot perform generalization. In the following sections, we elaborate <span options="" class="marginote"><span class="marginote_desc" style="display:none">Don't feel you have to memorize all these kinds of learning, etc. We just want you to have a very high-level view of (part of) the breadth of the field.</span><span>on these ideas. </span></span> </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><script src="/assets/courseware/v1/1ab2c06aefab58693cfc9c10394b7503/asset-v1:MITx+6.036+1T2019+type@asset+block/marginotes.js" type="text/javascript"/><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Saturday November 16, 2019; 07:30:51 PM (revision f808f068e)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006100">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006100" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@MIT6036L01b_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Introduction to ML - estimation and generalization</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01b">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01b" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Introduction to ML - estimation and generalization</h3>
<div
id="video_MIT6036L01b"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01b/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:zdSiYs8zSJQ", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01b/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01b/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01b/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01b"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@MIT6036L01c_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Supervised learning - setting</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01c">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01c" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Supervised learning - setting</h3>
<div
id="video_MIT6036L01c"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01c/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:wrfC_0EiUow", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01c/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01c/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01c/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01c"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_problem_class_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Problem class</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_problem_class">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_problem_class" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
There are many different <em>problem classes</em> in machine learning. They vary according to what kind of data is provided and what kind of conclusions are to be drawn from it. Five standard problem classes are described below, to establish some notation and terminology. </p><p>
In this course, we will focus on classification and regression (two examples of supervised learning), and will touch on reinforcement learning and sequence learning. </p><p><h3>Supervised learning</h3></p><p>
The idea of <em>supervised</em> learning is that the learning system is given inputs and told which specific outputs should be associated with them. We divide up supervised learning based on whether the outputs are drawn from a small finite set (classification) or a large finite or continuous set (regression). </p><p><h4>Classification</h4> Training data [mathjaxinline]{\cal D}_ n[/mathjaxinline] is in the form of a set of pairs [mathjaxinline]\{ (x^{(1)}, y^{(1)}), \ldots , (x^{(n)}, y^{(n)})\}[/mathjaxinline] where [mathjaxinline]x^{(i)}[/mathjaxinline] represents an object to be classified, most typically a [mathjaxinline]d[/mathjaxinline]-dimensional vector of real and/or discrete values, and [mathjaxinline]y^{(i)}[/mathjaxinline] is an element of a discrete <span options="" class="marginote"><span class="marginote_desc" style="display:none">Many textbooks use [mathjaxinline]x_ i[/mathjaxinline] and [mathjaxinline]t_ i[/mathjaxinline] instead of [mathjaxinline]x^{(i)}[/mathjaxinline] and [mathjaxinline]y^{(i)}[/mathjaxinline]. We find that notation somewhat difficult to manage when [mathjaxinline]x^{(i)}[/mathjaxinline] is itself a vector and we need to talk about its elements. The notation we are using is standard in some other parts of the machine-learning literature.</span><span>set of values. </span></span> The [mathjaxinline]y[/mathjaxinline] values are sometimes called <em>target values</em>. </p><p>
A classification problem is <em>binary</em> or <em>two-class</em> if [mathjaxinline]y^{(i)}[/mathjaxinline] is drawn from a set of two possible values; otherwise, it is called <em>multi-class</em>. </p><p>
The goal in a classification problem is ultimately, given a new input value [mathjaxinline]x^{(n+1)}[/mathjaxinline], to predict the value of [mathjaxinline]y^{(n+1)}[/mathjaxinline]. </p><p>
Classification problems are a kind of <em>supervised learning</em>, because the desired output (or class) [mathjaxinline]y^{(i)}[/mathjaxinline] is specified for each of the training examples [mathjaxinline]x^{(i)}[/mathjaxinline]. </p><p><h4>Regression</h4></p><p>
Regression is like classification, except that [mathjaxinline]y^{(i)} \in \mathbb {R}^ k[/mathjaxinline]. </p><p><h3>Unsupervised learning</h3></p><p><em>Unsupervised</em> learning doesn't involve learning a function from inputs to outputs based on a set of input-output pairs. Instead, one is given a data set and generally expected to find some patterns or structure inherent in it. </p><p><h4>Density estimation</h4></p><p>
Given samples [mathjaxinline]x^{(1)}, \ldots , x^{(n)} \in \mathbb {R}^ D[/mathjaxinline] <span options="" class="marginote"><span class="marginote_desc" style="display:none">IID stands for <em>independent and identically distributed</em>, which means that the elements in the set are related in the sense that they all come from the same underlying probability distribution, but not in any other ways.</span><span>drawn IID </span></span> from some distribution [mathjaxinline]\Pr (X)[/mathjaxinline], the goal is to predict the probability [mathjaxinline]\Pr (x^{(n+1)})[/mathjaxinline] of an element drawn from the same distribution. Density estimation sometimes plays a role as a “subroutine" in the overall learning method for supervised learning, as well. </p><p><h4>Clustering</h4></p><p>
Given samples [mathjaxinline]x^{(1)}, \ldots , x^{(n)} \in \mathbb {R}^ D[/mathjaxinline], the goal is to find a partitioning (or “clustering") of the samples that groups together samples that are similar. There are many different objectives, depending on the definition of the similarity between samples and exactly what criterion is to be used (e.g., minimize the average distance between elements inside a cluster and maximize the average distance between elements across clusters). Other methods perform a “soft" clustering, in which samples may be assigned 0.9 membership in one cluster and 0.1 in another. Clustering is sometimes used as a step in density estimation, and sometimes to find useful structure in data. </p><p><h4>Dimensionality reduction</h4></p><p>
Given samples [mathjaxinline]x^{(1)}, \ldots , x^{(n)} \in \mathbb {R}^ D[/mathjaxinline], the problem is to re-represent them as points in a [mathjaxinline]d[/mathjaxinline]-dimensional space, where [mathjaxinline]d < D[/mathjaxinline]. The goal is typically to retain information in the data set that will, e.g., allow elements of one class to be discriminated from another. </p><p>
Dimensionality reduction is a standard technique which is particularly useful for visualizing or understanding high-dimensional data. If the goal is ultimately to perform regression or classification on the data after the dimensionality is reduced, it is usually best to articulate an objective for the overall prediction problem rather than to first do dimensionality reduction without knowing which dimensions will be important for the prediction task. </p><p><h3>Reinforcement learning</h3></p><p>
In reinforcement learning, the goal is to learn a mapping from input values [mathjaxinline]x[/mathjaxinline] to output values [mathjaxinline]y[/mathjaxinline], but without a direct supervision signal to specify which output values [mathjaxinline]y[/mathjaxinline] are best for a particular input. There is no training set specified <em>a priori</em>. Instead, the learning problem is framed as an agent interacting with an environment, in the following setting: </p><ul class="itemize"><li><p>
The agent observes the current state, [mathjaxinline]x^{(0)}[/mathjaxinline]. </p></li><li><p>
It selects an action, [mathjaxinline]y^{(0)}[/mathjaxinline]. </p></li><li><p>
It receives a reward, [mathjaxinline]r^{(0)}[/mathjaxinline], which depends on [mathjaxinline]x^{(0)}[/mathjaxinline] and possibly [mathjaxinline]y^{(0)}[/mathjaxinline]. </p></li><li><p>
The environment transitions probabilistically to a new state, [mathjaxinline]x^{(1)}[/mathjaxinline], with a distribution that depends only on [mathjaxinline]x^{(0)}[/mathjaxinline] and [mathjaxinline]y^{(0)}[/mathjaxinline]. </p></li><li><p>
The agent observes the current state, [mathjaxinline]x^{(1)}[/mathjaxinline]. </p></li><li><p>
[mathjaxinline]\ldots[/mathjaxinline] </p></li></ul><p>
The goal is to find a policy [mathjaxinline]\pi[/mathjaxinline], mapping [mathjaxinline]x[/mathjaxinline] to [mathjaxinline]y[/mathjaxinline], (that is, states to actions) such that some long-term sum or average of rewards [mathjaxinline]r[/mathjaxinline] is maximized. </p><p>
This setting is very different from either supervised learning or unsupervised learning, because the agent's action choices affect both its reward and its ability to observe the environment. It requires careful consideration of the long-term effects of actions, as well as all of the other issues that pertain to supervised learning. </p><p><h3>Sequence learning</h3></p><p>
In sequence learning, the goal is to learn a mapping from <em>input sequences</em> [mathjaxinline]x_0, \ldots , x_ n[/mathjaxinline] to <em>output sequences</em> [mathjaxinline]y_1, \ldots , y_ m[/mathjaxinline]. The mapping is typically represented as a <em>state machine</em>, with one function [mathjaxinline]f[/mathjaxinline] used to compute the next hidden internal state given the input, and another function [mathjaxinline]g[/mathjaxinline] used to compute the output given the current hidden state. </p><p>
It is supervised in the sense that we are told what output sequence to generate for which input sequence, but the internal functions have to be learned by some method other than direct supervision, because we don't know what the hidden state sequence is. </p><p><h3>Other settings</h3> There are many other problem settings. Here are a few. </p><p>
In <em>semi-supervised</em> learning, we have a supervised-learning training set, but there may be an additional set of [mathjaxinline]x^{(i)}[/mathjaxinline] values with no known [mathjaxinline]y^{(i)}[/mathjaxinline]. These values can still be used to improve learning performance if they are drawn from [mathjaxinline]\Pr (X)[/mathjaxinline] that is the marginal of [mathjaxinline]\Pr (X, Y)[/mathjaxinline] that governs the rest of the data set. </p><p>
In <em>active</em> learning, it is assumed to be expensive to acquire a label [mathjaxinline]y^{(i)}[/mathjaxinline] (imagine asking a human to read an x-ray image), so the learning algorithm can sequentially ask for particular inputs [mathjaxinline]x^{(i)}[/mathjaxinline] to be labeled, and must carefully select queries in order to learn as effectively as possible while minimizing the cost of labeling. </p><p>
In <em>transfer</em> learning (also called <em>meta-learning</em>), there are multiple tasks, with data drawn from different, but related, distributions. The goal is for experience with previous tasks to apply to learning a current task in a way that requires decreased experience with the new task. </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><script src="/assets/courseware/v1/1ab2c06aefab58693cfc9c10394b7503/asset-v1:MITx+6.036+1T2019+type@asset+block/marginotes.js" type="text/javascript"/><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Friday May 24, 2019; 02:28:04 PM (revision 4f166135)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006101">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006101" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@Lecture_Supervised_learning_-_hypotheses" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Supervised learning - hypotheses</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01d">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01d" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Supervised learning - hypotheses</h3>
<div
id="video_MIT6036L01d"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01d/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:92hkMDcpwkQ", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01d/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01d/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01d/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01d"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_assumptions_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Assumptions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_assumptions">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_assumptions" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
The kinds of assumptions that we can make about the data source or the solution include: </p><ul class="itemize"><li><p>
The data are independent and identically distributed. </p></li><li><p>
The data are generated by a Markov chain. </p></li><li><p>
The process generating the data might be adversarial. </p></li><li><p>
The “true" model that is generating the data can be perfectly described by one of some particular set of hypotheses. </p></li></ul><p>
The effect of an assumption is often to reduce the “size" or “expressiveness" of the space of possible hypotheses and therefore reduce the amount of data required to reliably identify an appropriate hypothesis. </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Friday May 24, 2019; 02:28:04 PM (revision 4f166135)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006102">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006102" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@MIT6036L01e_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Evaluating predictions - loss functions</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01e">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01e" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Evaluating predictions - loss functions</h3>
<div
id="video_MIT6036L01e"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01e/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:JGFC-3XCUQs", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01e/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01e/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01e/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01e"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@MIT6036L01f_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Evaluating hypotheses - training set error</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01f">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01f" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Evaluating hypotheses - training set error</h3>
<div
id="video_MIT6036L01f"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01f/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:gLuo7u-5ezs", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01f/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01f/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01f/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01f"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_evaluation_criteria_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Evaluation criteria</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_evaluation_criteria">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_evaluation_criteria" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
Once we have specified a problem class, we need to say what makes an output or the answer to a query good, given the training data. We specify evaluation criteria at two levels: how an individual prediction is scored, and how the overall behavior of the prediction or estimation system is scored. </p><p>
The quality of predictions from a learned model is often expressed in terms of a <em>loss function</em>. A loss function [mathjaxinline]L(g, a)[/mathjaxinline] tells you how much you will be penalized for making a guess [mathjaxinline]g[/mathjaxinline] when the answer is actually [mathjaxinline]a[/mathjaxinline]. There are many possible loss functions. Here are some frequently used examples: </p><ul class="itemize"><li><p><b class="bf">0-1 Loss</b> applies to predictions drawn <span options="" class="marginote"><span class="marginote_desc" style="display:none">If the actual values are drawn from a continuous distribution, the probability they would ever be equal to some predicted [mathjaxinline]g[/mathjaxinline] is 0 (except for some weird cases).</span><span>from finite domains.</span></span> </p><table id="a0000000002" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto"><tr><td class="equation" style="width:80%; border:none">[mathjax]L(g, a) = \begin{cases} 0 & \text {if $g = a$} \\ 1 & \text {otherwise} \end{cases}[/mathjax]</td><td class="eqnnum" style="width:20%; border:none"> </td></tr></table></li><li><p><b class="bf">Squared loss</b></p><table id="a0000000003" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto"><tr><td class="equation" style="width:80%; border:none">[mathjax]L(g, a) = (g - a)^2[/mathjax]</td><td class="eqnnum" style="width:20%; border:none"> </td></tr></table></li><li><p><b class="bf">Linear loss</b></p><table id="a0000000004" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto"><tr><td class="equation" style="width:80%; border:none">[mathjax]L(g, a) = |g - a|[/mathjax]</td><td class="eqnnum" style="width:20%; border:none"> </td></tr></table></li><li><p><b class="bf">Asymmetric loss</b> Consider a situation in which you are trying to predict whether someone is having a heart attack. It might be much worse to predict “no" when the answer is really “yes", than the other way around. </p><table id="a0000000005" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto"><tr><td class="equation" style="width:80%; border:none">[mathjax]L(g, a) = \begin{cases} 1 & \text {if $g = 1$ and $a = 0$} \\ 10 & \text {if $g = 0$ and $a = 1$} \\ 0 & \text {otherwise} \end{cases}[/mathjax]</td><td class="eqnnum" style="width:20%; border:none"> </td></tr></table></li></ul><p>
Any given prediction rule will usually be evaluated based on multiple predictions and the loss of each one. At this level, we might be interested in: </p><ul class="itemize"><li><p>
Minimizing expected loss over all the predictions (also known as risk) </p></li><li><p>
Minimizing maximum loss: the loss of the worst prediction </p></li><li><p>
Minimizing or bounding regret: how much worse this predictor performs than the best one drawn from some class </p></li><li><p>
Characterizing asymptotic behavior: how well the predictor will perform in the limit of infinite training data </p></li><li><p>
Finding algorithms that are probably approximately correct: they probably generate a hypothesis that is right most of the time. </p></li></ul><p>
There is a theory of rational agency that argues that you should always select the action that <em>minimizes the expected loss</em>. This strategy will, for example, make you the most money in the long run, in <span options="" class="marginote"><span class="marginote_desc" style="display:none">Of course, there are other models for action selection and it's clear that people do not always (or maybe even often) select actions that follow this rule.</span><span>a gambling setting. </span></span> Expected loss is also sometimes called <em>risk</em> in the machine-learning literature, but that term means other things in economics or other parts of decision theory, so be careful...it's risky to use it. We will, most of the time, concentrate on this criterion. </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><script src="/assets/courseware/v1/1ab2c06aefab58693cfc9c10394b7503/asset-v1:MITx+6.036+1T2019+type@asset+block/marginotes.js" type="text/javascript"/><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Friday May 24, 2019; 02:28:04 PM (revision 4f166135)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006103">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006103" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_model_type_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Model type</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_model_type">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_model_type" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
Recall that the goal of a machine-learning system is typically to estimate or generalize, based on data provided. Below, we examine the role of model-making in machine learning. </p><p><h3>No model</h3></p><p>
In some simple cases, in response to queries, we can generate predictions directly from the training data, without the construction of any intermediate model. For example, in regression or classification, we might generate an answer to a new query by averaging answers to recent queries, as in the <em>nearest neighbor</em> method. </p><p><h3>Prediction rule</h3></p><p>
This two-step process is more typical: </p><ol class="enumerate"><li value="1"><p>
“Fit" a model to the training data </p></li><li value="2"><p>
Use the model directly to make predictions </p></li></ol><p>
In the <em>prediction rule</em> setting of regression or classification, the model will be some hypothesis or prediction rule [mathjaxinline]y = h(x ; \theta )[/mathjaxinline] for some functional form [mathjaxinline]h[/mathjaxinline]. The idea is that [mathjaxinline]\theta[/mathjaxinline] is a vector of one or more parameter values that will be determined by fitting the model to the training data and then be held fixed. Given a new [mathjaxinline]x^{(n+1)}[/mathjaxinline], we would then make the prediction [mathjaxinline]h(x^{(n+1)}; \theta )[/mathjaxinline]. <span options="" class="marginote"><span class="marginote_desc" style="display:none">We write [mathjaxinline]f(a ; b)[/mathjaxinline] to describe a function that is usually applied to a single argument [mathjaxinline]a[/mathjaxinline], but is a member of a parametric family of functions, with the particular function determined by parameter value [mathjaxinline]b[/mathjaxinline]. So, for example, we might write [mathjaxinline]h(x ; p) = x^ p[/mathjaxinline] to describe a function of a single argument that is parameterized by [mathjaxinline]p[/mathjaxinline].</span><span>note</span></span> </p><p>
The fitting process is often articulated as an optimization problem: Find a value of [mathjaxinline]\theta[/mathjaxinline] that minimizes some criterion involving [mathjaxinline]\theta[/mathjaxinline] and the data. An optimal strategy, if we knew the actual underlying distribution on our data, [mathjaxinline]\Pr (X,Y)[/mathjaxinline] would be to predict the value of [mathjaxinline]y[/mathjaxinline] that minimizes the <em>expected loss</em>, which is also known as the <em>test error</em>. If we don't have that actual underlying distribution, or even an estimate of it, we can take the approach of minimizing the <em>training error</em>: that is, finding the prediction rule [mathjaxinline]h[/mathjaxinline] that minimizes the average loss on our training data set. So, we would seek [mathjaxinline]\theta[/mathjaxinline] that minimizes </p><table id="a0000000006" class="equation" width="100%" cellspacing="0" cellpadding="7" style="table-layout:auto"><tr><td class="equation" style="width:80%; border:none">[mathjax]\mathcal{E}_ n(\theta ) = \frac{1}{n}\sum _{i = 1}^ n L(h(x^{(i)};\theta ), y^{(i)})\; \; ,[/mathjax]</td><td class="eqnnum" style="width:20%; border:none"> </td></tr></table><p>
where the loss function [mathjaxinline]L(g, a)[/mathjaxinline] measures how bad it would be to make a guess of [mathjaxinline]g[/mathjaxinline] when the actual value is [mathjaxinline]a[/mathjaxinline]. </p><p>
We will find that minimizing training error alone is often not a good choice: it is possible to emphasize fitting the current data too strongly and end up with a hypothesis that does not generalize well when presented with new [mathjaxinline]x[/mathjaxinline] values. </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><script src="/assets/courseware/v1/1ab2c06aefab58693cfc9c10394b7503/asset-v1:MITx+6.036+1T2019+type@asset+block/marginotes.js" type="text/javascript"/><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Friday May 24, 2019; 02:28:04 PM (revision 4f166135)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006104">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006104" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_model_class_and_parameter_fitting_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Model class and parameter fitting</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_model_class_and_parameter_fitting">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_model_class_and_parameter_fitting" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
A model <em>class</em> [mathjaxinline]{\cal M}[/mathjaxinline] is a set of possible models, typically parameterized by a vector of parameters [mathjaxinline]\Theta[/mathjaxinline]. What assumptions will we make about the form of the model? When solving a regression problem using a prediction-rule approach, we might try to find a linear function [mathjaxinline]h(x ; \theta , \theta _0) = \theta ^ T x + \theta _0[/mathjaxinline] that fits our data well. In this example, the parameter vector [mathjaxinline]\Theta = (\theta , \theta _0)[/mathjaxinline]. </p><p>
For problem types such as discrimination and classification, there are huge numbers of model classes that have been considered...we'll spend much of this course exploring these model classes, especially neural networks models. We will almost completely restrict our attention to model classes with a fixed, finite number of parameters. Models that relax this assumption are called “non-parametric" models. </p><p>
How do we select a model class? In some cases, the machine-learning practitioner will have a good idea of what an appropriate model class is, and will specify it directly. In other cases, we may consider several model classes. In such situations, we are solving a <em>model selection</em> problem: model-selection is to pick a model class [mathjaxinline]{\cal M}[/mathjaxinline] from a (usually finite) set of possible model classes; <em>model fitting</em> is to pick a particular model in that class, specified by parameters [mathjaxinline]\theta[/mathjaxinline]. </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Friday May 24, 2019; 02:28:04 PM (revision 4f166135)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006105">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006105" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@MIT6036L01g_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Lecture: Learning algorithms</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01g">
<div class="xblock xblock-public_view xblock-public_view-video xmodule_display xmodule_VideoBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01g" data-block-type="video" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "Video"}
</script>
<h3 class="hd hd-2">Lecture: Learning algorithms</h3>
<div
id="video_MIT6036L01g"
class="video closed"
data-metadata='{"prioritizeHls": false, "sources": [], "autoplay": false, "transcriptLanguage": "en", "lmsRootURL": "https://openlearninglibrary.mit.edu", "transcriptTranslationUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01g/handler/transcript/translation/__lang__", "speed": null, "generalSpeed": 1.0, "streams": "1.00:O924ba_ztu8", "autoAdvance": false, "ytApiUrl": "https://www.youtube.com/iframe_api", "completionPercentage": 0.95, "start": 0.0, "savedVideoPosition": 0.0, "autohideHtml5": false, "saveStateEnabled": false, "recordedYoutubeIsAvailable": true, "publishCompletionUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01g/handler/publish_completion", "saveStateUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01g/handler/xmodule_handler/save_user_state", "poster": null, "duration": 0.0, "captionDataDir": null, "showCaptions": "true", "transcriptAvailableTranslationsUrl": "/courses/course-v1:MITx+6.036+1T2019/xblock/block-v1:MITx+6.036+1T2019+type@video+block@MIT6036L01g/handler/transcript/available_translations", "ytTestTimeout": 1500, "transcriptLanguages": {"en": "English"}, "completionEnabled": false, "ytMetadataEndpoint": "", "end": 0.0}'
data-bumper-metadata='null'
data-autoadvance-enabled="False"
data-poster='null'
tabindex="-1"
>
<div class="focus_grabber first"></div>
<div class="tc-wrapper">
<div class="video-wrapper">
<span tabindex="0" class="spinner" aria-hidden="false" aria-label="Loading video player"></span>
<span tabindex="-1" class="btn-play fa fa-youtube-play fa-2x is-hidden" aria-hidden="true" aria-label="Play video"></span>
<div class="video-player-pre"></div>
<div class="video-player">
<div id="MIT6036L01g"></div>
<h4 class="hd hd-4 video-error is-hidden">No playable video sources found.</h4>
<h4 class="hd hd-4 video-hls-error is-hidden">
Your browser does not support this video format. Try using a different browser.
</h4>
</div>
<div class="video-player-post"></div>
<div class="closed-captions"></div>
<div class="video-controls is-hidden">
<div>
<div class="vcr"><div class="vidtime">0:00 / 0:00</div></div>
<div class="secondary-controls"></div>
</div>
</div>
</div>
</div>
<div class="focus_grabber last"></div>
</div>
</div>
</div>
</div>
</div>
<div class="xblock xblock-public_view xblock-public_view-vertical" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@vertical+block@intro_algorithm_vert" data-block-type="vertical" data-graded="False" data-init="VerticalStudentView" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<h2 class="hd hd-2 unit-title">Algorithm</h2>
<div class="vert-mod">
<div class="vert vert-0" data-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_algorithm">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@intro_algorithm" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<p>
Once we have described a class of models and a way of scoring a model given data, we have an algorithmic problem: what sequence of computational instructions should we run in order to find a good model from our class? For example, determining the parameter vector [mathjaxinline]\theta[/mathjaxinline] which minimizes [mathjaxinline]\mathcal{E}_ n(\theta )[/mathjaxinline] might be done using a familiar least-squares minimization algorithm, when the model [mathjaxinline]h[/mathjaxinline] is a function being fit to some data [mathjaxinline]x[/mathjaxinline]. </p><p>
Sometimes we can use software that was designed, generically, to perform optimization. In many other cases, we use algorithms that are specialized for machine-learning problems, or for particular hypotheses classes. </p><p>
Some algorithms are not easily seen as trying to optimize a particular criterion. In fact, the first algorithm we study for finding linear classifiers, the perceptron algorithm, has this character. </p><p>
<br/></p><p>
<br/></p><p><a href="/assets/courseware/v1/2481f8f2964716032b134db99e369b81/asset-v1:MITx+6.036+1T2019+type@asset+block/notes_chapter_Introduction.pdf" target="_blank">Download this chapter as a PDF file</a></p><span><br/><span style="color:gray;font-size:10pt"><center>This page was last updated on Friday May 24, 2019; 02:28:04 PM (revision 4f166135)</center></span></span>
</div>
</div>
<div class="vert vert-1" data-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006106">
<div class="xblock xblock-public_view xblock-public_view-html xmodule_display xmodule_HtmlBlock" data-has-score="False" data-runtime-class="LmsRuntime" data-request-token="63ddedd66d3c11ef887b0214bd5530e3" data-usage-id="block-v1:MITx+6.036+1T2019+type@html+block@site_search_box006106" data-block-type="html" data-graded="False" data-init="XBlockToXModuleShim" data-course-id="course-v1:MITx+6.036+1T2019" data-runtime-version="1">
<script type="json/xblock-args" class="xblock-json-init-args">
{"xmodule-type": "HTMLModule"}
</script>
<span><a href="/asset-v1:MITx+6.036+1T2019+type@asset+block/NONE" id="dummy_course_static_link" style="display:none"/><a href="/courses/course-v1:MITx+6.036+1T2019/jump_to_id/NONE" id="dummy_jump_link" style="display:none"/><script type="text/javascript">
var add_site_search = function(){
course_static_url = $('#dummy_course_static_link').attr('href').replace('/NONE', '');
jump_to_url = $('#dummy_jump_link').attr('href').replace('/NONE', '');
if (typeof String.prototype.startsWith != 'function') {
// see below for better implementation!
String.prototype.startsWith = function (str){
return this.indexOf(str) === 0;
};
}
if(typeof(String.prototype.trim) === "undefined")
{
String.prototype.trim = function()
{
return String(this).replace(/^\s+|\s+$/g, '');
};
}
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var amp = String.fromCharCode(38);
var rlb = rb + lb;
var mke = function(x){ return lb + x + rb; }
var search_module_url = "";
var get_search_module_ficus = function(){
var cid = $('div.xblock').data('course-id');
if (cid){
console.log("cid = ", cid);
// search_module_url = "/courses/course-v1:MITx+6.036+1T2019/" + cid + "/courseware/welcome/Search_this_course/";
search_module_url = "/courses/course-v1:MITx+6.036+1T2019/courseware/welcome/Search_this_course/"; // automatically rewritten
console.log("3. search_module_url = ", search_module_url);
return;
}
var course_root_link = $('span.nav-item-course').find('a').attr('href');
if (course_root_link){
console.log("course_root_link = ", course_root_link);
search_module_url = course_root_link.replace("course/", "courseware/welcome/Search_this_course/");
console.log("2. search_module_url = ", search_module_url);
return
}
console.log("cannot determine search module url");
}
var get_search_module = function(){
// find search this module link
if (!($('div.course-index').length)){
return get_search_module_ficus();
}
$('div.course-index').find('nav').find('a').each(function(){
if ($(this).text().trim().startsWith("Search this course")){
search_module_url = $(this).attr('href');
console.log("search_module_url = ", search_module_url);
}
});
}
var go_to_search = function(){
get_search_module();
var sterm = $('#site-search-box').val();
// new_url = jump_to_url + "/Search_this_module/?q=" + sterm;
new_url = search_module_url + "?q=" + sterm;
console.log("sterm = ", sterm, " ; going to ", new_url);
window.location.href = new_url;
}
if (!$('#site-search-box').length){
$("nav.courseware").find("ol").append(lb + "section style='float:right'" + rlb + "input size='20'"
+ " id='site-search-box'"
+ rlb + "img src='" + course_static_url
+ "/images_search_glass.png'/" + rlb + "/input" + rlb + "/section" + rb);
}
$("#site-search-box").keypress(function(event) {
if (event.which == 13) {
event.preventDefault();
go_to_search();
}
});
// $('#site-search-box').bind("enterKey", go_to_search);
var get = function(x){
return eval(x);
}
return {'course_static_url': course_static_url,
'jump_to_url': jump_to_url,
'go_to_search': go_to_search,
'get_search_module': get_search_module,
'get_search_module_ficus': get_search_module_ficus,
'get': get,
}
}
try {
var the_site_search = add_site_search();
}
catch(err){
console.log("[add_site_search] err=", err);
}
var add_fix_transcript = function(){
if ($('div.wrap-instructor-info').length==0){
return;
}
$('div.xblock-student_view-video').each(function(key, vblock_e){
var vblock = $(vblock_e);
var vuid = vblock.data('usage-id').split('@');
var vid;
if (vuid.length==1){
vuid = vblock.data('usage-id').split(';_')
vid = vuid[5];
}else{
vid = vuid[2];
}
var mfnpre = vid.split("_video",1)[0];
var mfnid = mfnpre; // no periods
mfnpre = mfnpre.replace('8_370', '8.370'); // periods in gh filename
var lb = String.fromCharCode(60);
var rb = String.fromCharCode(62);
var mke = function(x){ return lb + x + rb; }
var ftid = "fix_transcript_" + mfnid;
if (!$('#' + ftid).length){
var html = lb + "span id='" + ftid + "' style='float:right'" + rb + lb + "a href='#'" + rb;
html += "contribute transcript fix" + mke("/a") + mke("/span");
console.log("html = ", html);
vblock.after(html)
}
$('#' + ftid).click(function(){
var cst = $('ol.subtitles').find('li.current');
var cindex = Number(cst.data('index'));
var gurl;
if (mfnpre.endsWith('_cq_sol')){
gurl = "https://github.com/mitocw/content-mit-8370x-cq-sol-subtitles/blob/master/";
}else{
gurl = "https://github.com/mitocw/content-mit-8370x-subtitles/blob/master/";
}
gurl += mfnpre + ".txt#L" + String(cindex + 10 + 1);
console.log("going to ", gurl);
window.open(gurl, "MITx 8.370x subtitle source");
});
});
}
try{
add_fix_transcript();
}
catch(err){
console.log(err);
}
try{
var rb = String.fromCharCode(62);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 3000);
setTimeout(function(){ $('.math' + rb + 'span').css("border-left-color","transparent"); }, 8000);
}
catch(err){
console.log(err);
}
</script></span>
</div>
</div>
</div>
</div>
© All Rights Reserved