How rules-based systems can be used for binary classification
How do humans make decisions?
(c) One Fourth Labs
Dengue
headache
cold cough
vomiting
fever
skin rash
How do humans make decisions from past experiences?
(c) One Fourth Labs
fever
headache
cold cough
vomiting
Rash
Inputs
Output
How do humans make decisions from past experiences?
(c) One Fourth Labs
fever
headache
cold cough
vomiting
Rash
inputs
output
1 | 0 | 0 | 0 | 0 |
---|---|---|---|---|
1 | 0 | 0 | 1 | 0 |
1 | 1 | 1 | 0 | 1 |
1 | 0 | 1 | 1 | 0 |
0 |
---|
0 |
1 |
0 |
0
1
Is this applicable in multiple domains ?
(c) One Fourth Labs
LBW out
Impact
Height
no ball
shot attempted
Pitching in line
Inputs
Output
Is this applicable in multiple domains ?
(c) One Fourth Labs
LBW out
Impact
Height
no ball
shot attempted
Pitching in line
Inputs
Output
1 | 1 | 0 | 1 | 0 |
---|---|---|---|---|
1 | 1 | 1 | 0 | 0 |
1 | 1 | 1 | 0 | 1 |
1 | 0 | 1 | 1 | 0 |
0 |
---|
1 |
1 |
0 |
0
1
What is the semantics of decision making?
(c) One Fourth Labs
Output
Inputs
headache
cold cough
vomiting
fever
skin rash
Fever
Rash
Cold
(c) One Fourth Labs
if HIGH_FEVER and COLD:
return no_dengue
elif HIGH_FEVER and VOMITING and not RASH:
return no_dengue
elif HIGH_FEVER and VOMITING and RASH:
return dengue
Output
Inputs
Fever
Rash
Cold
How do we outsource this to a machine?
headache
cold cough
vomiting
fever
skin rash
Where have expert systems been used - past and recent applications
(c) One Fourth Labs
(1990)
(1990)
(1965)
(1995)
(2018)
Hanane et. al., Expert Systems, May 2018.
Do we need to look beyond expert systems?
(c) One Fourth Labs
Task of hiring someone for a job
10th marks
12th marks
graduate
CGPA
projects
if 10th>90 and 12>90 and GRADUATE:
return hired
elif 10th>80 and 12th>80 and CGPA>7:
return hired
elif 10th<70 and 12th<70:
return not_hired
10th
12th
graduate
Output
YES / NO
Inputs
Do we need to look beyond expert systems?
(c) One Fourth Labs
Task of hiring someone for a job - involving many factors
10th marks
if 10th>90 and 12>90 and GRADUATE:
return hired
elif 10th>80 and 12th>80 and CGPA>7:
return hired
elif 10th<70 and 12th<70:
return not_hired
10th
12th
graduate
12th marks
graduate
CGPA
projects
awards
.....
10th marks | 12th marks | graduate | CGPA | projects | ........... | awards |
---|---|---|---|---|---|---|
92 | 82 | yes | 9.2 | 3 | ........... | 2 |
83 | 75.2 | yes | 7.2 | 1 | ........... | 0 |
75 | 70 | no | 6.4 | 0 | ........... | 1 |
96 | 95 | yes | 9.5 | 5 | ........... | 4 |
90 | 89 | yes | 8.8 | 2 | ........... | 1 |
78 | 82 | yes | 7.6 | 0 | ........... | 0 |
86 | 88 | yes | 8.4 | 1 | ........... | 1 |
Lots of data to make sense from
Output
YES / NO
publications
Do we need to look beyond expert systems?
The rules can be very complex
(c) One Fourth Labs
10th marks | 12th marks | graduate | CGPA | projects | ........... | awards |
---|---|---|---|---|---|---|
92 | 82 | yes | 9.2 | 3 | ........... | 2 |
83 | 75.2 | yes | 7.2 | 1 | ........... | 0 |
75 | 70 | no | 6.4 | 0 | ........... | 1 |
96 | 95 | yes | 9.5 | 5 | ........... | 4 |
90 | 89 | yes | 8.8 | 2 | ........... | 1 |
78 | 82 | yes | 7.6 | 0 | ........... | 0 |
86 | 88 | yes | 8.4 | 1 | ........... | 1 |
if 10th>90 and 12>90 and GRADUATE:
return hired
elif 10th>80 and 12th>80 and POST_GRADUATE:
return hired
elif 10th<70 and 12th<70:
return not_hired
elif awards>2 and GRADUATE:
return hired
elif not POST_GRADUATE and publications>1:
return hired
elif projects>10 and publications>2:
return hired
elif competitions>3 and publications>3:
return hired
elif awards>5:
return hired
elif GRADUATE and not POST_GRADUATE and awards>5:
return hired
Do we need to look beyond expert systems?
(c) One Fourth Labs
The rules can be sometimes inexpressible
10th marks
12th marks
graduate
post graduate
projects
Output
YES / NO
Inputs
?
I saw honesty in his eyes
Do we need to look beyond expert systems?
The rules can sometimes be unknown:
- task of predicting Ebola
Output
high fever
headache
sore throat
weakness
nausea
?
?
YES / NO
Inputs
(c) One Fourth Labs
(c) One Fourth Labs
How to move from writing rules to learning rules?
def f(x):
if 10th>90 and 12>90 and GRADUATE:
return hired
elif 10th>80 and 12th>80 and POST_GRADUATE:
return hired
elif 10th<70 and 12th<70:
return not_hired
10th
12th
graduate
Output
YES / NO
def f(x):
i=0
max_epochs=100
w = rand()
while(i<max_epochs):
dw = grad(w,w*x)
w = w - lr*dx
i += 1
return w*x
10th marks | 12th marks | graduate | CGPA | projects | ........... | awards |
---|---|---|---|---|---|---|
92 | 82 | yes | 9.2 | 3 | ........... | 2 |
83 | 75.2 | yes | 7.2 | 1 | ........... | 0 |
75 | 70 | no | 6.4 | 0 | ........... | 1 |
96 | 95 | yes | 9.5 | 5 | ........... | 4 |
90 | 89 | yes | 8.8 | 2 | ........... | 1 |
78 | 82 | yes | 7.6 | 0 | ........... | 0 |
86 | 88 | yes | 8.4 | 1 | ........... | 1 |
hire | |
don't hire |
\( \hat{y} = f(x_1,x_2)\)
Why has Machine Learning been so successful ?
(c) One Fourth Labs
Democratized model and Learning Algorithms
Abundant data
Fast and cheap cloud/computing
How this relates to you ?
(c) One Fourth Labs
Collect, curate data
ML Engineering
ML Research
https://auphonic.com/blog/2018/06/01/codec2-podcast-on-floppy-disk/
How do we contrast expert systems from machine learning?
(c) One Fourth Labs
if 10th>90 and 12>90 and GRADUATE:
return hired
elif 10th>80 and 12th>80 and POST_GRADUATE:
return hired
elif 10th<70 and 12th<70:
return not_hired
elif awards>2 and GRADUATE:
return hired
elif not POST_GRADUATE and publications>1:
return hired
elif projects>10 and publications>2:
return hired
elif competitions>3 and publications>3:
return hired
elif awards>5:
return hired
elif GRADUATE and not POST_GRADUATE and awards>5:
return hired