gen_splines: B-spline basis generation

Description Usage Arguments Value Examples

Description

Generate the B-spline basis

Usage

1
2
gen_splines(x, limits, knots, missCode = NA, degree = 1, intercept = TRUE,
  name)

Arguments

x

Vector of numerical attribute that is going to be transformed to splines/hats.

limits

Vector of two float numbers indicating model fitting limits for x.

knots

Vector of float numbers representing inner cutpoints of x.

missCode

An integer indicating missing value, e.g. 0 or 999.

degree

An integer indicating degree of the transformed splines.

name

Character string used as the new field names for the transformed data.

Value

Data frame contains transformed splines. The returned data frame has 'length(knots) + degree (+ 1 if there is an intercept)' columns.

Examples

1
2
basisFICO <- gen_splines(x = Data_UsedPlat$FICO, limits = c(450, 900),
    knots = c(500, 525, 540, 575, 600, 670), degree = 3, missCode = 0, name = 'FICO')

hongqi0314/PRAuto.PMML documentation built on May 6, 2019, 11:30 a.m.