INLA_DIST
Loading...
Searching...
No Matches
Hyperparameters.h
1#ifndef __HYPERPARAMETER_H
2#define __HYPERPARAMETER_H
3
4#include <random>
5#include <vector>
6#include <iostream>
7#include <fstream>
8#include <math.h>
9#include <time.h>
10#include <stdlib.h>
11#include <stdio.h>
12
13#include "mpi.h"
14
15#include <Eigen/Core>
16#include <Eigen/Dense>
17
18using Eigen::MatrixXd;
19typedef Eigen::VectorXd Vect;
20
21using namespace Eigen;
22
23
24// make hyperparameters a class with different attributes & conversion functions for hyperparameters
25// TODO: make such that when theta is update in one scale the other gets udpated as well??
27 public:
28
29 int spatial_dim = 2;
30 std::string manifold = "";
31
32 Vect lik; // log
33 Vector2d spatF_modelS = Vector2d::Zero(); // log hp related to spatial field in model scale. order:
34 Vector2d spatF_interpretS = Vector2d::Zero(); // log hp related to spatial field in model scale. order: range s, sigma s
35
36 Vector3d spatTempF_modelS = Vector3d::Zero(); // log hp related to spatial temporal field in model scale. order:
37 Vector3d spatTempF_interpretS = Vector3d::Zero(); // log hp related to spatial temporal field in model scale. order: range s, range t, sigma st
38
39 // order lik, spatTempF, spatF
40 Vector3i dimList = Vector3i::Zero(); // contains dim of each of the above: initialized to zero. update when above are being set.
41
42 char scale;
43 Vect& flat;
44
45 //Vect& flat_modelS;
46 //Vect& flat_interpretS;
47
48 // ============================================================== //
49
50 Hyperparameters(int spatial_dim_, std::string manifold_, Vector3i dimList_, char scale_, Vect& flat_);
51 //Hyperparameters(int spatial_dim_, std::string manifold_, Vector3i dimList_, Vect& flat_modelS_, Vect& flat_interpretS_);
52 //Hyperparameters(int spatial_dim_, std::string manifold_, Vector3i dimList_);
53
55
56 void convert_theta2interpret();
57 void convert_interpret2theta();
58
59 Vect flatten_modelS(); // glue all existing hyperparameter elements together in model scale
60 Vect flatten_interpretS(); // glue all existing hyperparameter elements together in interpret scale
61
62 void update_modelS(Vect theta_update);
63 void update_interpretS(Vect theta_update);
64};
65
66
67#endif // endif IFNDEF HYPERPARAMETER
Definition Hyperparameters.h:26