Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Value error when fitting protein dataset #7

Open
datashinobi opened this issue Aug 31, 2020 · 5 comments
Open

Value error when fitting protein dataset #7

datashinobi opened this issue Aug 31, 2020 · 5 comments

Comments

@datashinobi
Copy link

datashinobi commented Aug 31, 2020

Using the protein dataset sample with flattenning deactivated fail

SGT version 2.0.3
pandas version 1.0.3

sgt_ = SGT(kappa=1, 
           lengthsensitive=False,
           flatten=False,
           mode='default')

sgtembedding_df = sgt_.fit_transform(corpus)```

`---------------------------------------------------------------------------
ValueError                                Traceback (most recent call last)
<timed exec> in <module>

~/anaconda3/envs/amlmodules_env/lib/python3.7/site-packages/sgt/sgt.py in fit_transform(self, corpus)
    204                                axis=1,
    205                                result_type='expand')
--> 206             sgt.columns = ['id'] + self.feature_names
    207             return sgt
    208         elif self.mode=='multiprocessing':

~/anaconda3/envs/amlmodules_env/lib/python3.7/site-packages/pandas/core/generic.py in __setattr__(self, name, value)
   5190         try:
   5191             object.__getattribute__(self, name)
-> 5192             return object.__setattr__(self, name, value)
   5193         except AttributeError:
   5194             pass

pandas/_libs/properties.pyx in pandas._libs.properties.AxisProperty.__set__()

~/anaconda3/envs/amlmodules_env/lib/python3.7/site-packages/pandas/core/generic.py in _set_axis(self, axis, labels)
    688 
    689     def _set_axis(self, axis, labels):
--> 690         self._data.set_axis(axis, labels)
    691         self._clear_item_cache()
    692 

~/anaconda3/envs/amlmodules_env/lib/python3.7/site-packages/pandas/core/internals/managers.py in set_axis(self, axis, new_labels)
    181             raise ValueError(
    182                 "Length mismatch: Expected axis has {old} elements, new "
--> 183                 "values have {new} elements".format(old=old_len, new=new_len)
    184             )
    185 

ValueError: Length mismatch: Expected axis has 21 elements, new values have 401 elements`
@cran2367
Copy link
Owner

cran2367 commented Sep 1, 2020

@datashinobi thank you for catching the error. I'll look into it in next few days. In the meantime, if you could find the bug please comment.

@busraoguzoglu
Copy link

Hello! Is there any update regarding this issue? Having the same error right now, while fitting protein dataset.

@cran2367
Copy link
Owner

cran2367 commented Mar 1, 2021

@busraoguzoglu the issue is still open and in-progress. I will have this fixed soon. If you are on a deadline please let me know.

@busraoguzoglu
Copy link

Thanks a lot for your fast reply! I am not on a strict deadline for now. If I can find anything about the source of this issue I will comment here.

@busraoguzoglu
Copy link

Hello! Is this issue still open?

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

No branches or pull requests

3 participants