GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Testing data and train data are repeated in Shakespeare · Issue #19 · TalwalkarLab/leaf

Testing data and train data are repeated in Shakespeare #19

New issue
Copy link
New issue
Copy link
Closed
Closed
Testing data and train data are repeated in Shakespeare#19
Copy link

Description

@zliangak
zliangak
opened on Nov 30, 2019
Issue body actions

Using the splitting method provided in the paper_experiment, I found that the testing data appeals exactly in the training data, resulting in a 100% testing accuracy if you use SGD+2 layers LSTM to train it.

For example, in the training set, 'THE_FIRST_PART_OF_HENRY_THE_SIXTH_MORTIMER''s words are:
[..., g age, Let dying Mortimer here rest himself. Even like a man new haled from the ',
' age, Let dying Mortimer here rest himself. Even like a man new haled from the r',
'age, Let dying Mortimer here rest himself. Even like a man new haled from the ra',
'ge, Let dying Mortimer here rest himself. Even like a man new haled from the rac',
'e, Let dying Mortimer here rest himself. Even like a man new haled from the rack',
', Let dying Mortimer here rest himself. Even like a man new haled from the rack,',
'Let dying Mortimer here rest himself. Even like a man new haled from the rack, S',
'et dying Mortimer here rest himself. Even like a man new haled from the rack, So',
't dying Mortimer here rest himself. Even like a man new haled from the rack, So ',
' dying Mortimer here rest himself. Even like a man new haled from the rack, So f',
'dying Mortimer here rest himself. Even like a man new haled from the rack, So fa',
'ying Mortimer here rest himself. Even like a man new haled from the rack, So far',
'ing Mortimer here rest himself. Even like a man new haled from the rack, So fare',
'ng Mortimer here rest himself. Even like a man new haled from the rack, So fare ',
'g Mortimer here rest himself. Even like a man new haled from the rack, So fare m',...]

and in the testing set, you can find the exact santence:

[' Let dying Mortimer here rest himself. Even like a man new haled from the rack, ']

My model will get a testing accuracy about 1 in about 35 epochs.

Activity

  1. scaldas commented on Dec 2, 2019

    @scaldas
    scaldas
    on Dec 2, 2019
    Collaborator
    More actions

    You are right. The split shouldn't be at random but temporal, and we should be careful to avoid this. We will work on fixing this.

    Can you provide us with the parameters that you used to obtain the testing accuracy (learning rate, size of the layers, etc.)?

    Thank you.

  2. zliangak commented on Dec 2, 2019

    @zliangak
    zliangak
    on Dec 2, 2019
    Author
    More actions

    I am using pytorch. All info is shown in the file below. One different of my model is that I feed all the hidden unit (instead of the last one) in to the linear layer. When I use your implementation of LSTM, i.e. only feeding the last hidden unit, I can still get a pretty high accuracy given enough training epochs.

    Hope this can be fixed soon. It is a very helpful dataset. Thanks.

    test.pdf

  3. zliangak commented on Dec 4, 2019

    @zliangak
    zliangak
    on Dec 4, 2019
    Author
    More actions

    Sorry, there is a mistake of my implementation in the cell-6 of "test.pdf". When I define test_loader, I should use dataset=test_set instead of dataset=train_set.

    And this would not affect the existence of the problem regarding this issue.

    Regards,

  4. scaldas commented on Dec 5, 2019

    @scaldas
    scaldas
    on Dec 5, 2019
    Collaborator
    More actions

    Sorry, I'm confused by your update. Does this mean the issue remains?

  5. zliangak commented on Dec 6, 2019

    @zliangak
    zliangak
    on Dec 6, 2019
    Author
    More actions

    Yes, the issue remains.

  6. scaldas
    closed this as completedin 94ff90con Mar 11, 2020
  7. scaldas commented on Mar 11, 2020

    @scaldas
    scaldas
    on Mar 11, 2020
    Collaborator
    More actions

    I have modified the train/test splits for Shakespeare. They are now temporally split, and samples that would leak any test information into the training set are ignored. This means that, if the last training sample happens at index i, the first test sample happens at index i + seq_len. We use seq_len as 80.

    A side effect of this change is that some users now don't have any test samples, and have to be dropped from training.

  8. zliangak commented on Mar 12, 2020

    @zliangak
    zliangak
    on Mar 12, 2020
    Author
    More actions

    Cool! Thanks a lot!

    Reacted by bcxiong
  9. mehreentahir16
    added a commit that references this issue on Mar 8, 2024

    fixes TalwalkarLab#19

    This issue will close once commit ac83332 is merged into the 'master' branch.
    ac83332
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions

      You are visitor 01402775 — GeezerVison does not store the pages you look up.
      Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.