SIGCLEAR Program reference

sgfit

Fit linear, matching-filter, or polynomial models by group

Package: sigclear-optim · Version: 1.0.1-5 Download JSON

Description

Fit the selected model independently by group using one target vector and the
configured predictor fields. The fitted target is written to the output;
optional diagnostics include fit error and model parameters.

Synopsis

sgfit <stdin >stdout model=linear model.nf=5 match.mf=0 model.qc=NULL optim=mse optim.driver=steepgrad optim.niter=10

Parameters

sgfit parameters
ParameterTypeDefaultDescription
in ifile stdin input dataset: 1. the first vector is the target (dependent variable) 2. the remaining vectors are predictors (independent variables)
out ofile stdout output dataset with the first vector replaced by fitted values and a fiterr field added
model enum linear fitting model: linear: y = a[0] + sum_i=1:n a[i]*x[i] match: y[i] = sum_k=-mf:nf a[k]*x[i-k] poly: y = sum_k=0:nf a[k]*x^k
Allowed: linear match poly
model.nf int 5 causal filter order for match mode, or polynomial order for poly mode
match.mf int 0 number of non-causal matching-filter coefficients
model.qc ofile NULL optional output dataset containing fitted model parameters
optim enum mse fitting objective: mae: minimize absolute error for Laplacian noise mse: minimize squared error for Gaussian noise mme: minimize maximal error m4e: minimize fourth-power error as an approximation to mme
Allowed: mae mse mme m4e
optim.driver enum steepgrad optimization algorithm
Allowed: steepgrad proxgrad
optim.niter int 10 number of optimization iterations

Input and output

Input

input dataset: 1. the first vector is the target (dependent variable) 2. the remaining vectors are predictors (independent variables)

Output

output dataset with the first vector replaced by fitted values and a fiterr field added