powered by
Plot estimated cost function, when parametric method is used for estimation.
Draws cost function as a line and indicates minimum. Assumes a power-law form of k2 unless parameter k2 is set otherwise.
# S3 method for optholdoutsize plot(x, ..., k2form = powerlaw)
No return value; draws a plot only.
Object of type optholdoutsize
optholdoutsize
Other arguments passed to plot() and lines()
plot()
lines()
Function governing expected cost to an individual sample given a predictive score fitted to n samples. Must take two arguments: n (number of samples) and theta (parameters). Defaults to a power-law form powerlaw(n,c(a,b,c))=a n^(-b) + c.
powerlaw(n,c(a,b,c))=a n^(-b) + c
# Simple example N=100000; k1=0.3 A=8000; B=1.5; C=0.15; theta=c(A,B,C) res1=optimal_holdout_size(N,k1,theta) plot(res1)
Run the code above in your browser using DataLab