Skip to content

using Custom Dataset #1143

Answered by MaxHalford
Divya216 asked this question in Q&A
Jan 7, 2023 · 1 comments · 1 reply
Discussion options

You must be logged in to vote

Hey hey 👋

So the datasets in the datasets module are Dataset instances. Meaning they have a .take(k) method. But your dataset is a list, so you don't have a .take(k) method. What you can do is simply slice your list:

for x, y in dataset[:2500]:
    ...

You could also create a River dataset by inheriting from the Dataset base class, but that's not as straightforward.

Replies: 1 comment 1 reply

Comment options

You must be logged in to vote
1 reply
@Divya216
Comment options

Answer selected by Divya216
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants