Untitled Notebook
Untitled Notebook
(x y , ,
z)
26(10/2024 find tintrong thong gran 64 Po &P (x+ )
(xy, (ey
Translation dichuyer
s
+ sy = z+
= + = + = +
: ,
R= b
+ Sp
; = P+ &Pi---iPn Pn
=
+ AP
Mesh Transformation
0 -8
- Rotation
:
You
⑦ Rigid Transform :
i -] point
O
O
do,
yedy
Meshe Mesha
Mech1, 2
Transform Method
=>
(0 ,
0 2 .
, %)
⑰
hep thuger Inhas Al
in harm thana
-
Ldi lien)
maria
May maphing
vithient
-
= li har
Health
I
care
label
- -phan
i
east
thats
I where b) y)
- saran tran
1-
uni
s dung
-
b. Thu data . ⑭t
( output)
↑hlik-beatspin
bed
for - bui
is
·
Classification
I
-
-
-
supervised learning -
>
-
Davao 1
tap dilieu
,
I
b
at
·
(
y xy +
am + + c.
=
kn + -
x ....
-
Find tran
distance -
tholm
distance = Square
-y
100
sample
distance
· i
Learning
supervised
O
el
In- ① -
10-d-de-In
Il
A Z = t
C 1 z2-111 + Ide-deal +·
Ina-mod
=
S la + dy +
us /
· = + doo + 1000
= oo
.
he
↓ nearest neighbor
⑭
⑭
↑ noo-healin
⑭2
k = 3
-
J
-5a
I * (3,4)
·
is 28.D
↑
(3-5) YB + -
2)
↓, L I
loss function Cost function
,
-
=
Vi- z
·
I
-
141
:
-12 + (4-5) 13-1 H-1 + +
zas
k ze1
ass
= A
.
2 - 2 I
3
2 -> T
7 - 4 =
t-
> 5 =
image (pixel
• Write the answers CLEAN and TIDY directly in the exam paper.
• Show all of your works, the grades will be based on your progress.
• This exam has 3 pages of questions.
a. What is artificial intelligence (AI)? Please give an example of how an AI works to solve a problem.
b. Assume that you utilize an AI model to predict whether using heavy social media linked to poor sleep
pattern and mental health issues. Identify in details what is the information needed to address this
problem (What are the input variables and output(s) that you identify to address this problem?). In order
to collect those information, how can you do it? Please describe the scenario(s) that you can think of.
⑭
-
Explain how do you apply the algorithm to predict the medical insurance cost in details (why do you
apply this algorithm, what is the principle of the algorithm, how do you apply the algorithm to predict
the cost, how do you optimize the algorithm, which loss function do you use to optimize the algorithm,
etc.).
c. Assume that you use linear regression to predict the medical insurance cost, write the loss function (you
define the variables, for examples, define age as ) and the solution of the weights of the linear
regression.
ach Train
Test >
-
- day
Kara
medical I cast
predicted :
y
kNN ,
Classification
,
Linear
20 .
000
Computethe dance
100 ra
i
-
-
Sort distance base on compute distance
- Select K : h = 3
-
predict the a medical insurance cost
print (predict)
I
Train
number
Define of training sample
-
: : 100
-
1fidecvesm) :
arrays
define of training sample
the
array
-
Test
-
output :
Y 101
I Emmadea-de
1
2 chon-2 + doon-dz
compute distance : i + (1 +
000) 3/120-chy g
for On
-
from 1 to 100 :
100 /
!
non-soo
:
-
distance =
(x101-Xi) +
1de01-dil + 1001- Oil /monil +
: distance = 1
Ieop-di) Caron-ri Creon-ni)
+ + +
i = 1 >
-
i = 2
⑰ 1 >
-
min-distance
distance
=
5
=
5
i 3
⑫ Ye
= >
-
Ye
⑰- >
distance =
4
227 13
min
mir .
distance = 3 . 5
>
-
Select R = 1
> Yeo YEmin distance)
=
-
print (ymindistance
I
k= 1 >
-
y
=
ymindistance >
-
R122
I &
>
-
H Y =
mindistance -
1 2
D >
Yhmin distan A -
3
Y
= -
= -
i aI I I
.
to
5 25 4906 350
8649
No 1761 93
74 5476 222
7744704
s 4762345
6241632
80 6400 400
⑰
I
1 55 3025 55
36 68 4624 408
8 IXy =
4391
Step 1 : Ex =
56* = 5 .
= y= 745) = = 14 5 . = y2 =
56581(77722555025
Steps
:
SS u
555025
Ssyy 56581- 55 502 5
- =
>
- >
.
,
10
I
1078, 5
SSXX = 374 -
316 = 313 , 6
- 60 ,
4
Tonig Tick ches
SSxy = IXY
- 4391-55
= 1391 -
7172 = 219
how hiing than so'
g
*
# doe how be (a)
guy
S-1936
a =
!
b =
y
-
by =
y
-
ai = 74 . 5 -
3, 636 56
.
= 54, 14
Y = 3 , 626c + 54 , 14
Finh Oh :
>
- Aim ?
y =
3
, 626x8 + 54 , 14 = 83 ,
148(d)
1
.
Lj thuyes,
eai
tap
3 .. Code - Spendocode
T)
Sum
?
-maj
1 AL lagi
\mophong
.
connquai
-
Choc ,
whin
,
translate
-
Learning
Machine : ↑Phar
Mash <
E
, 4)
i
classification
-
Test
Test
T
=
&
f
>
#
= &
&Absolute
:
tance
Square Roots
B
Im
=
+( -o + (4 3)
-
+ 13 1)
-
+. -
.
+
(1 1) =
-
zu2
+
-
(4-5 - ( -
4 =
W
Linear
Regression
yd X
ax +
Y
- Tian X2 Dien
8 4908
i wi s ton
-
e
5 25
I
·
-
8bya
,
106
54
⑬3
47
S
5 25
8 64
5 6400
55
68
(x) 3136
⑧ O
=
[x =
56 - = 5 . 6 Ex 374 =
Ey = 745 +
* = 74 .
5242 = 56581
# IXy =
4391
Step 1 : Ex =
5* = 5 .
6 zx" = 374EX)" -
3136
= y= 745) y = 14 5. = y2 =
56581(777225552
&
EXy_
i) >b = y a
&
=
-
at 11
6
b = 74 . 5 -
3 32 .
- 56 .
=
54 228 .
hi
-2302 = 3 62x
. + 5423 = 3 32 8 + 51
, .
.
LY-Ypredict
disc
↓
function : di livese
ah
In this problem, you need to predict the severity of Alzheimer’s
& A -
⑭The, ⑭ not
#Define
d : variables
100 samples
!
training set
t odnos ---
not
: Predict
#code
Li
.
distance B
Compute :
=
-
-
distanci
min-distance Dindistance) distance [i]
Select K = 1
-
class[toD) =
class [i)
>
-
print
-