Learn R Programming

OptHoldoutSize (version 0.1.0.1)

powerlaw: Power law function

Description

Power law function for modelling learning curve (taken to mean change in expected loss per sample with training set size)

Recommended in review of learning curve forms

If theta=c(a,b,c) then models as a n^(-b) + c. Note b is negated.

Note that powerlaw(n,c(a,b,c)) has limit c as n tends to infinity, if a,b > 0

Usage

powerlaw(n, theta)

Value

Vector of values of same length as n

Arguments

n

Set of training set sizes to evaluate

theta

Parameter of values

Examples

Run this code

ncheck=seq(1000,10000)
plot(ncheck, powerlaw(ncheck, c(5e3,1.2,0.3)),type="l",xlab="n",ylab="powerlaw(n)")

Run the code above in your browser using DataLab