Docsity

Natural Resource Management Notes (English), Appunti di Scienze Ambientali

Toggle sidebar
bg1
NRM notes
(By Prowspery Luke)
First Part: Giulianji
22-02: Introduction to mathematical modelling for natural resources management.
Model purposes :
1- System understanding: we use the model to understand how the system works. An example
could be a model able to represent the changing in temperature to verify which factors
contribute to the warming of the planet: if we consider only natural changes such as volcanic
activity and orbital changes, the shift of temperatures remains close to the average. If we
consider also GHGs emissions and human factors, the rise in T goes very close to the observed
one.
2- Forecasting: the act of using data from the past to obtain a given value of the variables in the
future. It could be useful to act on emergency before they happen, increasing the amount of
time that we have for decision making. It could also be useful for productivity and efficiency of a
sector, an example could be: knowing when to irrigate according to when it will rain.
3- Simulation: Study how the components of the model evolves in time. An example could be the
global climate projections developed by IPCC that compute trajectories of physical processes.
Types of Models:
1- Physically-based: They try to describe all dynamics of the system, it is based on a priori
knowledge of the system and it is spatially distributed (raster).
The fact that it represents all the dynamics of the system, makes is suitable for system
understanding, regarding the fact that is based on a priori knowledge of the system, what is not
known could be calibrated on data. Ex: ELCOM-CAEDYM.
2- Conceptual model: They divide the system in different blocks according to they’re functions, the
purpose is to represent the system in a simpler way.
3- Data-driven model: They don’t require any previous knowledge on how the system works, just a
good amount of data to calibrate parameters, the simplicity in the calculations comports a
problem when dealing with system with dynamics that are changing in respect to the past.
1
pf3
pf4
pf5
pf8
pf9
pfa
pfd
pfe
pff
pf12
pf13
pf14
pf15
pf16
pf17
pf18
pf19
pf1a
pf1b
pf1c
pf1d
pf1e
pf1f
pf20
pf21
pf22
pf23
pf24
pf25
pf26
pf27
pf28
pf29
pf2a
pf2b
pf2c
pf2d
pf2e
pf2f
pf30

Anteprima parziale del testo

Scarica Natural Resource Management Notes (English) e più Appunti in PDF di Scienze Ambientali solo su Docsity!

NRM notes

(By Prowspery Luke)

First Part: Giulianji

22-02: Introduction to mathematical modelling for natural resources management.

Model purposes : 1- System understanding : we use the model to understand how the system works. An example could be a model able to represent the changing in temperature to verify which factors contribute to the warming of the planet: if we consider only natural changes such as volcanic activity and orbital changes, the shift of temperatures remains close to the average. If we consider also GHGs emissions and human factors, the rise in T goes very close to the observed one. 2- Forecasting : the act of using data from the past to obtain a given value of the variables in the future. It could be useful to act on emergency before they happen, increasing the amount of time that we have for decision making. It could also be useful for productivity and efficiency of a sector, an example could be: knowing when to irrigate according to when it will rain. 3- Simulation : Study how the components of the model evolves in time. An example could be the global climate projections developed by IPCC that compute trajectories of physical processes. Types of Models: 1- Physically-based: They try to describe all dynamics of the system , it is based on a priori knowledge of the system and it is spatially distributed (raster). The fact that it represents all the dynamics of the system, makes is suitable for system understanding , regarding the fact that is based on a priori knowledge of the system, what is not known could be calibrated on data. Ex: ELCOM-CAEDYM. 2- Conceptual model : They divide the system in different blocks according to they’re functions, the purpose is to represent the system in a simpler way. 3- Data-driven model: They don’t require any previous knowledge on how the system works, just a good amount of data to calibrate parameters, the simplicity in the calculations comports a problem when dealing with system with dynamics that are changing in respect to the past.

General form of a dynamic system: Forecasting works in a discrete time space , meaning that having a value of the variable at time t, it can predict the value of it at time t+1, the time step must be defined according to the system dynamics: if the time step ( lead time ) is shorter than the velocity at which the system change ( delay ), then we can describe well the change in the system. If otherwise the lead time is longer, there will be changes that won’t be descripted well. This is called an improper model , meaning that there is no temporal connection, you will have to use another model to simulate values inside the lead time. Meaning that you will have the error of 2 models summed up. Lead time < delay à 😊 Lead time > delay à ☹ Simulation can give trajectories of the state and of the outputs , given initial conditions and trajectories of inputs. State estimation: Forecasting needs : Inputs, State, Output at time t. State at time t, is not always observable (ex: soil moisture cannot be directly measured). For this reason, we can use the model in simulation mode guessing the initial conditions and run it long enough to lose the dependency on initial conditions. THIS IS POSSIBLE ONLY IF THE SYSTEM IS STABLE, if we have CAOHTIC CONDITIONS, THIS CANT BE DONE. How to estimate a value for initial conditions: 1- Luenberger observer : assuming that the model is linear and deterministic. Having observed inputs (u) and outputs (y_obs), we can use u to evaluate outputs (y_calc). and then minimizing the error between y_obs and y_calc.

