MCPcopy Create free account
hub / github.com/davisking/dlib / train

Method train

dlib/statistics/statistics.h:1476–1491  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1474
1475 template <typename vector_type>
1476 void train (
1477 const vector_type& samples
1478 )
1479 {
1480 // make sure requires clause is not broken
1481 DLIB_ASSERT(samples.size() > 0,
1482 "\tvoid vector_normalizer::train()"
1483 << "\n\tyou have to give a nonempty set of samples to this function"
1484 << "\n\tthis: " << this
1485 );
1486
1487 m = mean(mat(samples));
1488 sd = reciprocal(sqrt(variance(mat(samples))));
1489
1490 DLIB_ASSERT(is_finite(m), "Some of the input vectors to vector_normalizer::train() have infinite or NaN values");
1491 }
1492
1493 long in_vector_size (
1494 ) const

Callers

nothing calls this directly

Calls 7

meanFunction · 0.85
varianceFunction · 0.85
matFunction · 0.70
reciprocalFunction · 0.50
sqrtFunction · 0.50
is_finiteFunction · 0.50
sizeMethod · 0.45

Tested by

no test coverage detected