class AsymmetricLoss extends ARegressionMeasure {

	@Override
	public double loss(final List<? extends Double> expected, final List<? extends IRegressionPrediction> predicted) {
		this.checkConsistency(expected, predicted);
		List<Double> accuracyList = new ArrayList<>();
		for (int i = 0; i < expected.size(); i++) {
			Double percentageError = 100 * ((expected.get(i) - predicted.get(i).getPrediction()) / expected.get(i));
			Double accuracy;
			if (percentageError <= 0) {
				accuracy = Math.exp(-Math.log(0.5) * (percentageError / this.dividerOverestimation));
			} else {
				accuracy = Math.exp(Math.log(0.5) * (percentageError / this.dividerUnderestimation));
			}
			accuracyList.add(accuracy);
		}
		return 1 - StatisticsUtil.mean(accuracyList);

	}

	public  AsymmetricLoss();
	public  AsymmetricLoss(final double dividerUnderestimation, final double dividerOverestimation);

}