<s> from pycast . errors . baseerrormeasure import BaseErrorMeasure <EOL> class MeanSquaredError ( BaseErrorMeasure ) : <EOL> """<STR_LIT>""" <EOL> def _calculate ( self , startingPercentage , endPercentage , startDate , endDate ) : <EOL> """<STR_LIT>""" <EOL> errorValues = self . _get_error_values ( startingPercentage , endPercentage , startDate , endDate ) <EOL> return float ( sum ( errorValues ) ) / float ( len ( errorValues ) ) <EOL> def local_error ( self , originalValue , calculatedValue ) : <EOL> """<STR_LIT>""" <EOL> originalValue = originalValue [ <NUM_LIT:0> ] <EOL> calculatedValue = calculatedValue [ <NUM_LIT:0> ] <EOL> return ( calculatedValue - originalValue ) ** <NUM_LIT> <EOL> MSE = MeanSquaredError </s>
