From 5186381aaccbc07d860ae8ea98d7806e26fea152 Mon Sep 17 00:00:00 2001 From: AbdulMalik1287 Date: Wed, 6 Aug 2025 15:30:23 +0530 Subject: [PATCH] Added a func --- custom_definitions.py | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/custom_definitions.py b/custom_definitions.py index b331731..a8249a1 100644 --- a/custom_definitions.py +++ b/custom_definitions.py @@ -15,7 +15,15 @@ import re -#==============Your Name====================== -# Your code -#==============Your Name===================== +#==============Abdul Malik====================== +def add_product_feature(X): + df = X.copy() + df['feature_main'] = df['carat_weight'] * df['price_per_carat'] + return df + +def rmsle(y_true, y_pred): + y_pred = np.maximum(y_pred, 0) + return np.sqrt(mean_squared_log_error(y_true, y_pred)) +#==============Abdul Malik===================== #Dont remove the following snippet and follow the same +