The next step is evaluating forecast quality : 1- Reliability: Having a window of possible values, which represents the range between maximum and minimum value produced by the projections, it counts how many observations falls within this window. 0% à very bad; 100% à very good. 2- Accuracy: How close the observations are to the projections, could be computed using correlation, Root Mean Square Error etc. 3- Spread: The variation of the ensemble forecast from the mean of the whole ensemble. The smaller the better. 4- SKILL: we run the model in control, then we must compare it with the observed values, we do so through a statistical tool such as correlation, if the correlation of the model is higher than the one of the data, the model is skilful. The first three are not that meaningful we could have a value of reliability or accuracy but how do we know if this is that good? We just have a value. Skill, on the other hand, doesn’t evaluate the attribute alone but compare it to a reference (the one of the data). Example: European Centre for medium-range weather forecasts: on the graph we can notice that EL- Nino tree region is very skilful due to the high predictability of the process. Instead of using physically based models, also data-driven could be used for forecasts : Output: seasonal precipitation. Input: Sea Surface Temperature Data of the areas connected to precipitation in the place that we want to examine. In Lombardy this approach works very well for droughts since ocean oscillations are the main source of them in Europe.

06/13-03: Data driven model identification.

Data could be used for three different purposes: 1- Data-driven calibration (Estimate model parameters): you put data on a plan, then you try to find the corrects function and the correct values of parameters. 2- Data-driven identification (Identify model structure): is a generalization of point 1, instead of searching for only parameters, we can also try to find the correct function or the correct mix of functions. 3- Validation (evaluate the model): if the model works well. According to which type of model we use, data play a different role: for physically based models , they are only used in validation (3). For conceptual models, they are used for both calibration and validation (1), (3). For data-driven they are used for the whole identification process and for validation (2), (3). The principal problem of data-driven is the assumption of stationarity: meaning that the model is set to be able to reproduce data, so will work in the same conditions of the ones when the data were taken. An example could be a river in Vietnam: Vietnam is a developing country that has seen many changes during the years, this has led to a river system change due to the construction of reservoirs, mining of sediments to be used for buildings, and an increase demand from agriculture. We can use data-driven models only for stationary or cyclo-stationary systems. It is possible to partially overcome this problem using recursive parameters estimation techniques. In theory, physically based model shouldn’t be affected by this limitation since they are based on physical equations, actually data are used to interpolate values instead of taking on field measurement for every grill of the spatially distributed domain. Box and Jenkins method is an algorithm to identify to construct a good data-driven model:

understand if the model is able to represent well even data that weren’t used for calibration. The problem here is that if we use to many parameters in the model, it will tend to describe the white noise of the dataset used for calibration (3), ( training dataset ). In this case we will have overfitting and the model wont works well with another set of data ( test dataset ). The overfitting phenomena could be well described by this graph. ààààààààà The same graph helps understanding how model evaluation (4) works:

  1. We compute the distance between the values of J for both training and validation. We start from the simpler model and we increase the complexity step by step.
  2. If the distance is lower than the one of the model at previous iteration, we go ahead Otherwise we select the model of the previous iterative step as the better. If J starting increase in respect to the previous iterative step, it means that we have passed the “right model complexity” point and we are now in the overfitting area. N.B. Theoretically, having enough data to split the dataset in 2, we will be able to capture the underline stochastic process, so that if we try to re-do the process inverting training and test dataset, the outcome will be the same. Practically this won’t happen for 2 main reasons: 1) Lack of data, meaning that the outcome will depend on the way we split data. 2) Presence of extreme events that if are present in the testing dataset and not in the training one, will produce discrepancy in the two. Bonus) Seasonal events could produce differences, if for example we use as training dataset El Nino conditions and test it using La Nina conditions, we are testing it on data collecting of the same place but with completely different conditions. You must be careful on how you split the sample.
  3. How to select D. One idea is to use cross-validation (rotation estimation), in this case we can do in only one algorithm both Dataset selection (1) and Model selection (1). The idea is to divide the dataset in two, one subset will be used for calibration and the other one for evaluation. The process will be do again

