Standardizer
Z-score standardize a numeric CSV column (mean 0, std 1).
About this tool
Standardize a numeric feature so it has mean 0 and standard deviation 1, the preprocessing step used before many ML models. Name the column, and you get the scaled CSV plus the mean and SD to reuse on new data.
How to use
How it works
Each value is replaced by (x − mean) / sd. Distance-based and gradient-based models, such as k-NN, SVMs and logistic regression, behave better when features share a scale. This tool divides by the sample SD (n − 1), while scikit-learn's StandardScaler divides by n.
x′ = (x − μ) / s
Worked example
Standardize y
- Input
- y: 2.1, 3.9, 6.2, 7.8, 10.1, 12.2, 30
- Output
- mean 10.3286, std 9.3363 -0.8814, -0.6886, -0.4422, -0.2708, -0.0245, 0.2004, 2.1070
- Walkthrough
- With n = 7 the sample SD is 9.3363. A population SD would be 8.6439 and the z-values would be about 8% larger.
Limitations
- Fits and transforms the same data. To avoid leakage, fit on training data only and reuse the returned mean and SD for test data.
- One column per run.
- Sample SD (n − 1), not scikit-learn's population SD.
Questions
What is standardization in machine learning?
Is it the same as StandardScaler?
Should I standardize before splitting?
Is standardizing the same as normalizing?
Features
- Mean 0, SD 1
- Parameters returned
- Runs in your browser
Related resources
Guides and videos from around the web—opens on YouTube or the publisher’s site.
What Is A RESTful API?
Traversy Media
APIs are how most data tools receive payloads.
Watch on YouTubeMachine Learning for Everybody
freeCodeCamp.org
Data prep context before ML-oriented helpers.
Watch on YouTube
- RFC 4180 — CSV
IETF
Common CSV conventions for parse and convert tools.
- Fetch API
MDN
How browsers pull remote data into local tools.