Learn R Programming

IRon (version 0.1.4)

phi.control: Generation of relevance function

Description

This procedure enables the generation of a relevance function that performs a mapping between the values in a given target variable and a relevance value that is bounded by 0 (minimum relevance) and 1 (maximum relevance). This may be obtained automatically (based on the distribution of the target variable) or by the user defining the relevance values of a given set of target values - the remaining values will be interpolated.

Usage

phi.control(
  y,
  phi.parms,
  method = phiMethods,
  extr.type = NULL,
  control.pts = NULL,
  asym = TRUE,
  ...
)

Value

A list with three slots with information concerning the relevance function

method

The method used to generate the relevance function (extremes or range)

npts

?

control.pts

Three sets of values identifying the target value-relevance-derivate for the first low extreme value, the median, and first high extreme value

Arguments

y

The target variable of a given data set

phi.parms

The relevance function providing the data points where the pairs of values-relevance are known

method

The method used to generate the relevance function (extremes or range)

extr.type

Type of extremes to be considered: low, high or both (default)

control.pts

Parameter required when using 'range' method, representing a 3-column matrix of y-value, corresponding relevance value (between 0 and 1), and the derivative of such relevance value

asym

Boolean for assymetric interpolation. Default TRUE, uses adjusted boxplot. When FALSE, uses standard boxplot.

...

Misc data to be added to the relevance function

Examples

Run this code
library(IRon)

data(accel)

ind <- sample(1:nrow(accel),0.75*nrow(accel))

train <- accel[ind,]
test <- accel[-ind,]

ph <- phi.control(train$acceleration); phiPlot(test$acceleration, ph)
ph <- phi.control(train$acceleration, extr.type="high"); phiPlot(test$acceleration, ph)
ph <- phi.control(train$acceleration, method="range",
  control.pts=matrix(c(10,0,0,15,1,0),byrow=TRUE,ncol=3)); phiPlot(test$acceleration, ph)

Run the code above in your browser using DataLab