def estimate_yield(ndvi,evi,savi,ndre,c_type,area): import math est_yield = -1 if str(c_type) == '1k' or str(c_type) == '1r': est_yield = round(0.3419*math.exp(4.1587)*((ndvi+evi+savi+ndre)/400)*(area/10000),2) elif str(c_type) == '14': yield_per_ha = round((-0.2088+1.5212*(((ndvi+evi+savi+ndre)/400)^2))*(10000/1000),2) est_yield = yield_per_ha*(area/10000) return est_yield