A regression algorithm for the smart prognosis of a reversed polarity fault in a photovoltaic generator