hinge: Maxent feature classes
Description
Create and evaluate Maxent's feature classesUsage
hinge(x, nknots = 50)
thresholds(x, nknots=50)
categorical(x)
hingeval(x, min, max)
thresholdval(x, knot)
categoricalval(x, category)
Arguments
x
a predictor: a factor for categorical and categoricalval, otherwise numeric.
min
value of x
at which hinge feature is 0.
max
value of x
at which hinge feature is 1.
knot
value of x
at which threshold feature changes from 0 to 1.
Value
hinge
, threshold
and categorical
return a matrix with a column for each feature of the specified type. hinge
creates 2*nknots
hinge features, half with min=min(x)
and half with max=max(x)
, and knots evenly spaced between min(x)
and max(x)
. hingeval
calculates a single hinge feature: 0 if the predictor is below min, 1 if the predictor is above max, and linearly interpolated inbetween. thresholdval
calculates a single threshold feature: 1 if the predictor is above the knot, 0 otherwise. categoricalval
calculates a categorical feature: 1 if the predictor matches the category.