You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copied and pasted the example code to and got an Assertion Error as per the end of this post,
I'm running this code on Windows 10 and Python 3.6 with Anaconda.
I printed out the scored_matrix and found that some of the values are of inf and therefore caused the assertion error seeing that the assertion error checks the value for integer of float.
But I don't know why it will generates infinity values...
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 276, in convert_score_matrix2score_record
frequency_matrix=self.frequency_matrix
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 367, in get_feature_dictionary
weight_value_index_items = self.make_non_zero_information(weighted_matrix)
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 317, in make_non_zero_information
self.__get_value_index(row_indexes[i], column_indexes[i], weight_csr_matrix))
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 292, in __get_value_index
assert isinstance(row_index, (int, int32, int64))
AssertionError
The text was updated successfully, but these errors were encountered:
@ryanjshih Thanks for making the issue. Yeah, infinite values here are strange. Considering that no problems on Linux or MacOS, Windows calls different core module of Python.
Luckily, I recently changed my laptop from Mac into Windows+Ubuntu, so I could run debug on my laptop ;)
Copied and pasted the example code to and got an Assertion Error as per the end of this post,
I'm running this code on Windows 10 and Python 3.6 with Anaconda.
I printed out the scored_matrix and found that some of the values are of inf and therefore caused the assertion error seeing that the assertion error checks the value for integer of float.
But I don't know why it will generates infinity values...
Thank you for making this package!
(0, 0) inf
(0, 1) inf
(0, 2) 1.309320092201233
(0, 3) inf
(0, 4) 0.7615997791290283
(0, 5) 0.27188003063201904
(0, 6) inf
(1, 0) inf
(1, 1) inf
(1, 2) 1.309320092201233
(1, 3) inf
(1, 4) 0.7615997791290283
(1, 5) 0.27188003063201904
(1, 6) inf
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 276, in convert_score_matrix2score_record
frequency_matrix=self.frequency_matrix
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 367, in get_feature_dictionary
weight_value_index_items = self.make_non_zero_information(weighted_matrix)
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 317, in make_non_zero_information
self.__get_value_index(row_indexes[i], column_indexes[i], weight_csr_matrix))
File "C:\Users\Ryan\Anaconda3\lib\site-packages\DocumentFeatureSelection\models.py", line 292, in __get_value_index
assert isinstance(row_index, (int, int32, int64))
AssertionError
The text was updated successfully, but these errors were encountered: