Optimization of SVM Classifier by k-NN for the Smart Diagnosis of the Short-Circuit and Impedance Faults in a PV Generator