This code defines a Custom Score for evaluating a regression model, which is a combination of two metrics:
- ( R^2 ) (coefficient of determination)
- Indicates how much of the variance in the actual data the model explains.
- The value is between 0 and 1 (the higher, the better).
- ( MAPE ) (Mean Absolute Percentage Error)
- Indicates the relative error of the model.
- The value is between 0 and 1 (the lower, the better).
- The value ( 1 - MAPE ) is used to reverse the effect of MAPE, so that a lower value gives a better score.
- Finally, the average of the two values is taken and multiplied by 100 to give the output as a percentage.
✅ This class now calculates a metric. ✅ It can be used to analyze various regression models. ✅ The output can be easily prepared as a report.
🚀 This method is useful for creating a standard library in machine learning!