a certain number of times using a different way of partitioning every time, then the average of J value is taken. In this way we will choose again the best model without being limited by choosing only one partition way. The problem that emerges from this procedure is which parameter’s value to use : if for example we divide the dataset in 4 different ways, we will create 4 different models with different parameter’s values, and it is not possible to average them since there is no correlation between parameters and performance. What is usually done is that, after we have found the right number of parameters (the right model) the calibration is done using the full dataset since we don’t need to evaluate the model no more. Could be even greater to maintain a very short data set to do again the control. If we take a very short subset, this will not affect the parameters. Which techniques do we have to do data partition? 3 main ones: 1) Random Subsampling: Performing k data splits of the dataset in a random way (we define k). Then performance (J) will be computed as the average of single’s average performances. The problem here is that we are not sure whether all data are used in both calibration and test or not. 2) K-fold cross validation: Divide the dataset in k subsets, for every iteration, you use one of the subsets for testing and the others for calibration. K value could be selected considering that a high value (high number of subsets) is good for poor datasets but requires computational time and produce a high variance of the estimator, on the other hand, low value of K lead to lower computational time and estimator variance, while the bias of the estimator will be large. The average approach is to select k=10. 3) Leave-one-out cross validation: Is a K-fold cross validation where K is equal to the total amount of data in the set. It is good since you are using the maximum amount of possible data for calibration, for this reason it is used when the dataset is not rich and when we are in the presence of oscillations. Some cons are the computational time needed and the fact that we are using only one data for testing meaning that variance of error will be large. K value could be selected considering that a high value (high number of subsets) is good for poor datasets but requires computational time and produce a high variance of the estimator, on the other hand, low value of K lead to lower computational time and estimator variance, while the bias of the estimator will be large. The average approach is to select k=10.

Multi-model approach : an alternative approach could be, instead of considering only one model, we acknowledge that there are different ones, that work better or worst according to initial conditions. With this method we can switch from one model to another according to system conditions. Another alternative is to run at the same time different models producing an ensemble of possible scenarios.

  1. How to solve the minimization problem: Case 1) We are using MSE with a model output y estimated that is linear in the parameters : In this case we can use Least Squares finding a unique solution that can be computed using an algebraic formula. The problem in that in the definition of the error, we must select if the estimated outputs will be estimated in forecasting or simulation, the difference is that: For forecasting : the system at t+1 is dependent on the observed value in t. For simulation : the system in t+1 is dependent on the simulated value in t. The problems of simulation are 2:
  2. The error in the output will be the sum of the one made in that time step plus the ones made at previous ones.
  3. AR(p) models cannot be calibrated in simulation mode using Linear Least Square, but we must use the recursive ones, since AR models are dependent on the value at previous steps which are not observed values but outputs of the model. Case 2) J is not MSE or the output is not linear in the parameters. In this case we may not have a unique solution and the closed form of the solution may be unknown. The idea could be to use a recursive algorithm, by recursively evaluating J:
  4. Gradient-based approach : starting from a random parameter value, moving iteratively to the direction of maximum decrease of J using the gradient. The problems of this method are that 1) it can stop to a local minimum, 2) due to resolution, the model could select a point that is close to the optimal one but it’s not him. In these cases, we can use algorithms where the step size is reduced when the slope becomes low. Also, 3) there will be problems with possible points of the function where the derivative is not possible. 4) One other aspect to consider is that since the approach is iterative, the solution will be sub-optimal.
  5. Random search approach : first it selects a random number of points where to evaluate the function, then it selects a certain number of them which are the more promising (where J has a low value), and search for other random values around the set of the promising ones. It stops when it can’t find no other points better than one that has already found.
  1. Evolutionary algorithms : it first selects randomly a number of points (individuals), each one has a set of parameters (genes), J measures the fitness of the individuals, only the strongest one survives (selection) and new-borns are generated slightly changing the genes of the parent by means of crossover and mutation. The problems related to these algorithms are that 1) since they are iterative, the solution will be sub-optimal, and 2) the computational time will be heavy. On the other hand, it doesn’t have the other problems of the first method analysed. What if in the same J we will have more than one global minimum? In this case we will have more than one possible solution, all with completely different parameters. This is likely to happen when we try to create a model on a very rare event ( ex: snow in the Sahara ). In this case we cannot discriminate between different model so we will have identifiability :
  2. Structural identifiability : the structure of the model is too complex.
  3. Experimental identifiability : we don’t have enough data.

13-03: Recursive parameter estimation and weakly non-linear models.

