#NEWLINE# def likelihood( self , data , hypothesis ) : #NEWLINE# #INDENT# '\n        Given new data and one of the guess hypotheses,\n        update the probability of that hypothesis.\n        ' #NEWLINE# ( score , learned , slip ) = ( data [ 'score' ] , data [ 'learned' ] , data [ 'slip' ] ) #NEWLINE# return ( ( score * calculate_correct ( hypothesis , slip , learned ) ) + ( ( 1 - score ) * calculate_incorrect ( hypothesis , slip , learned ) ) )