I am currently using pyprind , a library that implements a progress bar:
#Compute training time elapsed pbar = pyprind.ProgBar(45, width=120, bar_char='█') for _ in range(45): #Fiting clf = SVC().fit(X_train, y_train) pbar.update() #End of bar
However, I do not know if it is right to use it pbar, as I assume that I install 45 times clf. So, how to use it correctly pbar?
pbar
clf
I did not use pyprind, but used progressbar. Just install it with -
pyprind
progressbar
pip install progressbar
And then -
from progressbar import ProgressBar pbar = ProgressBar() for x in pbar(range(45)): clf = SVC().fit(X_train, y_train)
and you are good to go.
, , vebose:
vebose
X = np.array([[-1, -1], [-2, -1], [1, 1], [2, 1]]) y = np.array([1, 1, 2, 2]) clf = SVC(verbose =True) clf.fit(X, y)
:
optimization finished, #iter = 12 obj = -1.253423, rho = 0.000003 nSV = 4, nBSV = 0 Total nSV = 4
Source: https://habr.com/ru/post/1648458/More articles:iOS creates “copy paste” as popover (UIMenuController) in UITableView - iosВозвращать не дублирующиеся случайные значения из очень большого диапазона - c++Generate a (very) large non-repeating integer sequence without first shuffling - cLaravel 5 simultaneous request and scheduled work - phpConfiguring R for a brilliant server on an Azure virtual machine - rWhy does this regular expression become true in ruby? - ruby | fooobar.comAnti-counterfeit cookie marker symbol and form field token do not match - asp.net-mvcJob Scheduling setRequiresDeviceIdle (true) и setPeriodic() не работает - javaHow to apply different contentInset only for content cells, but not for the title in a UICollectionView - iosCocoa singleton and shared instances - iosAll Articles