When using a scaler before inputting numbers to a neural network, should the scaler be…
- User
When using a scaler before inputting numbers to a neural network, should the scaler be fitted on the entire dataset or on the training data?
Assistant
The scaler should be fitted only on the training data, not the entire dataset.
Here's the correct workflow:
- Split your data into train/validation/test sets
- Fit the scaler on the training data only
- Use that fitted scaler to transform all sets (training, validation, and test)
python
Other models, same or similar prompt
Responses were produced in different, uncontrolled contexts (system prompts, settings, prior turns). This is not a benchmark.