Call to plsa_refit fails due to missing sample_weight
See original GitHub issueWhen using model.transform()
on new unseen data, the following error occurs:
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-42-30746b9aeea8> in <module>
1 test_corpus = df1['cleaned_text'].tolist()
2 test_dtm = vectorizer.transform(test_corpus)
----> 3 test_doc_vecs = model.transform(test_dtm)
4 labels = np.argmax(test_doc_vecs, axis=1)
5
/opt/conda/lib/python3.7/site-packages/enstop/enstop_.py in transform(self, X, y)
836 n_iter_per_test=5,
837 tolerance=0.001,
--> 838 random_state=random_state,
839 )
840
TypeError: plsa_refit() missing 1 required positional argument: 'sample_weight'
There seems to be a missing arg here.
Seems a simple fix - I would be happy to make a PR, but I am not sure how to derive the needed arg:
sample_weight: array of shape (n_docs,)
Input document weights.
If @lmcinnes you can shed some light here - could be a quick fix!
Issue Analytics
- State:
- Created 3 years ago
- Comments:13 (6 by maintainers)
Top Results From Across the Web
Sample Weight Error · Issue #7120 · keras-team/keras - GitHub
ValueError: Found a sample_weight array with shape (100, 262144) for an input with shape (100, 512, 512, 1). sample_weight cannot be broadcast.
Read more >Tools of the trade: when to use those sample weights
As is true for much in life and in research, there is no simple prescriptive rule for the use of sample weights. The...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
I would be happy to do this part - the issue with the kernel dying I am not really sure how to fix.
I will play around and report - if I find anything.
It is in a bit of limbo right now as I have had to step away from this library to work on other topics.