Skip to content

valueError: perplexity must be less than n_samples  #9

Closed

Description

@Yif18

My corpus has 49 records, which is not a short text.
No error is reported when T>=6, but an error is reported when T<=5

model = btm.BTM(X, vocab, T=5, M=50, alpha=1, beta=0.01)
model.fit(biterms, iterations=100)

tmp.report(model=model, docs=content_flat)
valueError: perplexity must be less than n_samples

I found that this error is not directly related to the level of perplexity
T=5 perplexity:263.31198210806156
T=6 perplexity:251.15355539215517
the number of records is 49

Name: tmplot
Version: 0.1.0
Name: bitermplus
Version: 0.7.0

This error has caused me a lot of trouble. I look forward to your reply. Thank you.

Activity

  1. maximtrp commented on Oct 23, 2023

    @maximtrp
    Owner

    Hello! Thank you for reporting this. Will check it as soon as I can.

  2. self-assigned this
    on Oct 27, 2023
  3. added a commit that references this issue on Oct 27, 2023
  4. maximtrp commented on Oct 27, 2023

    @maximtrp
    Owner

    New version is out! Please check it

  5. Yif18 commented on Nov 2, 2023

    @Yif18
    Author

    I have tried version 0.1.1 and the problem has been solved. Thank you very much.

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

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions