update
This commit is contained in:
@@ -318,7 +318,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 1, 2022</h4>
|
||||
<h4>Nov 2, 2022</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
|
||||
@@ -304,6 +304,9 @@ MathJax.Hub.Config({
|
||||
|
||||
<ul>
|
||||
<li> Thursday: Basics of decision trees, classification and regression algorithms</li>
|
||||
<ul>
|
||||
<li> <b>Note</b>: Thursday's lecture is digital only due to "High-school post-education day":https://www.uio.no/om/samarbeid/skole/fagped-dag/"</li>
|
||||
</ul>
|
||||
<li> Friday: Decision trees and ensemble models (bagging and random forests)</li>
|
||||
</ul>
|
||||
<div class="panel panel-default">
|
||||
|
||||
@@ -318,7 +318,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 1, 2022</h4>
|
||||
<h4>Nov 2, 2022</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
|
||||
@@ -184,7 +184,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 1, 2022</h4>
|
||||
<h4>Nov 2, 2022</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
@@ -199,6 +199,11 @@ MathJax.Hub.Config({
|
||||
|
||||
<ul>
|
||||
<p><li> Thursday: Basics of decision trees, classification and regression algorithms</li>
|
||||
<ul>
|
||||
|
||||
<p><li> <b>Note</b>: Thursday's lecture is digital only due to "High-school post-education day":https://www.uio.no/om/samarbeid/skole/fagped-dag/"</li>
|
||||
</ul>
|
||||
<p>
|
||||
<p><li> Friday: Decision trees and ensemble models (bagging and random forests)</li>
|
||||
</ul>
|
||||
<p>
|
||||
|
||||
@@ -262,7 +262,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 1, 2022</h4>
|
||||
<h4>Nov 2, 2022</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
@@ -271,6 +271,9 @@ MathJax.Hub.Config({
|
||||
|
||||
<ul>
|
||||
<li> Thursday: Basics of decision trees, classification and regression algorithms</li>
|
||||
<ul>
|
||||
<li> <b>Note</b>: Thursday's lecture is digital only due to "High-school post-education day":https://www.uio.no/om/samarbeid/skole/fagped-dag/"</li>
|
||||
</ul>
|
||||
<li> Friday: Decision trees and ensemble models (bagging and random forests)</li>
|
||||
</ul>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
|
||||
@@ -339,7 +339,7 @@ MathJax.Hub.Config({
|
||||
</center>
|
||||
<br>
|
||||
<center>
|
||||
<h4>Nov 1, 2022</h4>
|
||||
<h4>Nov 2, 2022</h4>
|
||||
</center> <!-- date -->
|
||||
<br>
|
||||
|
||||
@@ -348,6 +348,9 @@ MathJax.Hub.Config({
|
||||
|
||||
<ul>
|
||||
<li> Thursday: Basics of decision trees, classification and regression algorithms</li>
|
||||
<ul>
|
||||
<li> <b>Note</b>: Thursday's lecture is digital only due to "High-school post-education day":https://www.uio.no/om/samarbeid/skole/fagped-dag/"</li>
|
||||
</ul>
|
||||
<li> Friday: Decision trees and ensemble models (bagging and random forests)</li>
|
||||
</ul>
|
||||
<div class="alert alert-block alert-block alert-text-normal">
|
||||
|
||||
Binary file not shown.
+115
-113
@@ -2,7 +2,7 @@
|
||||
"cells": [
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "303fdfce",
|
||||
"id": "d71885d1",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -14,7 +14,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "89424210",
|
||||
"id": "51c93be7",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -22,14 +22,14 @@
|
||||
"# Week 44: Decision Trees, Ensemble methods and Random Forests\n",
|
||||
"**Morten Hjorth-Jensen**, Department of Physics, University of Oslo and Department of Physics and Astronomy and National Superconducting Cyclotron Laboratory, Michigan State University\n",
|
||||
"\n",
|
||||
"Date: **Nov 1, 2022**\n",
|
||||
"Date: **Nov 2, 2022**\n",
|
||||
"\n",
|
||||
"Copyright 1999-2022, Morten Hjorth-Jensen. Released under CC Attribution-NonCommercial 4.0 license"
|
||||
]
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6177c33f",
|
||||
"id": "dc2cab51",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -38,6 +38,8 @@
|
||||
"\n",
|
||||
"* Thursday: Basics of decision trees, classification and regression algorithms\n",
|
||||
"\n",
|
||||
" * **Note**: Thursday's lecture is digital only due to \"High-school post-education day\":https://www.uio.no/om/samarbeid/skole/fagped-dag/\"\n",
|
||||
"\n",
|
||||
"* Friday: Decision trees and ensemble models (bagging and random forests)\n",
|
||||
"\n",
|
||||
"**Videos.**\n",
|
||||
@@ -51,7 +53,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "07e99622",
|
||||
"id": "2bf703ef",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -69,7 +71,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "cec56cc9",
|
||||
"id": "98778a6c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -100,7 +102,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7d8a5e44",
|
||||
"id": "03ad6396",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -120,7 +122,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "23a71044",
|
||||
"id": "d56e4131",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -134,7 +136,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "f241ee74",
|
||||
"id": "15e9ccca",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -147,7 +149,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c428c3b2",
|
||||
"id": "1d3d956e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -165,7 +167,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b340bd77",
|
||||
"id": "26b7124c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -188,7 +190,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "94c90118",
|
||||
"id": "63bd32f3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -211,7 +213,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c8d71b3f",
|
||||
"id": "e07dde87",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -222,7 +224,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 1,
|
||||
"id": "287a7d14",
|
||||
"id": "3b672587",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -323,7 +325,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5f44ba61",
|
||||
"id": "71707f31",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -345,7 +347,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "76e979a6",
|
||||
"id": "b9d1aa76",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -357,7 +359,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "79c449fe",
|
||||
"id": "9bd688f8",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -368,7 +370,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ea2d207a",
|
||||
"id": "c75f76be",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -390,7 +392,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "721908c8",
|
||||
"id": "69684b47",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -403,7 +405,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c47e1ef0",
|
||||
"id": "55e24148",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -415,7 +417,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "15b9c732",
|
||||
"id": "337c3963",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -425,7 +427,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ef0dc96b",
|
||||
"id": "1ce2e95c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -437,7 +439,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "52ddf624",
|
||||
"id": "6b43c87d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -447,7 +449,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e87adb62",
|
||||
"id": "5a752b5a",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -459,7 +461,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e5288f89",
|
||||
"id": "02d8d908",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -492,7 +494,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "03cdba4b",
|
||||
"id": "bf3546d3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -516,7 +518,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7f3cca97",
|
||||
"id": "56d9f28b",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -528,7 +530,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "81908085",
|
||||
"id": "bb5a288c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -540,7 +542,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "00b84717",
|
||||
"id": "074d2165",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -568,7 +570,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9cb838a8",
|
||||
"id": "16c88686",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -594,7 +596,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c77af063",
|
||||
"id": "8025e3a5",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -617,7 +619,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ab9b5809",
|
||||
"id": "edc69600",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -644,7 +646,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "237b53b5",
|
||||
"id": "b34390f9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -663,7 +665,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7f0692e9",
|
||||
"id": "72bb5da6",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -675,7 +677,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "96b4cc20",
|
||||
"id": "1bea46b9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -688,7 +690,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3c47a735",
|
||||
"id": "83b2f14e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -700,7 +702,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "668bb7e6",
|
||||
"id": "93c3becf",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -710,7 +712,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c5bd680f",
|
||||
"id": "e34f4ce3",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -722,7 +724,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b83d5433",
|
||||
"id": "6d09bc7d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -732,7 +734,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4f78a0fe",
|
||||
"id": "f4d1aaeb",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -744,7 +746,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a440adc9",
|
||||
"id": "47632237",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -755,7 +757,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 2,
|
||||
"id": "6e4efeb9",
|
||||
"id": "85348704",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -799,7 +801,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0006059d",
|
||||
"id": "16feb17e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -810,7 +812,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 3,
|
||||
"id": "2600e2b7",
|
||||
"id": "bf5f4030",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -845,7 +847,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "545efc0a",
|
||||
"id": "db30e9db",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -858,7 +860,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 4,
|
||||
"id": "a67593ad",
|
||||
"id": "d62f4144",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -876,7 +878,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "784a8c90",
|
||||
"id": "66ef59a0",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -890,7 +892,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 5,
|
||||
"id": "98309efc",
|
||||
"id": "eb003507",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -909,7 +911,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "800d4fd7",
|
||||
"id": "7e23af78",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -929,7 +931,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a783a947",
|
||||
"id": "d45f60f4",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -946,7 +948,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d9c975db",
|
||||
"id": "2b82a6ee",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -958,7 +960,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "56c0aa6d",
|
||||
"id": "ded4f78f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -975,7 +977,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3f47228e",
|
||||
"id": "e45062ff",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -988,7 +990,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9b713480",
|
||||
"id": "c4eb8f40",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1000,7 +1002,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9bda577d",
|
||||
"id": "d04a8b2b",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1010,7 +1012,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d2af50de",
|
||||
"id": "c2c78ab6",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1022,7 +1024,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "eff1087c",
|
||||
"id": "5330ffab",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1032,7 +1034,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6a4fcf67",
|
||||
"id": "44796ffa",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1044,7 +1046,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "0af59d3c",
|
||||
"id": "3336c40e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1057,7 +1059,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "36d5b7e1",
|
||||
"id": "ce17050d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1072,7 +1074,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "ff15cbfd",
|
||||
"id": "8f368dbe",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1098,7 +1100,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6fda730a",
|
||||
"id": "66ce0b1b",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1126,7 +1128,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "91027fc4",
|
||||
"id": "f363c6b9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1143,7 +1145,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d0e22658",
|
||||
"id": "5017e81e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1157,7 +1159,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "fbf239d1",
|
||||
"id": "23c27590",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1173,7 +1175,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "7ba39338",
|
||||
"id": "0238bc31",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1184,7 +1186,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 6,
|
||||
"id": "6c1105f2",
|
||||
"id": "6d3ad401",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1265,7 +1267,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d902592f",
|
||||
"id": "5bf4e701",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1309,7 +1311,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "63daa840",
|
||||
"id": "b161aa79",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1320,7 +1322,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 7,
|
||||
"id": "25b57fe3",
|
||||
"id": "078a139d",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1398,7 +1400,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c82a4c31",
|
||||
"id": "e47d975e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1416,7 +1418,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 8,
|
||||
"id": "66b02746",
|
||||
"id": "47e6cb0e",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1487,7 +1489,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dde9cc81",
|
||||
"id": "277cae80",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1498,7 +1500,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 9,
|
||||
"id": "3891adc6",
|
||||
"id": "34a3f693",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1573,7 +1575,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "20e12c6d",
|
||||
"id": "ad6c5f89",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1584,7 +1586,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 10,
|
||||
"id": "937ee4a0",
|
||||
"id": "89770dc2",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1615,7 +1617,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "05262e92",
|
||||
"id": "2d2ec3db",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1626,7 +1628,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 11,
|
||||
"id": "2f5aa1d2",
|
||||
"id": "72026bb5",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1644,7 +1646,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 12,
|
||||
"id": "d0431be6",
|
||||
"id": "38fbe6f2",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1659,7 +1661,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b7efc61a",
|
||||
"id": "cc4785b1",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1670,7 +1672,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 13,
|
||||
"id": "5c00cb35",
|
||||
"id": "54b15ed3",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1720,7 +1722,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 14,
|
||||
"id": "03b39894",
|
||||
"id": "92e9f134",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1759,7 +1761,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d71f0ce9",
|
||||
"id": "d6dfb6d9",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1783,7 +1785,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "4ad744d7",
|
||||
"id": "6683775c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1811,7 +1813,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "919de051",
|
||||
"id": "bf52cfd7",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1842,7 +1844,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "b2e868f1",
|
||||
"id": "2c39236d",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1858,7 +1860,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "e790cf95",
|
||||
"id": "437f82d0",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1882,7 +1884,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "9cd3580f",
|
||||
"id": "12c69836",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1913,7 +1915,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "47969bcd",
|
||||
"id": "a8614384",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1924,7 +1926,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 15,
|
||||
"id": "67de73ef",
|
||||
"id": "60dd5ef6",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -1972,7 +1974,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "606e8c8e",
|
||||
"id": "0323fdfd",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -1983,7 +1985,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 16,
|
||||
"id": "b107a1cf",
|
||||
"id": "74dfd159",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2017,7 +2019,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "6abdb36a",
|
||||
"id": "3f8db29e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2030,7 +2032,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 17,
|
||||
"id": "00bce4fc",
|
||||
"id": "1f4c6479",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2083,7 +2085,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "dbbf0823",
|
||||
"id": "7b578c34",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2094,7 +2096,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 18,
|
||||
"id": "deee652c",
|
||||
"id": "891c848b",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2124,7 +2126,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 19,
|
||||
"id": "4f831127",
|
||||
"id": "47b632ab",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2142,7 +2144,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 20,
|
||||
"id": "4f0ede67",
|
||||
"id": "e2f5031e",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2162,7 +2164,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 21,
|
||||
"id": "a6234319",
|
||||
"id": "b0719293",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2179,7 +2181,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "27964504",
|
||||
"id": "b9966fed",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2201,7 +2203,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "a014fe49",
|
||||
"id": "e8613549",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2233,7 +2235,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "44189d88",
|
||||
"id": "72be9bd5",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2247,7 +2249,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 22,
|
||||
"id": "3d81803f",
|
||||
"id": "b2f5c535",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2316,7 +2318,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "1eabd234",
|
||||
"id": "decc7681",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2339,7 +2341,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "d39aa2d2",
|
||||
"id": "b047a99c",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2351,7 +2353,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c5d99442",
|
||||
"id": "cfb22949",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2376,7 +2378,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "5e11503c",
|
||||
"id": "8bec594f",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2402,7 +2404,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "3af7a38e",
|
||||
"id": "23480abb",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2413,7 +2415,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 23,
|
||||
"id": "d8858b60",
|
||||
"id": "c7542bff",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2485,7 +2487,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "19019bbb",
|
||||
"id": "e4bead63",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2501,7 +2503,7 @@
|
||||
},
|
||||
{
|
||||
"cell_type": "markdown",
|
||||
"id": "c7f1b6d0",
|
||||
"id": "78db991e",
|
||||
"metadata": {
|
||||
"editable": true
|
||||
},
|
||||
@@ -2512,7 +2514,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 24,
|
||||
"id": "62a22d27",
|
||||
"id": "c12e0ecd",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
@@ -2527,7 +2529,7 @@
|
||||
{
|
||||
"cell_type": "code",
|
||||
"execution_count": 25,
|
||||
"id": "3943a3d6",
|
||||
"id": "9b3dadd3",
|
||||
"metadata": {
|
||||
"collapsed": false,
|
||||
"editable": true
|
||||
|
||||
@@ -2,12 +2,12 @@ digraph Tree {
|
||||
node [shape=box, style="filled, rounded", color="black", fontname="helvetica"] ;
|
||||
edge [fontname="helvetica"] ;
|
||||
0 [label="X[0] <= 0.5\ngini = 0.48\nsamples = 10\nvalue = [6, 4]", fillcolor="#f6d5bd"] ;
|
||||
1 [label="X[5] <= 0.5\ngini = 0.444\nsamples = 6\nvalue = [2, 4]", fillcolor="#9ccef2"] ;
|
||||
1 [label="gini = 0.0\nsamples = 4\nvalue = [4, 0]", fillcolor="#e58139"] ;
|
||||
0 -> 1 [labeldistance=2.5, labelangle=45, headlabel="True"] ;
|
||||
2 [label="gini = 0.0\nsamples = 2\nvalue = [2, 0]", fillcolor="#e58139"] ;
|
||||
1 -> 2 ;
|
||||
3 [label="gini = 0.0\nsamples = 4\nvalue = [0, 4]", fillcolor="#399de5"] ;
|
||||
1 -> 3 ;
|
||||
4 [label="gini = 0.0\nsamples = 4\nvalue = [4, 0]", fillcolor="#e58139"] ;
|
||||
0 -> 4 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
|
||||
2 [label="X[2] <= 0.5\ngini = 0.444\nsamples = 6\nvalue = [2, 4]", fillcolor="#9ccef2"] ;
|
||||
0 -> 2 [labeldistance=2.5, labelangle=-45, headlabel="False"] ;
|
||||
3 [label="gini = 0.0\nsamples = 2\nvalue = [2, 0]", fillcolor="#e58139"] ;
|
||||
2 -> 3 ;
|
||||
4 [label="gini = 0.0\nsamples = 4\nvalue = [0, 4]", fillcolor="#399de5"] ;
|
||||
2 -> 4 ;
|
||||
}
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 39 KiB After Width: | Height: | Size: 39 KiB |
@@ -45,12 +45,15 @@ display(grades)
|
||||
X = grades.loc[:, grades.columns != 'Grade'].values
|
||||
y = grades.loc[:, grades.columns == 'Grade'].values
|
||||
print(X)
|
||||
"""
|
||||
# Create the encoder.
|
||||
encoder = OneHotEncoder(handle_unknown="ignore")
|
||||
# Assume for simplicity all features are categorical.
|
||||
encoder.fit(X)
|
||||
# Apply the encoder.
|
||||
X = encoder.transform(X)
|
||||
print(X)
|
||||
"""
|
||||
# Then do a Classification tree
|
||||
tree_clf = DecisionTreeClassifier(max_depth=2)
|
||||
tree_clf.fit(X, y)
|
||||
|
||||
@@ -7,6 +7,7 @@ DATE: today
|
||||
===== Overview of week 44 =====
|
||||
|
||||
* Thursday: Basics of decision trees, classification and regression algorithms
|
||||
* _Note_: Thursday's lecture is digital only due to "High-school post-education day":https://www.uio.no/om/samarbeid/skole/fagped-dag/"
|
||||
* Friday: Decision trees and ensemble models (bagging and random forests)
|
||||
|
||||
!bblock Videos
|
||||
|
||||
Reference in New Issue
Block a user