Closed xlzhu0317 closed 6 months ago
Hi @xlzhu0317 , thanks for reporting. To fix the issue, I have to reproduce the issue first. Could you generate a minimal example (data + code) to reproduce the issue?
Thank you for your reply. I have attached my code and data as follow link: https://drive.google.com/file/d/1VM2QQ54O-jWdMd691BopnB0RXs6XoD2k/view?usp=drive_link
@xlzhu0317 I requested permission.
sorry ,it's my mistake. I have approved your request.
Hi @xlzhu0317 ,
I just checked the data and script, but the data contains nans. You can easily confirm that by printing the pandas dataframe. I suspect this has to do with the pandas-excel interface. The quick fix is
data.dropna(inplace=True)
I will close this issue as it is not a problem with gmr. Don't hesitate to report any problems with the library though!
Hi, I met an issue when i using my own data for training, the error message as follows, I also checked my data and confirmed that there was no NaN in the data: Traceback (most recent call last): File "C:/Users/FJL/Downloads/gmr-master/gmr-master/examples/Test2.py", line 43, in
initial_means = kmeansplusplus_initialization(X_train, n_components, random_state)
File "C:\Users\FJL\Downloads\gmr-master\gmr-master\gmr\gmm.py", line 46, in kmeansplusplus_initialization
i = _select_next_center(X, centers, random_state, selected_centers, all_indices)
File "C:\Users\FJL\Downloads\gmr-master\gmr-master\gmr\gmm.py", line 58, in _select_next_center
return random_state.choice(all_indices, size=1, p=selection_probability)[0]
File "mtrand.pyx", line 935, in numpy.random.mtrand.RandomState.choice
ValueError: probabilities contain NaN