A group of 20 students studied 0 to 6 hours for the exam. Some passed and others failed. Results are given below (Data is taken from Wikipedia).
Student | Hours Studied - x | Result (0 โ fail, 1 โ pass) - y |
---|---|---|
1 | 0.5 | 0 |
2 | 0.75 | 0 |
3 | 1.00 | 0 |
4 | 1.25 | 0 |
5 | 1.50 | 0 |
6 | 1.75 | 0 |
7 | 1.75 | 1 |
8 | 2.00 | 0 |
9 | 2.25 | 1 |
10 | 2.50 | 0 |
11 | 2.75 | 1 |
12 | 3.00 | 0 |
13 | 3.25 | 1 |
14 | 3.50 | 0 |
15 | 4.00 | 1 |
16 | 4.25 | 1 |
17 | 4.50 | 1 |
18 | 4.75 | 1 |
19 | 5.00 | 1 |
20 | 5.50 | 1 |
- Determine the optimal linear hypothesis using linear regression to predict if a student passes or not based on the number hours studied.
- Determine the optimal logistic hypothesis using logistic regression to predict if a student passes or not based on the number hours studied.
- Plot both hypothesis function 0 < x < 6. Compare and explain the two results obtained.
- Develop a logistic regression-like algorithm for the following cost function.
Y = 1 - Cost function goes from 100 to 0 linearly as hypothesis function goes from 0 to 1
Y = 0 - Cost function goes from 0 to 100 linearly as hypothesis function goes from 0 to 1
Compare results with those of the standard logistic algorithm.