Chapter-2 code
- Lenguaje dominante
- Jupyter Notebook
- Estrellas
- 25.6k
- Forks
- 12.7k
- Métricas de merge de PR
- Sin PR fusionados en 30 d
Descripción
Hi Ageron,
I'm new to ML and recently started reading your book. I have below question from Chapter 2.
```python
def split_train_test_by_id(data, test_ratio, id_column, hash=hashlib.md5):
ids = data[id_column]
in_test_set = ids.apply(lambda id_: test_set_check(id_, test_ratio, hash))
return data.loc[~in_test_set], data.loc[in_test_set]
```
1- In the above code, why we use same variable "id_" twice once with lambda and second with test_set_check function?
2- Exactly what value of "id_" is passing to "test_set_check" function? We didn't initialize any value to it anywhere.
Please respond in detail.
Thanks
Shweta
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.