MCPcopy Create free account
hub / github.com/EdwardRaff/JSAT / normalize

Method normalize

JSAT/src/jsat/linear/Vec.java:688–691  ·  view source on GitHub ↗

Mutates this vector to be normalized by the L 2 norm

()

Source from the content-addressed store, hash-verified

686 * Mutates this vector to be normalized by the L<sub>2</sub> norm
687 */
688 public void normalize()
689 {
690 mutableDivide(Math.max(pNorm(2.0), 1e-10));
691 }
692
693 /**
694 * Applies the given function to each and every value in the vector.

Callers 12

testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
testUpdate_5argsMethod · 0.95
normalizedMethod · 0.95
fitMethod · 0.95
testNormalizeMethod · 0.45
setUpMethod · 0.45

Calls 3

mutableDivideMethod · 0.95
pNormMethod · 0.95
maxMethod · 0.45

Tested by 10

testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testUpdate_5argsMethod · 0.76
testNormalizeMethod · 0.36
setUpMethod · 0.36