Personl age 1 2 3 4 5 sex 19 female 18 male 28 male 33 male 32 male bmi 27.9 33.77 33 22.705 28.88 childrer smoker O yes 1 no 3 no 0 no O no region charges southwest 16884.9 southeast 1725.55 southeast 4449.46 northwest 21984.4 northwest 3866.85

icon
Related questions
Question

Use decision tree to further explore the dataset, where the dependent variable is ‘smoker’. Please explain the approach taken. [No more than 300 words]

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
A
Personl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
B
age
с
sex
19 female
18 male
28 male
33 male
32 male
31 F
46 F
37 F
37 M
60 F
25 M
62 female
23 male
56 female
27 male
19 male
52 female
23 male
56 male
30 male
bmi
D
27.9
33.77
33
22.705
28.88
25.74
33.44
27.74
29.83
25.84
26.22
26.29
34.4
39.82
42.13
24.6
30.78
23.845
40.3
35.3
E
F
childrer smoker
0 yes
1 no
3 no
0 no
0 no
O no
1 no
3 no
2 no
0 no
0 no
0 yes
O no
O no
O yes
1 no
1 no
O no
O no
O yes
G
H
charges
southwest 16884.92
southeast 1725.552
southeast 4449.462
northwest 21984.47
northwest 3866.855
southeast
3756.622
southeast
8240.59
northwest 7281.506
northeast 6406.411
northwest
28923.14
northeast 2721.321
southeast 27808.73
southwest
1826.843
southeast 11090.72
southeast 39611.76
southwest
1837.237
northeast
10797.34
northeast
2395.172
southwest
10602.39
southwest 36837.47
▾ region
Transcribed Image Text:1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 A Personl 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 B age с sex 19 female 18 male 28 male 33 male 32 male 31 F 46 F 37 F 37 M 60 F 25 M 62 female 23 male 56 female 27 male 19 male 52 female 23 male 56 male 30 male bmi D 27.9 33.77 33 22.705 28.88 25.74 33.44 27.74 29.83 25.84 26.22 26.29 34.4 39.82 42.13 24.6 30.78 23.845 40.3 35.3 E F childrer smoker 0 yes 1 no 3 no 0 no 0 no O no 1 no 3 no 2 no 0 no 0 no 0 yes O no O no O yes 1 no 1 no O no O no O yes G H charges southwest 16884.92 southeast 1725.552 southeast 4449.462 northwest 21984.47 northwest 3866.855 southeast 3756.622 southeast 8240.59 northwest 7281.506 northeast 6406.411 northwest 28923.14 northeast 2721.321 southeast 27808.73 southwest 1826.843 southeast 11090.72 southeast 39611.76 southwest 1837.237 northeast 10797.34 northeast 2395.172 southwest 10602.39 southwest 36837.47 ▾ region
Expert Solution
steps

Step by step

Solved in 3 steps

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

Can u generate the python code for me as that i can generate the decision tree in Jupyter notebook? An example of a decision tree has been attached as image. Explain using the variables inside the decision tree.

