exercise:82810150be: Difference between revisions
From Stochiki
(Created page with "<div class="d-none"> <math> \( \newcommand\feature{x} </math> </div> Consider the source codes below for five different Python functions that read in the numeric feature <ma...") |
mNo edit summary |
||
Line 3: | Line 3: | ||
\( | \( | ||
\newcommand\feature{x} | \newcommand\feature{x} | ||
\newcommand\truelabel{y} | |||
</math> | </math> | ||
</div> | </div> |
Latest revision as of 19:22, 11 June 2023
[math] \( \newcommand\feature{x} \newcommand\truelabel{y} [/math]
Consider the source codes below for five different Python functions that read in the numeric feature [math]\feature[/math], perform some computations that result in a prediction [math]\hat{\truelabel}[/math].
How large is the hypothesis space that is constituted by all maps that can be represented by one of those Python functions.
def func1(x): hat_y = 5*x+3 return hat_y
def func2(x): tmp = 3*x+3 hat_y = tmp+2*x return hat_y
def func3(x): tmp = 3*x+3 hat_y = tmp-2*x return hat_y
def func4(x): tmp = 3*x+3 hat_y = tmp-2*x+4 return hat_y
def func5(x): tmp = 3*x+3 hat_y = 4*tmp-2*x return hat_y