Commit ae8b113c authored by Carsten Eie Frigaard's avatar Carsten Eie Frigaard
Browse files

update

parent 57e43ab2
......@@ -907,7 +907,7 @@ ser vi derfor til sidst på Scikit-learns Pipelines.}
\item{Almindelig forelæsning}
\subitem*{ekstra materiale: \link**{[HOME]/L03/Extra/k-fold_demo.ipynb}}
\item{\b{Opgave} (pipelines): \link**{[HOME]/L03/pipelines.ipynb}}
\subitem*{Data til pipelines opgaven (bør lige i L03/Data/): \link**{[HOME]/L03/itmal_l01_data.pkl}}
\subitem*{Data til pipelines opgaven (bør lige i L03/Data/):\link**{[HOME]/L03/Data/itmal_l01_data.pkl}}
\subitem*{(Du har allerede denne data-fil, hvis du pull'er fra [GITMAL])}
}
......
......@@ -9,7 +9,7 @@ COURSEFILES = ITMAL_E21
MKDIFF=printf "DIFF Ref/%-10s Test/ .. " $1 && colordiff -dw Refs/$1 Test/ && echo "DIFF OK" && rm Test/$1
build:
@ $(PYCOURSE) -c $(COURSEFILES)/course.tex -v -o ../../Html/
@ $(PYCOURSE) -c $(COURSEFILES)/course.tex -v -o ../../Html/ -t
@ $(PYPLAN) -p $(COURSEFILES)/plan.txt -v -o ../../Html/plan.html
@ cd ../.. && $(PWD)/$(PYFILETREE) -v -o Html/filetree.html
......@@ -23,8 +23,8 @@ sync: build
TESTARGS=-v
test: clean
@ cd Test && $(PWD)/$(PYCOURSE) -c course.tex $(TESTARGS)
@ cd Test && $(PWD)/$(PYPLAN) -p plan.txt $(TESTARGS)
@ cd Test && $(PWD)/$(PYCOURSE) $(TESTARGS)
@ cd Test && $(PWD)/$(PYPLAN) $(TESTARGS)
@ cd Test && $(PWD)/$(PYFILETREE) $(TESTARGS)
@ $(call MKDIFF,L00.html)
@ $(call MKDIFF,L01.html)
......
#!/usr/bin/env python3
from Utils.dbg import ERR, DiagStdErr, PrettyPrintTracebackDiagnostics
from Utils.dbg import ERR, WARN, DiagStdErr, PrettyPrintTracebackDiagnostics
from sys import stdout, stderr
from html import escape, unescape
......@@ -56,6 +56,9 @@ def Dbg(verbose, msg, level=1):
if Int(level) <= Int(verbose):
print(msg, file=stderr)
def Warn(msg):
WARN(msg)
def Outputfile(outputfile):
assert outputfile is not None
outputfile = Str(outputfile).replace(" ", "_")
......@@ -76,27 +79,29 @@ def LoadText(filename, timeout=4000, split=True):
def HtmlEncode(s):
# for text in html page
return escape(Str(s, False))
t=escape(Str(s, False))
#assert t==escape(t)
return t
def HtmlDecode(s):
return unescape(Str(s, False))
t=unescape(Str(s, False))
assert t==unescape(t)
return t
def UrlQuote(s):
# for file names in urls
s = quote(Str(s, False), safe='')
assert s.find("'") < 0
assert s.find('"') < 0
assert s.find(" ") < 0
return s
t = quote(Str(s, False), safe='')
assert t==quote(t, safe='')
assert t.find("'") < 0
assert t.find('"') < 0
assert t.find(" ") < 0
return t
def MkHtmlPage(htmlcontent):
assert Str(htmlcontent).find("DOCTYPE")<0 and htmlcontent.find("<html>")<=0 and htmlcontent.find("<body>")<=0
meta = "<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>"
comment = "<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->"
bodystyle = "style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'" # org BS "style='font-family: Verdana;font-size: 12pt;color: #494c4e;'"
return f"<!DOCTYPE html>\n<html>\n{comment}\n{meta}\n<body {bodystyle}>\n" + htmlcontent + "\n</body>\n</html>"
def HandleException(ex):
......
#!/usr/bin/env python3
from Utils.dbg import ERR, WARN
from Utils.colors import Col, ColEnd
from Utils.mkutils import *
from sys import argv
from argparse import ArgumentParser
from urllib.request import urlopen
if __name__ == '__main__':
......@@ -15,6 +15,15 @@ if __name__ == '__main__':
LEFT = '<'
RIGHT= '>'
def TestLink(url):
try:
contents = urlopen(url).read()
Dbg(verbose, f" {Col('green')}URL OK:{ColEnd()} '{url}'", 1)
return True
except Exception as ex:
Warn(f"exception in TestLink(url={url})..")
return False
def _mkHtml(tag, style=""):
if len(Str(style, False)) > 0:
if style[0]!=" ":
......@@ -44,8 +53,7 @@ if __name__ == '__main__':
def isCmd(obj):
s = str(type(obj))
e = "<class '__main__.Cmd'>"
if s != e:
WARN(f"not correct class of object, got type '{s}', expected '{e}'")
Check(s==e, f"object not correct class of object, got type '{s}', expected '{e}'")
return True
def Ok(self):
......@@ -130,6 +138,8 @@ if __name__ == '__main__':
extra = " rel='noopener' target='_blank'" if Bool(exlink) else ""
style = " style='font-family: courier new, courier;'" if not Bool(isstar) else ""
if testlinks:
TestLink(arg1)
return f"{Str(left)}span{style}{Str(right)}{left}a href='{arg1}'{extra}{right}{arg0}{left}/a{right}{left}/span{right}"
@staticmethod
......@@ -280,7 +290,7 @@ if __name__ == '__main__':
self.__st = ""
else:
if c=='(' or c=='[':
WARN("found left parathesis '{c}' while in command parsing mode, did you mean '{'?")
Warn("found left parathesis '{c}' while in command parsing mode, did you mean '{'?")
self.__st += c
else:
assert self.__args==""
......@@ -330,24 +340,24 @@ if __name__ == '__main__':
return txt
def ParseDefs(refs):
r = {}
for i in refs.split("\n"):
if len(Trim(i, False))>0:
n = Str(i).find(']')
Check(not(n<=0 or i[0]!='['), f"refs need to be of the form '[key] value', got='{i}'")
key = i[0:n+1].strip()
val = i[n+1:].strip()
Check(len(key) > 0, f"empty key in ref element='{i}'")
Check(len(val) > 0, f"empty value in ref element='{i}'")
Dbg(verbose, f" ParseRef(): found '{key}' => '{val}'", 2)
assert not r.get(key)
r[key]=val
return r
#def ParseDefs(refs):
# r = {}
# for i in refs.split("\n"):
# if len(Trim(i, False))>0:
# n = Str(i).find(']')
#
# Check(not(n<=0 or i[0]!='['), f"refs need to be of the form '[key] value', got='{i}'")
#
# key = i[0:n+1].strip()
# val = i[n+1:].strip()
#
# Check(len(key) > 0, f"empty key in ref element='{i}'")
# Check(len(val) > 0, f"empty value in ref element='{i}'")
#
# Dbg(verbose, f" ParseRef(): found '{key}' => '{val}'", 2)
# assert not r.get(key)
# r[key]=val
# return r
def ParseDefs2(defs):
r = {}
......@@ -356,16 +366,13 @@ if __name__ == '__main__':
if len(d) > 0:
n = Str(d).find(']')
if n<=0 or d[0]!='[':
ERR(f"refs need to be of the form '[key] value', got='{i}'")
Check(not(n<=0 or d[0]!='['), f"refs need to be of the form '[key] value', got='{i}'")
key = d[0:n+1].strip()
val = d[n+1:].strip()
if len(key)==0:
ERR(f"empty key in ref element='{i}'")
if len(val)==0:
ERR(f"empty value in ref element='{i}'")
Check(len(key) > 0, f"empty key in ref element='{i}'")
Check(len(val) > 0, f"empty value in ref element='{i}'")
Dbg(verbose, f" ParseRef(): found '{key}' => '{val}'", 2)
assert not r.get(key)
......@@ -375,10 +382,8 @@ if __name__ == '__main__':
def ParseBasetructure(courselist):
N = len(List(courselist))
if N<=0:
ERR("file seems to be empty")
if courselist[0]!="COURSE":
ERR("missing tag 'COURSE' in course file")
Check(N > 0,"file seems to be empty")
Check(courselist[0]=="COURSE","missing tag 'COURSE' in course file")
s = {}
curr = None
......@@ -415,9 +420,7 @@ if __name__ == '__main__':
for i in s:
n = Str(i).find("CONTENT")
if n>0:
ERR("CONTENT tag not in column 1, but in column {n} for entry '{i}'")
elif n==0:
Check( n==0, f"CONTENT tag not in column 1, but in column {n} for entry '{i}'")
l = []
for line in List(s[i]):
for key in defs:
......@@ -458,14 +461,13 @@ if __name__ == '__main__':
assert Str(i).find("CONTENT")==0
sublesson = i[7:].strip()
if len(sublesson)<=0:
ERR("sublesson name empty (or just whitespace)")
Check(len(sublesson)>0, "sublesson name empty (or just whitespace)")
outputfilename = Str(filenamebase) + sublesson + ".html"
htmlcontent = Str(htmlstructure[i])
Dbg(verbose, f" {Col('YELLOW')}WRITING '{i}' => '{outputfilename}'{ColEnd()}", 1)
html = MkHtmlPage(htmlcontent) if Bool(addhtmlheaders) else htmlcontentl
html = MkHtmlPage(htmlcontent) if Bool(addhtmlheaders) else htmlcontent
with Outputfile(outputfilename) as f:
f.write(html)
......@@ -490,6 +492,7 @@ if __name__ == '__main__':
parser = ArgumentParser(prog=argv[0], epilog="version 0.2")
parser.add_argument("-v", default=verbose, action="count", help=f"increase output verbosity, default={verbose}\n")
parser.add_argument("-t", default=False, action="store_true", help=f"generate simple html (witouth <html> <body> etc tags), default=False\n")
parser.add_argument("-l", default=False, action="store_true", help=f"test links, default=False\n")
parser.add_argument("-o", default=outputfiledir, type=str, help=f"output file dir base, default='{outputfiledir}'\n")
parser.add_argument("-c", default=coursefile, type=str, help=f"cause file to be parsed, default='{coursefile}'\n")
......@@ -497,9 +500,10 @@ if __name__ == '__main__':
verbose = Int(args.v)
coursefile = Str(args.c)
ouptputfiledir = Str(args.o)
outputfiledir = Str(args.o)
testlinks = Bool(args.t)
Dbg(verbose, f"{Col('PURPLE')}GENERATING html course from file '{coursefile}'..{ColEnd()}")
Dbg(verbose, f"{Col('PURPLE')}GENERATING html course from file '{coursefile}', outputfiledir={outputfiledir}..{ColEnd()}")
htmlencoded = [HtmlEncode(i) for i in LoadCourseFile(coursefile)]
htmlstructure = ParseStructure(htmlencoded)
......
<!DOCTYPE html>
<html>
<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<body style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'>
<h3>Web sites</h3>
......@@ -58,6 +53,3 @@ Guides etc.
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<body style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'>
Der er adgang til en GPU baseret server ifbm kurset. Serveren består af en
&#x27;master&#x27; som kan tilgås via
......@@ -135,6 +130,3 @@ frigiver!</p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<body style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'>
<dl>
<dt>[<b>AI</b>]:
......@@ -82,6 +77,3 @@
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<body style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'>
<h3>Formål</h3>
......@@ -86,6 +81,3 @@ at undersøg/bruge det).</p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<body style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'>
<h3>Formål</h3>
......@@ -118,6 +113,3 @@ brug for en python og lineær algebra kick-start.</p>
</body>
</html>
\ No newline at end of file
<!DOCTYPE html>
<html>
<!-- AUTOGENERATED HTML from CourseBuilder, CEF -->
<meta http-equiv='Content-Type' content='text/html; charset=utf-8'/>
<body style='font-family: times new roman, times, serif;font-size: 12pt;color: #000000;'>
<h3>Hands-on Machine Learning <span style='font-family: courier new, courier;'>[HOML]</span></h3>
......@@ -53,6 +48,3 @@ og meget brugt i ML sammenhænge.)
</body>
</html>
\ No newline at end of file
......@@ -58,25 +58,12 @@
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dir2<br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Dir3<br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Test/Dir2/Dir3/dummy.txt'>dummy.txt</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Test/L00.html'>L00.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Test/L01.html'>L01.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Test/course.tex'>course.tex</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Test/plan.txt'>plan.txt</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Utils<br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Utils/colors.py'>colors.py</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Utils/dbg.py'>dbg.py</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Utils/mkutils.py'>mkutils.py</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Dokumentation_og_links.html'>Dokumentation_og_links.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/GPU_Cluster.html'>GPU_Cluster.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Journal_afleveringsformat.html'>Journal_afleveringsformat.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Kriterier_for_O4.html'>Kriterier_for_O4.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Kursusforkortelser.html'>Kursusforkortelser.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/L00.html'>L00.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/L01.html'>L01.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/L02.html'>L02.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/L03.html'>L03.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/L04.html'>L04.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Litteratur.html'>Litteratur.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/Makefile'>Makefile</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/course.tex'>course.tex</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/Etc/CourseBuilder/mk_course.py'>mk_course.py</a><br></span>
......@@ -143,7 +130,6 @@
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;Figs<br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/L03/Figs/ml_supervised_map.pdf'>ml_supervised_map.pdf</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/L03/Figs/ml_supervised_map.png'>ml_supervised_map.png</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/L03/l03.html'>l03.html</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/L03/lesson03.pdf'>lesson03.pdf</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/L03/pipeline.ipynb'>pipeline.ipynb</a><br></span>
<span style="font-family: 'courier new', courier, sans-serif">&nbsp;&nbsp;&nbsp;&nbsp;<a href='https://itundervisning.ase.au.dk/ITMAL_E21/L03/train_test_split.ipynb'>train_test_split.ipynb</a><br></span>
......
<!DOCTYPE html>
<html>
<head>
</head>
<body style="font-family: Lato;font-size: 12pt;color: #494c4e;">
<h5>Form&aring;l</h5>
<p>Opsamlingslektion: vi tager et genblik p&aring; <em>&sect; 2 <em>"End-to-End Machine Learning Project",</em></em> og samler op p&aring; dette brede kapitel.</p>
<p>Vi g&aring;r f&oslash;rst igang med at gennemg&aring; <em><strong>K-fold Cross-validation</strong></em> (eller K-fold CV), for derefter at bruge "The Map" til at komme igennem alle grundliggende koncepter i <em>&sect; 2. </em><em><br /></em></p>
<p>Da alle kerne-koncepter i supervised ML nu kendes, kan det hele konkret sammens&aelig;ttes i en samlet processerings-<em><strong>pipeline</strong>.</em> Programmerings-teknisk ser vi derfor til sidst p&aring; Scikit-learns Pipelines.</p>
<ul>
<li><a rel="noopener" href="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10655397_1/xid-10655397_1" target="_blank" title="ml_supervised_map.pdf">Oversigtskortet for Supervised learning</a>:</li>
</ul>
<p style="margin-left: 60px;"><a rel="noopener" href="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10655397_1/xid-10655397_1" target="_blank" title="ml_supervised_map.pdf"><img src="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10655394_1/xid-10655394_1" alt="ml_supervised_map.pdf" title="ml_supervised_map.pdf" width="512" height="499" /></a></p>
<h5>Indhold</h5>
<ul>
<li>Generel genl&aelig;sning og repetition af <em>&sect; 2</em></li>
<li>K-fold Cross-validation</li>
<li>Pipelines<em></em></li>
</ul>
<h5>Litteratur</h5>
<p style="margin-left: 30px;"><em>Genl&aelig;s: &sect; 2 <em>"End-to-End Machine Learning Project" </em></em>[HOML]</p>
<p style="margin-left: 60px;">(eksklusiv <em>"Create the Workspace" </em>og <em>"Download the Data")</em></p>
<p style="margin-left: 30px;"><span style="color: #800000;"><span style="font-family: courier new, courier; color: #000000;"><a rel="noopener" href="https://scikit-learn.org/stable/modules/generated/sklearn.model_selection.KFold.html?highlight=k%20fold#sklearn.model_selection.KFold" target="_blank"><span style="color: #000000;">Scikit's dokumentations-side vdr. k-fold CV</span></a></span><em> </em></span></p>
<h6>Forberedelse inden lektionen</h6>
<ul>
<li>L&aelig;s litteraturen.<em><br /></em></li>
</ul>
<h6>P&aring; klassen</h6>
<ol>
<li><span style="text-decoration: line-through;">'</span>Sp&oslash;rge-minutter'</li>
<li>Almindelig forel&aelig;sning
<ul>
<li>ekstra materiale: <span style="font-family: courier new, courier;"><a rel="noopener" href="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10655399_1/xid-10655399_1" target="_blank">k-fold_demo.ipynb</a></span></li>
</ul>
</li>
<li>Exercise: <span style="font-family: courier new, courier;"><a rel="noopener" href="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10655389_1/xid-10655389_1" target="_blank">pipelines.ipynb</a> <br /></span>
<ul>
<li><span style="color: #800000;"><span style="color: #000000;">Data til pipelines opgaven (b&oslash;r lige i L07/Data/</span>)</span>: <span style="font-family: courier new, courier;"><a rel="noopener" href="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10656401_1/xid-10656401_1" class="event_clickFileName" target="_blank">itmal_l01_data.pkl</a> </span></li>
<li>(Du har allerede denne data-fil, hvis du pull'er fra GITMAL)</li>
</ul>
</li>
</ol>
<h5>Slides</h5>
<p style="margin-left: 30px;"><span style="font-family: courier new, courier;"><a rel="noopener" href="https://blackboard.au.dk/bbcswebdav/pid-2931054-dt-content-rid-10655390_1/xid-10655390_1" target="_blank">lesson03.pdf</a></span></p>
</body>
</html>
\ No newline at end of file
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment