Field of study that gives computers the ability to learn without being explicitly programmed.Arthur Samuel
A computer program is said to learn from experience E with respect to some class of tasks T and performance measure P if its performance at tasks in T, as measured by P, improves with experience E".Tom M. Mitchell
The science and engineering of making intelligent machines.John McCarthy about A.I.
what is smart? What is intelligent?
I'm going to start worrying [...] the day my computer becomes aware of my printer."Andrew McAfee
Features | Target | |||
Sex | Height | Weight | Age | Sport |
M | 1.67 | 60 | 20 | soccer |
F | 1.95 | 90 | 28 | basket |
M | 1.80 | 79 | 23 | soccer |
... | ... | ... | ... | ... |
F | 1.85 | 78 | 25 | ??? |
Features | ||||
Sex | Height | Weight | Age | Sport |
M | 1.67 | 60 | 20 | soccer |
F | 1.95 | 90 | 28 | basket |
M | 1.80 | 79 | 23 | soccer |
... | ... | ... | ... | ... |
??? | ??? | ??? | ??? | ??? |
Going live
function average(x) {
var n = x.length;
var sum = 0.0;
for(var i=0; i<n; i++){
sum += x[i];
}
return sum/n;
// TODO: don't divide by zero
}
EYES | HAIR |
green | red |
green | black |
black | black |
green | red |
function conditional_probability($eyes="green", $hair="red"){
$prob_H =
sql("SELECT COUNT(*) FROM table WHERE HAIR=$hair");
$prob_E_and_H =
sql("SELECT COUNT(*) FROM table WHERE EYES=$eyes AND HAIR=$hair");
return $prob_E_and_H / $prob_H;
}