People who code: we want your input. Take the Survey

New answers tagged

0

Make sure you are working with Qt Console (anaconda): Install Jupiter extensions: !pip install jupyter_contrib_nbextensions !jupyter contrib nbextension install --user Enable nbextension: !jupyter nbextension enable codefolding/main Install pyppeteer: !python -m pip install -U notebook-as-pdf !pyppeteer-install MAKE SURE YOUR WORKING DIRECTORY IS WHERE ...


0

nocibambi is correct...to piggy back on his a simple implementation would look something like the following. I haven't run this as I'm at work, but hopefully it points you in the right direction. # example classifier svclassifier = SVC(kernel='linear') # fit svclassifier.fit(X_train, y_train) # predict y_pred = svclassifier.predict(X_test) # score print(...


2

I do not see your whole example but this usually happens when you have not initialized your classifier. Even more, to test, you first have to train your classifier (e.g. clf().fit(X_train, y_train)).


1

For Question 1, replace val_acc with val_accuracy since the metric is named as accuracy. This might also solve your 2nd question. ... filepath="weights-improvement-{epoch:02d}-{val_accuracy:.2f}.hdf5" checkpoint = ModelCheckpoint(filepath, monitor= "val_accuracy" , verbose=1, save_best_only=True, mode= "max" ) ...


0

For Question 1, it appears you may be using f-string but haven't specified the f before the quotation mark: filepath=f"weights-improvement-{epoch:02d}-{val_acc:.2f}.hdf5 For Question 2, based on your output, I agree with @spb below, that you need to change want you monitor to monitor='val_accuracy' if this is the metric you want to use. If you need to ...


Top 50 recent answers are included