Skip to Content
Practical Neural Network Recipies in C++
book

Practical Neural Network Recipies in C++

by Masters
June 2014
Intermediate to advanced
493 pages
20h 30m
English
Morgan Kaufmann
Content preview from Practical Neural Network Recipies in C++
376
Chapter
20
I
int lo, mid, hi ;
double p ;
if (observed > x[n-1])
return 100. * (1.0 - rprob[n-1]) ;
if (observed <= x[0])
return 0. ;
lo = 0 ; //At all times we keep x[lo] < observed
hi = n-1 ; // and x[hi] >= observed
for (;;) { // This loop cuts interval in half each time
mid = (lo + hi) / 2 ; // Center of interval
if (mid == lo) // Happens when lo and hi adjacent
break ; // So then we are done
if (x[mid] < observed) // Replace appropriate intval end with mid
lo = mid ;
else
hi = mid ;
}
p = (observed - x[hi-1]) / (x[hi] - x[hi-1]) * (rprob[hi] - rprob[hi-1]) ;
p += rprob[hi-1] ;
return 100. * (1.0-p) ;
Bayesian Methods
The method fo
Become an O’Reilly member and get unlimited access to this title plus top books and audiobooks from O’Reilly and nearly 200 top publishers, thousands of courses curated by job role, 150+ live events each month,
and much more.
Start your free trial

You might also like

Data Clustering in C++

Data Clustering in C++

Guojun Gan
Wireless Network Simulation: A Guide using Ad Hoc Networks and the ns-3 Simulator

Wireless Network Simulation: A Guide using Ad Hoc Networks and the ns-3 Simulator

Henry Zárate Ceballos, Jorge Ernesto Parra Amaris, Hernan Jiménez Jiménez, Diego Alexis Romero Rincón, Oscar Agudelo Rojas, Jorge Eduardo Ortiz Triviño

Publisher Resources

ISBN: 9780080514338