ageron / ageron/handson-ml2

[QUESTION] Chapter 2 StratfiedShuffleSplit

Open
#626 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Jupyter Notebook
Stars
30k
Forks
13.1k
PR merge metrics
No merged PRs in 30d

Description

handson-ml second edition (German Version)
page 56 and 57 in the book

Hello, I am trying to understand the stratified shuffle split function. That's why I have 2 points that are confusing me.

1.
Why are my values for cat 1 and 5 different from yours in the strat_test_set? Since I receive the same values like you for the whole dataset, I doubt that the dataset has changed (Output 94).

![grafik](https://github.com/ageron/handson-ml2/assets/91069144/82de8cd9-228e-481c-aa24-6ae875bddc4b)
Image of my code

2.
Your strat_test_set values in the book on page 56 are also different from the stratified values in image 2-10 on page 57.
In the github example they are the same and thats what I have expected. I guess the github version is the correct one, but again, how can it happen that they were different in the book? something must have influenced the outcome of the stratified shuffle split right?

![grafik](https://github.com/ageron/handson-ml2/assets/91069144/4652285e-4e7d-4eab-a9ea-cac8593ecfeb)
Image of your github code

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.