-
Notifications
You must be signed in to change notification settings - Fork 0
/
user_input.m
53 lines (50 loc) · 3.23 KB
/
user_input.m
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
%% USER_INPUT for the MRA model
% Script where users can set parameters
%
% Authors: Lewis Blake, Colorado School of Mines ([email protected])
% Dorit Hammerling, Colorado School of Mines ([email protected])
%
% calculationType specifies what is calculated.
% Option 'prediction' uses a default values for the parameters and conducts prediction
% Option 'optimize' optimizes over the range, variance and measurement
% error using MLE
% Option 'likelihood' only calculates the log-likelihood.
%
% Documentation in this codebase will make references to Katzfuss, 2017.
%% Workspace cleanup and add file path to subroutines
clear; %addpath('subroutines');
%% User Input: dataSource and calculationType
% Choose dataSource. Set to be a char corresponding to a case within the
% switch clause of load_data.m
% Included data sets are 'satellite' and 'simulated'.
dataSource = 'satellite'; % Default is 'satellite'.
domainGeometry = 'plane'; % Options are 'plane' and 'sphere'
% Choose calculationType: | 'prediction | 'optimize' | 'likelihood' |
calculationType = 'prediction'; % Default is likelihood.
%% Inputs relevant for any calculationType
% Below are the choices for M, J, and r as denoted in Katzfuss 2017.
% To estimate NUM_LEVELS_M, see find_num_levels_suggested_required.m. J must either be 2 or 4.
NUM_LEVELS_M = 9; % Total number of levels. Set to be a natural number. Default is 9.
NUM_PARTITIONS_J = 2; % Number of partitions of each region at each level. Must be 2 or 4. Default is 2.
NUM_KNOTS_r = 64; % Number of knots per partition. Default is 64.
offsetPercentage = 0.01; % Offset percentage from partition boundaries. Default is 0.01.
NUM_WORKERS = 4; % Number of workers in parallel pool. Default is 4.
NUM_LEVEL_ASSIGN_REGIONS_P = 3; % Number of levels to compute in serial. Default is ??.
fitRegressionModel = true; % Should a linear trend in x and y be removed from the field?
resultsFilePath = './Results/'; % By default, results from all routines are saved in the Results folder.
verbose = true; % Boolean variable indicating whether to display progress indicators. Default is true.
%% Inputs relevant if calculationType = 'prediction'.
% That is, these inputs are only used in prediction mode.
displayPlots = true; % Boolean variable indicating whether to display plots when executing the 'prediction' calculationType. Default is true.
savePlots = false; % Boolean variable indicating whether to save plots when executing the 'prediction' calculationType. Default is false.
nXGrid = 200; % Number of prediction grid points in x-direction. Only required for 'prediction' calculationType. Default is 200.
nYGrid = 200; % Number of prediction grid points in y-direction. Only required for 'prediction' calculationType. Default is 200.
% Optional: select file paths to save plots if
% predicting. e.g. resultsFilesPath = '/Users/JerryGarcia/Desktop/';
plotsFilePath = './Plots/'; % By default, plots are saved in Plots folder.
%% Inputs relevant if calculationType = 'optimize'
% Limits and initial values for parameter search
% bounds are in the order of [sigma^2, beta, nu, varEps]
lowerBound = [0, 0, 0, 0]; % Default is [0, 0, 0, 0].
upperBound = [3, 1, 2, 0.1]; % Default is [10, 1, 3, 1].
initalEstimate = [1, 0.3, 1, 0.01]; % Default is [5, 0.3, 1, 0.1].