Intel® DevCloud
Help for those needing help starting or connecting to the Intel® DevCloud
1626 Discussions

Decision trees notebook line 10 has assignment issue for splitting the dataset

ashna_upadhyay
Employee
699 Views

Hi,

I was going through the Decision trees notebook exercise 2 under AL_Kit_XGBoost and it looks like there is some assignment issue. Please refer to the screenshot attached.

I believe there should be 2 modifications

1. Current code: strat_shuff_split = xxx(n_splits=1, test_size=1000, random_state=42)
    Should be modified to: xxx = StratifiedShuffleSplit(n_splits=1, test_size=1000, random_state=42)

2. Current code: train_idx, test_idx = next(strat_shuff_split.split(data[feature_cols], data['color']))
     Should be modified to: train_idx, test_idx = next(xxx.split(data[feature_cols], data['color']))

Issue4.png

Please let me know if you need any further information.

Thanks,

Ashna

0 Kudos
1 Solution
AthiraM_Intel
Moderator
634 Views

Hi,

 

The notebook that you are referring to is an exercise notebook. You are expected to understand the concepts and fill out the xxx with the required module, function, or variable names.

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues.

 

Thanks

 

 

View solution in original post

0 Kudos
4 Replies
AthiraM_Intel
Moderator
670 Views

Hi,


Thank you for posting in Intel Communities.


Could you please let us know which sample you are trying?

From where you are getting the samples? Are these samples a part of any Intel workshop?



Thanks.



0 Kudos
ashna_upadhyay
Employee
643 Views

Hi,

 

I am trying the samples under Intel's training modules, please refer to the screenshot below.

The notebook is under AL_Kit_XGBoost_Predictive_Modeling > Decision Trees.

 

Reply4_1.PNG

 

Thanks!

0 Kudos
AthiraM_Intel
Moderator
635 Views

Hi,

 

The notebook that you are referring to is an exercise notebook. You are expected to understand the concepts and fill out the xxx with the required module, function, or variable names.

 

If this resolves your issue, make sure to accept this as a solution. This would help others with similar issues.

 

Thanks

 

 

0 Kudos
AthiraM_Intel
Moderator
610 Views

Hi,


Thanks for accepting our solution. If you need any additional information, please post a new question as this thread will no longer be monitored by Intel.



Thanks


0 Kudos
Reply