1. Off-Line model calibration: the steps of calibration are done one after the other. Data collection à Parameters estimation à Use of the model. Since we are doing a forecast, as we go on with the simulation, we must take new measurements to do the forecast of the next step. 2.On-line model calibration : is based on the concept that since we must collect new data, we can use them to calibrate again the model improving its accuracy. In this case we are saying that the dataset has a time dependency. On-line model calibration comports a massive increase in computational time since we must do from scratch all the least square parametrization every time. One possible solution could be to correct the previous value of the parameter adding a correction factor proportional to the error.  In this way on-line calibration begins with a least square estimation and then the parameters value is adjusted step to step.  An alternative could be to do a random initialization , if the recursive scheme is stable, then at a certain point it will lose information about initial conditions. This procedure is useful when you

The answer could be given by this iterative process à à à à The problem of Piecewise linear models is that, while on one hand, they allow for fast variation in values of the parameters, on the other hand the switch is based on a Boolean decision making, meaning that you go from 0 to 100 once you reach the threshold. An alternative could be describing the parameters through a function of some other variables, in this case we are talking about State-Dependent Parameters.

20-03: Non-linear parametric models: Artificial Neural Network

As we already said, environmental systems are non-linear, this could partially be fixed by the weakly non-linear models (previous lecture), but sometimes we are dealing with systems which are strongly non-linear. What do we have to do in these cases? Using non-linear models. We will see 1) Artificial Neural Networks and 2) Classification and regression trees. This lecture will be focused on ANN. The structure of ANN is quite simple and inspired by the architecture of our brain. Many variables are connected using a Learning Unit (LU) (which simulate the work of a neuron), if the input of the variables is sufficiently strong, they will create an output. Usually, the equations behind Learning Units are simple, the fact is that together, they can represent a very huge variety of possible scenarios. There are different possible structures for an ANN model: 1- Fully connected (Dense) à Every LU is connected to every input variable. 2- Sparse connectivity à Every LU is connected to a limited number of input variables. 3- Sparse connectivity + parameter sharing à Same as spares connectivity but now LU have commons parameters. Feed Forward NN: are the type of NN that we will mainly see, they are the simpler ones since they do not have cycle in the structure (the ones with cycles are called recursive NN). They work in this way: 1- Input layer: inputs that must be connected to a certain LU are all aggregated together using a linear function. 2- Hidden layer: for every LU a non-linear transformation of the input is applied. 3- Output layer: every output coming from the hidden layer is aggregated using a linear function. The non-linear transformation is called Activation Function which means that it returns 0 when the signal is weak and the value of the function when the signal is strong. The number of neurons is proportional to the size of the network inputs, in particular they increase less than exponentially with the number of inputs. Identification of the FF-ANN :

There are many things to be specified to define the FF-ANN that we are creating: 1- Which inputs to use (the order of the model) à This is particularly important since if we can provide the right inputs for the right outputs, the model will be able to describe the natural process, otherwise the network will describe a fake process which is not meant to works well with other data (overfitting or down fitting). 2- Number of hidden layers 3- Number of neurons inside the hidden layers. 4- Type of activation functions. Basing on the principle of universal approximator , we can restrict the identification by setting the number of layers equal to one using a sigmoidal identification function. How the define the two remaining characteristics?

  1. Manual identification via trials evaluated using error à The number of possible combinations could be prohibitive.
  2. Doing both in one shot, using all the possible data and then let the training algorithm do the dirty job assigning a value equal to zero to a coefficient that multiply the useless inputs. Limitations:
  • The number of parameters needed tends to grow together with the number of inputs and neurons. This problem could be solved in 2 ways: 1) Running a Cross-Correlation analysis. 2) Fix the order by fitting a linear ARMAX model. Since the number of neurons has a direct influence on the number of parameters , while

