FixedPointNewInput {FixedPoint} | R Documentation |
FixedPointNewInput This function takes the previous inputs and outputs from the FixedPoint function and determines what vector to try next in seeking a fixed point.
Description
FixedPointNewInput This function takes the previous inputs and outputs from the FixedPoint function and determines what vector to try next in seeking a fixed point.
Usage
FixedPointNewInput(
Inputs,
Outputs,
Method = "Anderson",
MaxM = 10,
SimpleStartIndex = 1,
ExtrapolationPeriod = 7,
Dampening = 1,
ConditionNumberThreshold = 1000,
PrintReports = FALSE,
ReplaceInvalids = c("ReplaceElements", "ReplaceVector", "NoAction")
)
Arguments
Inputs |
This is an N x A matrix of previous inputs for which corresponding outputs are available. In this case N is the dimensionality of the fixed point vector that is being sought (Hence each column is a matrix that is input to the "Function") and A is the number of previous Inputs/Outputs that are being provided to the fixed point. |
Outputs |
This is a matrix of Function values for the each column of the "Inputs" matrix. |
Method |
This is the fixed point method to be used. It can be "Anderson", "Simple", "Aitken", "Newton", "MPE", "RRE", "VEA", "SEA". |
MaxM |
This is the number of saved iterates that are used in the Anderson algorithm. This has no role if another method is used. |
SimpleStartIndex |
This is the index for what column in the input/output matrices did the algorithm start doing simple iterates without jumps. This is used for all methods except the simple and Anderson methods where it has no effect. |
ExtrapolationPeriod |
This is the number of simple iterates to perform before extrapolating. This is used for the MPE, RRE, VEA and SEA methods and has no effect if another method is chosen. Where an epsilon algorithm is used this should be one plus a multiple of two, ie (3,5,7,etc). |
Dampening |
This is the dampening parameter. By default it is 1 which means no dampening takes place. It can also be less than 1 (indicating dampening) or more than 1 (indicating extrapolation). |
ConditionNumberThreshold |
This is what threshold should be chosen to drop previous iterates if the matrix is ill conditioned. Only used in Anderson acceleration. |
PrintReports |
This is a boolean describing whether to print ongoing ConvergenceMetric values for each iterate. |
ReplaceInvalids |
This determines how NAs and Infs generated by the extrapolation method are handled. If it is "NoAction" then if the extrapolation algorithm generates an NA or Inf then no action is taken. This will likely result in these NAs and Infs being fed into the function and an error resulting. If it is "ReplaceVector" then the entire extrapolated vector will be replaced by a vector of a simple iterate. If it is "ReplaceElements" then the elements containing an NA or Inf will be replaced by the corresponding elements from a simple iterate. |
Value
A vector containing the next guess in seeking a fixed point.
Examples
FPFunction = function(x){c(0.5*sqrt(abs(x[1] + x[2])), 1.5*x[1] + 0.5*x[2])}
A = FixedPoint( Function = FPFunction, Inputs = c(0.3,900), MaxIter = 6, Method = "Simple")
NewGuessAnderson = FixedPointNewInput(A$Inputs, A$Outputs, Method = "Anderson")
NewGuessVEA = FixedPointNewInput(A$Inputs, A$Outputs, Method = "VEA")
NewGuessMPE = FixedPointNewInput(A$Inputs, A$Outputs, Method = "MPE")
NewGuessAitken = FixedPointNewInput(A$Inputs, A$Outputs, Method = "Aitken")