-
ples
vidas1003.
class No Smo
-
harges-133 454)
-0.003
ampl 205
waha1705, 11
un-D
T
Was-10:41
Une Sich
- Smoker
on
-
samples 1
11
US
EDE
g-U.S
sampla-2
value=11.11
en Smer
Charges <14453 74
-0.014
sam-717
age - 210
0:00
sample-21
[22.11
class Nat-In
-1712,51
DING
-0.0
CHYTILA
vula 1L
Nandit
DO
UN
172, 1
Lina
in Ren-Bre
LODE
LLED FO
The
UN
181
at Sinir
εκτείνει τη
13
P
rive Seeker
50
Sen
aplica - 11
17,4]
clat Non Smer
ra
420.
thurg4L (2)
0211
campi 15
14.11
2002->
- 463
sples
AN 15511
-18
ST
2521,
6161
JAS
Uut
2
a 12.07
02-1
S
Senk
4
4374
M
ார்.
. 2.11
ri
L
chagua
3--23.10
1671-30
Seker
charg
singles
9-1322
-993
sak-(777 296
das-master
-
sala
LADa-Sing
SO WEAST
-3057
-
---
MIM
18-202
cines-Tera
NETRES
HOLL
Ident
PAVE. DE
wa Serek
PETREDEN
2.61 PR
aplicad
e effi
15,11
SUTADES -2
Sales-Pil
in 11-
REDAT
---23.2
Svar
ges
30-8339
-250
165 TE
-Ste
wght 2132015
Band
HEND
Tym
213.79
S
-1291
choa-Nasan
BELL->
32329 531
-PATER ENG
SEDA
STUNGE
cstar 15,11
-Ma
CHECER
ww
- N
2.
52=TAB
coca-fr
31
1111
Sab
berk
-20
cupuces
coating
SIN
cal 11.4
T-sanus
-12.01
21
L. J
ST
368 SMF, ->346.mp
tal-ar
gm-0.250
WI-12.3
and
nate: -11.61
HALS-D
245
340
aus -15
14,91
gin
BEST-SE
gm-d
- 30
11.91
gn-D2
Samples 2
12,01
[-secues
www.de.mens
0055
sample-111
ala-2.10
clas
salar-11,01
-Sko
11.01
Namun
MIONS L
CASIE
ge-001
DE
10, ST
WELK
SAD
latt al
44-205
Smoker
Come
106
13,105
119
-0.0
aca-1
WELL
To 11-1
411100
N 6334
applica - 13
11,141
ran fris
Smi
V
age 43.0
sample-2
ON
vermit
-0.0
saka-121
ca-Man-Gim
STARLIG - Spgs
-0.5
14
Tot nl-mon
ampus
ww
ON-DO
De
comple
UN [1.01
la Not-beseur
Transcribed Image Text:- ples vidas1003. class No Smo - harges-133 454) -0.003 ampl 205 waha1705, 11 un-D T Was-10:41 Une Sich - Smoker on - samples 1 11 US EDE g-U.S sampla-2 value=11.11 en Smer Charges <14453 74 -0.014 sam-717 age - 210 0:00 sample-21 [22.11 class Nat-In -1712,51 DING -0.0 CHYTILA vula 1L Nandit DO UN 172, 1 Lina in Ren-Bre LODE LLED FO The UN 181 at Sinir εκτείνει τη 13 P rive Seeker 50 Sen aplica - 11 17,4] clat Non Smer ra 420. thurg4L (2) 0211 campi 15 14.11 2002-> - 463 sples AN 15511 -18 ST 2521, 6161 JAS Uut 2 a 12.07 02-1 S Senk 4 4374 M ார். . 2.11 ri L chagua 3--23.10 1671-30 Seker charg singles 9-1322 -993 sak-(777 296 das-master - sala LADa-Sing SO WEAST -3057 - --- MIM 18-202 cines-Tera NETRES HOLL Ident PAVE. DE wa Serek PETREDEN 2.61 PR aplicad e effi 15,11 SUTADES -2 Sales-Pil in 11- REDAT ---23.2 Svar ges 30-8339 -250 165 TE -Ste wght 2132015 Band HEND Tym 213.79 S -1291 choa-Nasan BELL-> 32329 531 -PATER ENG SEDA STUNGE cstar 15,11 -Ma CHECER ww - N 2. 52=TAB coca-fr 31 1111 Sab berk -20 cupuces coating SIN cal 11.4 T-sanus -12.01 21 L. J ST 368 SMF, ->346.mp tal-ar gm-0.250 WI-12.3 and nate: -11.61 HALS-D 245 340 aus -15 14,91 gin BEST-SE gm-d - 30 11.91 gn-D2 Samples 2 12,01 [-secues www.de.mens 0055 sample-111 ala-2.10 clas salar-11,01 -Sko 11.01 Namun MIONS L CASIE ge-001 DE 10, ST WELK SAD latt al 44-205 Smoker Come 106 13,105 119 -0.0 aca-1 WELL To 11-1 411100 N 6334 applica - 13 11,141 ran fris Smi V age 43.0 sample-2 ON vermit -0.0 saka-121 ca-Man-Gim STARLIG - Spgs -0.5 14 Tot nl-mon ampus ww ON-DO De comple UN [1.01 la Not-beseur
Solution
Bartleby Expert
SEE SOLUTION