The main problem of NN is that they tend to use a huge number of parameters. 1.CART The concept: Instead of identifying complex functions, the input space could be divided into many partitions, the outputs are then computed using predictions. Definitions: 1- Classification: having divided the possible outcomes into classes, it is the act of predicting in which class we will be. Ex: the event will be El Nino o La Nina? (2 classes). 2- Regression: the act of predicting a continuous value. Classification: How to do classification? First, we must divide the input space into different classes. The CART model is structured as a binary tree, at each step a condition is given, if it is satisfied, a branch is followed, otherwise the other branch will be taken (as you can see in the photo). This procedure requires first to answer few questions: 1- Which inputs to use? 2- Which split points (the thresholds that divides a region from another)? 3- When to stop splitting? To answer questions (1) and (2), we could use Recursive Binary Splitting : The idea behind this procedure is to compare all the possible combinations (greedy approach) of input values to select the best performing partition using a cost function. It works analyzing one axe after another (axes are ut and yt) and considers all the possible splitting points along the two axes. After it has all the possible partition for every axe, it mixes the two to find the best combination. It creates the tree by starting from splitting the most important variable, then it goes on till it reach the less important one. The ones which are the end of the tree could be eliminated. To answer question (3) we could impose a minimum number of points that must be inside one region, when one of the regions reached that point, it stops.

  • A minimum number which is small could cause overfitting.
  • A minimum number which is large the leaf will be less specific. Once the tree is fully defined, prunin methods can reduced the complexity. Regression: The trajectory is approximated using a piecewise function. Cons of the CART:
  1. Doing regression on a constant piecewise function is too simplistic. This can be mitigated using many tree leaves increasing the risk of overfitting.
  2. The recursive binary splitting explores all possible combinations of inputs, which requires a lot of computations. To simple CART to more sophisticated models: 2.M5 Model Tree: Concept: For every leaf, instead of using the simple average as in traditional carts, it uses a linear regression function. Pros and cons:
  • Improves accuracy of the tree.
  • Reduces the risk of overfitting.
  • Higher computational time required. 3.Bagged Trees: Concept: Creating many Cart trees using different bootstrapped training sets, then average the outcomes. Using different partitions of the dataset to calibrate the model means to have a high probability of overfitting in every model, but they will overfit different dataset, then at the end we will average all the outcomes. Pros and cons:
  • Computational time is even higher.
  • Reduces the risk of overfitting. 4.Random Forest: Concept: Works as Bagged Trees, but it introduces randomization even in the construction of the trees instead of doing a recursive binary splitting. This decrease computational time. It splits greedly on a variable, choosing randomly on which variable to split, it repeats it many times and ranked the results splitting starting from a number of k variables (not all the possible variables). Pro and Cons:
  • It produces different trees, improving accuracy and decreasing the probability of overfitting.
  • They are still computational heavy, the selection of splitting point is still greedy, only the selection of the variable is random. 5.Extremely Randomized Trees:

N.B. It is considered important to study the uncertainty of a model to assess the robustness of the final decision that we will take. There are two ways to model the uncertainty:

  1. Propagation method: The idea is to describe the uncertainty of the three components (inputs, model, parameters) and propagate it to the outputs. There are two different ways to do so according on if the model is used for forecasting or simulation. 1.1)Inputs Uncertainty: 1.1.1) For Forecasting:  Assume the pdf of the inputs.  Sample the pdf in a discrete number of points to obtain K possible values.  Having the K possible values, you will obtain K possible outcomes.  Considering that the probability of having the Kt outcome is equal to the probability of having the Kt input, we could create a probability function for the outputs. 1.1.2) For Simulation:  Given the input trajectories, we perturbate it creating K different trajectories (possibly associated to a probabilistic value).  Use all the different trajectories to simulate the system obtaining K different trajectories for outputs, all with the same probability of the trajectory that created it. Example of IPCC: different trajectories of global surface temperature that correspond to alternative emission scenarios. 1.2)Initial state uncertainty: The distinction between forecasting and simulating is the same as input, so we will only see forecasting (for simulation do the same thing but with trajectories).  Assume the pdf of the initial state.  Sample the pdf à K initial conditions.  Simulate the system for each initial state and obtain the output trajectories, each of them will have the probability of the initial state that generated it. Example of weather forecast in Rome shows how trajectories could diverge according to the initial condition. 1.3) Parameter Uncertainty:  Assume pdf of the parameters estimated.  Sample the pdf.  Run the model.
  2. Statistical Methods: The idea is to give a statistical description of the global model error and project it into the outputs.

The error is usually considered as additive. The problem is basically modelling a stochastic process, that we have seen with the Box and Jenkins method. Remarks for the process:

  • The mean of the error should be zero, otherwise the error should become part of the model.
  • The error is expected to be a white noise, otherwise it loses stochasticity and can be modelled.
  • The error variance often shows a temporal autocorrelation and a correlation with other variables.

27-03: Sensitivity analysis:

Analyzing the sensitivity means to understand how uncertainty in the outputs could be appointed to certain outputs. It can be used for three main purposes : 1- Ranking : to rank the inputs according to the contribution to the output variability. 2- Screening : identifying the inputs which have a low influence on output variability. 3- Mapping : Determining the region of values for every input that generates a significant output value. Propagation methods used in Uncertainty Analysis are a type of sensitivity analysis since they give a statistical description of the uncertainty source and propagate it to the model. The sensitivity analysis could be either qualitative or quantitative. The qualitative one consists basically in a representation through specific graphs able to represent the sensitivity related to a certain parameter. The possible graphs are: