Skip to content

Commit 8c300d9

Browse files
committed
updated decision tree tutorial
1 parent 700a18f commit 8c300d9

File tree

3 files changed

+36
-4
lines changed

3 files changed

+36
-4
lines changed

ML/9_decision_tree/9_decision_tree.ipynb

Lines changed: 35 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
"cell_type": "code",
2121
"execution_count": 2,
2222
"metadata": {
23-
"scrolled": true
23+
"scrolled": false
2424
},
2525
"outputs": [
2626
{
@@ -583,7 +583,9 @@
583583
{
584584
"cell_type": "code",
585585
"execution_count": 12,
586-
"metadata": {},
586+
"metadata": {
587+
"scrolled": true
588+
},
587589
"outputs": [
588590
{
589591
"data": {
@@ -636,7 +638,7 @@
636638
"cell_type": "code",
637639
"execution_count": 14,
638640
"metadata": {
639-
"scrolled": true
641+
"scrolled": false
640642
},
641643
"outputs": [
642644
{
@@ -682,6 +684,36 @@
682684
"source": [
683685
"model.predict([[2,1,1]])"
684686
]
687+
},
688+
{
689+
"cell_type": "markdown",
690+
"metadata": {},
691+
"source": [
692+
"**Exercise: Build decision tree model to predict survival based on certain parameters**"
693+
]
694+
},
695+
{
696+
"cell_type": "markdown",
697+
"metadata": {},
698+
"source": [
699+
"<img src=\"titanic.jpg\" height=200 width=400/>"
700+
]
701+
},
702+
{
703+
"cell_type": "markdown",
704+
"metadata": {},
705+
"source": [
706+
"CSV file is available to download at https://github.com/codebasics/py/blob/master/ML/9_decision_tree/Exercise/titanic.csv\n",
707+
"\n",
708+
"##### In this file using following columns build a model to predict if person would survive or not,\n",
709+
"\n",
710+
"1. Pclass\n",
711+
"1. Sex\n",
712+
"1. Age\n",
713+
"1. Fare\n",
714+
"\n",
715+
"##### Calculate score of your model"
716+
]
685717
}
686718
],
687719
"metadata": {

ML/9_decision_tree/Exercise/9_decision_tree_exercise.ipynb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -554,7 +554,7 @@
554554
"name": "python",
555555
"nbconvert_exporter": "python",
556556
"pygments_lexer": "ipython3",
557-
"version": "3.6.1"
557+
"version": "3.7.3"
558558
}
559559
},
560560
"nbformat": 4,

ML/9_decision_tree/titanic.jpg

104 KB
Loading

0 commit comments

Comments
 (0)