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

求解释y[:, :-1], y[:, -1] = x[:, 1:], x[:, 0] #16

Open
aRooooooba opened this issue Jan 29, 2019 · 2 comments
Open

求解释y[:, :-1], y[:, -1] = x[:, 1:], x[:, 0] #16

aRooooooba opened this issue Jan 29, 2019 · 2 comments

Comments

@aRooooooba
Copy link

y[:, :-1], y[:, -1] = x[:, 1:], x[:, 0]

根据我的理解,y是标签,x是特征?那么为什么y是x里所有列循环右移的结果呢?y的最后一列为什么是同一batch里x的第一列呢?不应该是下一个batch里x的第一列吗?

@sunnima
Copy link

sunnima commented Mar 19, 2019

相当于将X往后平移了一步,刚好形成X的下一步训练集。例如,X=abc,Y就是bca,就是预测下一步嘛

@aRooooooba
Copy link
Author

那为什么不是bcd呢?为什么要回到开头呢?

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

2 participants