Skip to content

fix: fix to save the categorical values with type casting#19

Open
koseoyoung wants to merge 1 commit intoyandex-research:mainfrom
koseoyoung:fix-cat-np-save
Open

fix: fix to save the categorical values with type casting#19
koseoyoung wants to merge 1 commit intoyandex-research:mainfrom
koseoyoung:fix-cat-np-save

Conversation

@koseoyoung
Copy link
Copy Markdown

@koseoyoung koseoyoung commented Jun 5, 2023

works on #18

Previously it has such error:

 [],
 [],
 [],
 [],
 [],
 [],
 [],
 [],
 [],
 [],
 [],
 [],
 [Unable to show a serialized python object.]]

The root cause of this issue is that np.save requires np data type, which is str when we save the generated cat file (which contains string value) into the disk. I fixed it through this PR. #19

After this fix:

[['Spain', '1', '1', '0'],
 ['Germany', '0', '1', '0'],
 ['Germany', '0', '1', '0'],
 ['Germany', '1', '1', '0'],
 ['Germany', '1', '0', '0'],
 ['Spain', '0', '1', '1'],
 ['Spain', '1', '0', '0'],
 ['Germany', '0', '1', '1'],
 ['Spain', '0', '1', '0'],
 ['Spain', '1', '1', '0'],
 ['Spain', '1', '1', '0'],
 ['France', '1', '0', '0'],
 ['Germany', '1', '1', '0'],
 ['Germany', '0', '1', '0'],
 ['Spain', '0', '0', '1'],
 ['France', '1', '0', '0'],
 ['France', '0', '1', '1'],
 ['Spain', '1', '1', '0'],
 ['Spain', '1', '1', '0'],
 ['France', '0', '0', '1'],
 ['France', '0', '1', '0'],
 ['Spain', '0', '1', '0'],
 ['Germany', '0', '1', '0'],

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant