MCPcopy Create free account
hub / github.com/tensorflow/tfjs-examples / normalizeVector

Function normalizeVector

polynomial-regression/index.js:95–97  ·  view source on GitHub ↗
(vector, vectorMean, vectorStddev)

Source from the content-addressed store, hash-verified

93
94// Normalize a vector by its mean and standard deviation.
95function normalizeVector(vector, vectorMean, vectorStddev) {
96 return vector.map(x => (x - vectorMean) / vectorStddev);
97}
98
99// Convert x-y data to normalized Tensors.
100//

Callers 1

toNormalizedTensorsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected