A novel flexible approach for prediction and on line diagnostic of partial discharge