def mean_squared_log_error(y_true, y_pred, sample_weight=None, multioutput='uniform_average'):
 (y_type, y_true, y_pred, multioutput) = _check_reg_targets(y_true, y_pred, multioutput)
 if ((not (y_true >= 0).all()) and (not (y_pred >= 0).all())):
  raise ValueError('Mean Squared Logarithmic Error cannot be used when targets contain negative values.')
 return mean_squared_error(np.log((y_true + 1)), np.log((y_pred + 1)), sample_weight, multioutput)

def mean_squared_log_error ( y_true , y_pred , sample_weight = None , multioutput = 'uniform_average' ) : ( y_type , y_true , y_pred , multioutput ) = _check_reg_targets ( y_true , y_pred , multioutput ) if ( ( not ( y_true >= 0 ) . all ( ) ) and ( not ( y_pred >= 0 ) . all ( ) ) ) : raise ValueError ( 'Mean Squared Logarithmic Error cannot be used when targets contain negative values.' ) return mean_squared_error ( np . log ( ( y_true + 1 ) ) , np . log ( ( y_pred + 1 ) ) , sample_weight , multioutput )
mean squared logarithmic error regression loss read more in the :ref:user guide <mean_squared_log_error> .