Cost function

From Machinelearning
Revision as of 23:33, 18 June 2014 by Vipul (talk | contribs) (Created page with "==Definition== ===For a single piece of data=== The '''cost function''' associated with a given machine learning problem is a function that takes as input a guess for the fu...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

Definition

For a single piece of data

The cost function associated with a given machine learning problem is a function that takes as input a guess for the function and the observed output and the predicted function value and then associates to that a number measuring how far the observed output is from the predicted function value.

  • For prediction problems associated with continuous variables, both the predicted value and the actual value are continuous variables. The cost function is a function C(u,v) of two variables u,v (the predicted value and actual value) satisfying the following conditions:
    • C(u,u)=0 for all uR
    • For uvw, C(u,v)C(u,w) and C(v,w)C(u,w)

The cost function need not satisfy the triangle inequality; in fact, typical cost functions penalize bigger errors superlinearly.

  • For prediction problems associated with discrete variables, the predicted value is a probability and the actual value is simply a discrete value (0 or 1). The cost function is a function C(p,v) of two variables (the predicted probability and actual value) satisfying the following conditions:
    • C(1,1)=0
    • C(0,0)=0
    • For pq, C(q,1)C(p,1)
    • For pq, C(p,0)C(q,0)