ageron / ageron/handson-ml2

[QUESTION]

Abierto
#523 1 comentario 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Jupyter Notebook
Estrellas
30k
Forks
13.1k
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

In chapter 2 on page 54, you define a test_set_change using a hash. If I understand the code correctly, you include a data point depending on whether it's hash value is below or above the 20% of maximal hash value.
But that assumes that the hash function is creating an even distribution of hash values.

Consider the following example for a small set:
```
train_set, test_set = split_train_test_by_id(housing_with_id.iloc[:40], 0.2, "index")
len(test_set)
```
returns 9 - so the test set is 29% of the overall set, not 20%.
For bigger sets, the deviation will occur less often and will be smaller, but it may still be there, I guess.

Or do I miss something?

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.