marcotcr / lime

Lime: Explaining the predictions of any machine learning classifier
BSD 2-Clause "Simplified" License
11.65k stars 1.81k forks source link

Question about the definition of Omega (measure of complexity) from the paper #324

Closed lyl209 closed 5 years ago

lyl209 commented 5 years ago

The paper defines Ω(g) to be a measure of complexity and needs to be simple enough.

For text classification the interpretable representation is a bag of words, and by setting a limit K on the number of words, the math representation of Ω(g) contains an infinity symbol and a 1, not sure what these mean? Can someone shed some light? Thanks!

marcotcr commented 5 years ago

The 1 is an indicator function, i.e. the value will be 1 if the value inside the brackets is true, and 0 otherwise. The expression inside the bracket will be true if the L0 norm of the weight vector is greater than K. The L0 norm is just the number of nonzero values, so the expression will be 1 if the number of words in the explanation is greater than K, 0 otherwise. If it is 1, the penalty will be multiplied by infinity.

Taken all together, this means that there is infinite penalty if the explanation has more than K words, 0 penalty otherwise.

lyl209 commented 5 years ago

Thank you!