Closed amanuelanteneh closed 2 years ago
Well normally it should - could also be an issue of parameter. @giannisnik can you have a look?
Hi @amanuelanteneh ,
This is because of the value of hyperparameter lamda
. If you set its value to 0.001, no NaN values emerge and classification is performed successfully. This has to do with the convergence properties of the geometric series. See the original paper for more details.
Hi @giannisnik and @ysig, Thank you for the reply. This has fixed the issue.
Describe the bug When using the GraKel implementation of the Random walk kernel on the PTC_FM dataset I get the following error:
ValueError: Input contains NaN, infinity or a value too large for dtype('float64')
To Reproduce Steps to reproduce the behavior:
Expected behavior I expect the code to produce the classification accuracy
Stack Trace ValueError Traceback (most recent call last)
4 frames
/usr/local/lib/python3.7/dist-packages/sklearn/utils/validation.py in _assert_all_finite(X, allow_nan, msg_dtype) 114 raise ValueError( 115 msg_err.format( --> 116 type_err, msg_dtype if msg_dtype is not None else X.dtype 117 ) 118 )