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

关于2.3.1任务1中参考答案的疑惑 #20

Open
xby-233 opened this issue Aug 18, 2022 · 0 comments
Open

关于2.3.1任务1中参考答案的疑惑 #20

xby-233 opened this issue Aug 18, 2022 · 0 comments

Comments

@xby-233
Copy link

xby-233 commented Aug 18, 2022

问题:

2.3.1任务1中(4)将连续变量Age按10% 30% 50% 70% 90%五个年龄段,并用分类变量12345表示,在参考答案中若设置结尾比例为0.9,则新加入的Age_bin即分类标签列会出现空值

此处提供2种思路:

  1. [0,0.1,0.3,0.5,0.7,0.9]改为[0,0.1,0.3,0.5,0.7,0.9,1],分组改为6组,即labels = range(1,7);
  2. 改为[0,0.1,0.3,0.5,0.7,1.0],分组仍为5组
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

1 participant