I am trying to optimize an SVR model and facing a problem because of overfitting, to overcome this I have tried to decrease the number of iterations instead of leaving it until convergence.
To compare the both models I need the number of iterations for both cases. How can I know the number of iterations needed for convergence in the case it is open (max_iter=-1)?
This is my code:
model_1=SVR(kernel='rbf', C=316, epsilon=0, gamma=0.003162,max_iter=2500)
model_1.fit(tr_sets[:,:2],tr_sets[:,2])
print(model_1.score)
model_2=SVR(kernel='rbf', C=316, epsilon=0, gamma=0.003162,max_iter=-1)
model_2.fit(tr_sets[:,:2],tr_sets[:,2])
print(model_2.score)
Edit: the problem now is solved for IPython IDE by setting verbose=2
but still need to be viewed in Jupyter notebook, spyder or to be written to an external file as the verbose option seems only to work with IPython IDE