








































Studia grazie alle numerose risorse presenti su Docsity
Guadagna punti aiutando altri studenti oppure acquistali con un piano Premium
Questa pagina non è visibile nell’anteprima
Non perderti parti importanti!









































(By Prowspery Luke)
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.
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:
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. 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.
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?
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.
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:
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:
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: