Skip to content

Commit 6c119fa

Browse files
committed
minor edits
1 parent 8f62996 commit 6c119fa

File tree

1 file changed

+45
-9
lines changed

1 file changed

+45
-9
lines changed

notebooks/17_machine_learning_algorithms_2.ipynb

Lines changed: 45 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,13 @@
33
{
44
"cell_type": "markdown",
55
"id": "1e8f20b9-a562-4dac-9a57-e887e9372651",
6-
"metadata": {},
6+
"metadata": {
7+
"editable": true,
8+
"slideshow": {
9+
"slide_type": ""
10+
},
11+
"tags": []
12+
},
713
"source": [
814
"(ch_linear_models)=\n",
915
"# Common Algorithms II - Linear Models\n",
@@ -521,7 +527,13 @@
521527
{
522528
"cell_type": "markdown",
523529
"id": "7449485c-b8a1-4b0b-8147-e910cedd2dd2",
524-
"metadata": {},
530+
"metadata": {
531+
"editable": true,
532+
"slideshow": {
533+
"slide_type": ""
534+
},
535+
"tags": []
536+
},
525537
"source": [
526538
"## Logistic Regression\n",
527539
"Logistic regression, despite its name, is not used for regression tasks. Instead, it is a classification algorithm, primarily used when the dependent variable is binary or categorical. It is a powerful statistical method used to model the probability of a certain class or event existing. Like linear regression, logistic regression models the relationship between a set of independent variables and a dependent variable. However, instead of fitting a line to the data, it uses a logistic function to output a probability value that is used for classification.\n",
@@ -545,13 +557,19 @@
545557
"\n",
546558
"$$\n",
547559
"P(y=1 ∣ x) = \\sigma(z) = \\frac{1}{1+e^{−(\\beta_0 + \\beta_1 x_1 + \\beta_2 x_2 + ... + \\beta_n x_n)}}\n",
548-
"$$​"
560+
"$$​\n"
549561
]
550562
},
551563
{
552564
"cell_type": "markdown",
553565
"id": "ca77c983-394d-45cf-8d75-cdc5983ab2ef",
554-
"metadata": {},
566+
"metadata": {
567+
"editable": true,
568+
"slideshow": {
569+
"slide_type": ""
570+
},
571+
"tags": []
572+
},
555573
"source": [
556574
"### Decision Boundary\n",
557575
"\n",
@@ -573,7 +591,13 @@
573591
{
574592
"cell_type": "markdown",
575593
"id": "1111984d-e34a-4d53-8eda-d0e29fa32f01",
576-
"metadata": {},
594+
"metadata": {
595+
"editable": true,
596+
"slideshow": {
597+
"slide_type": ""
598+
},
599+
"tags": []
600+
},
577601
"source": [
578602
"### Simple Example: Student Exam Results\n",
579603
"\n",
@@ -792,17 +816,23 @@
792816
{
793817
"cell_type": "markdown",
794818
"id": "c0030f29-00a3-4253-8e59-39018398b838",
795-
"metadata": {},
819+
"metadata": {
820+
"editable": true,
821+
"slideshow": {
822+
"slide_type": ""
823+
},
824+
"tags": []
825+
},
796826
"source": [
797827
"### Pros, Cons, Caveats\n",
798828
"\n",
799-
"#### Pros:\n",
829+
"**Pros:**\n",
800830
"\n",
801831
"- **Interpretability:** Logistic regression provides clear and interpretable coefficients that indicate the strength and direction of the relationship between independent variables and the dependent variable.\n",
802832
"- **Efficiency:** It is computationally efficient and scales well with large datasets.\n",
803833
"- **Probabilistic Outputs:** Provides probabilistic predictions, which can be useful for decision-making processes that incorporate uncertainty.\n",
804834
"\n",
805-
"#### Cons:\n",
835+
"**Cons:**\n",
806836
"\n",
807837
"- **Linearity Assumption:** Assumes a linear relationship between the independent variables and the log-odds of the dependent variable, which may not hold in all cases.\n",
808838
"- **Not Suitable for Complex Relationships:** Logistic regression may not perform well when the relationship between the independent and dependent variables is highly complex and non-linear.\n",
@@ -812,7 +842,13 @@
812842
{
813843
"cell_type": "markdown",
814844
"id": "c0c11fb1-e115-4f74-ae33-b1dae5a54d73",
815-
"metadata": {},
845+
"metadata": {
846+
"editable": true,
847+
"slideshow": {
848+
"slide_type": ""
849+
},
850+
"tags": []
851+
},
816852
"source": [
817853
"## Hands-on Example: Logistic Regression\n",
818854
"\n",

0 commit comments

Comments
 (0)