UQTk: Uncertainty Quantification Toolkit 3.1.5
|
Command-line utility for linear regression. More...
#include <iostream>
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <math.h>
#include <assert.h>
#include "Array1D.h"
#include "Array2D.h"
#include "PCSet.h"
#include "lreg.h"
#include <getopt.h>
#include "tools.h"
#include "arraytools.h"
#include "arrayio.h"
Macros | |
#define | XFILE "xdata.dat" |
default x-file | |
#define | YFILE "ydata.dat" |
default y-file | |
#define | BTYPE "PC" |
default basis type | |
#define | METH "lsq" |
default method | |
#define | MSC "m" |
default flag to output mean (m), mean+std (ms) or mean+std+cov (msc) | |
#define | INTPAR 5 |
default int parameter | |
#define | STRPAR "LU" |
default string parameter | |
#define | MINDEXFILE "mindex.dat" |
default multiindex file | |
#define | ETADEFAULT 1.e-3 |
default tolerance for bcs | |
Functions | |
int | usage () |
Displays information about this program. | |
int | main (int argc, char *argv[]) |
Main program of linear regression given data. | |
Command-line utility for linear regression.
#define BTYPE "PC" |
default basis type
#define ETADEFAULT 1.e-3 |
default tolerance for bcs
#define INTPAR 5 |
default int parameter
#define METH "lsq" |
default method
#define MINDEXFILE "mindex.dat" |
default multiindex file
#define MSC "m" |
default flag to output mean (m), mean+std (ms) or mean+std+cov (msc)
#define STRPAR "LU" |
default string parameter
#define XFILE "xdata.dat" |
default x-file
#define YFILE "ydata.dat" |
default y-file
int main | ( | int | argc, |
char * | argv[] ) |
Main program of linear regression given data.
Set the default values
Read the user input
Sanity checks
Print the input information on screen
Read data
Read validation check data, if any
Declare the 'parent' regression object
Go through options, RBF, PC, PC_MI, POL, POL_MI
Initialize regression
Set the regression model
Setup data
Set the regularization parameters
Go through methods, lsq, wbcs
Write out coefficients
Get the data variance
Evaluate at validation points
Print standard error measures for the lsq method
int usage | ( | ) |
Displays information about this program.