Exemplo n.º 1
0
                             iterations=200)

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
# export_cov_y: Exports the covariance matrix of y (True or False);
# export_x: Exports the calculated data of x, its uncertainty, and degrees of freedom in a txt with comma separation(True or False);
# export_cov_x: Exports the covariance matrix of x (True or False).
Estime.prediction(export_y=True,
                  export_y_xls=True,
                  export_cov_y=True,
                  export_x=True,
                  export_cov_x=True)

#%% Evaluating residuals and quality index
Estime.residualAnalysis(report=True)

#%% Plotting the main results
Estime.plots()

# =================================================================================
# OPTIONAL: VALIDATION
# =================================================================================
u"""
If the user wishes, it is possible to do the same analysis as before with the prediction data. 
The procedure to be followed is similar to the one previously carried out. The only difference is in the argument inserted in the setConjunto method.
Instead of "type = estimacao" it becomes "type = predicao". It is necessary to enter at least 4 data for each prediction variable. 
"""

#%% Setting the validation data set
#inputs
Exemplo n.º 2
0
#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters: 2InvHessian, Geral, SensibilidadeModelo
# Geral obtains the parameters uncertainty matrix without approximations (most accurate), while 2InvHessian and SensibilidadeModelo involves
# some approximations.
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
# parametersReport: Informs whether the parameters report should be created (True or False).
# iterations: Number of iterations to perform the mapping of the objective function. The higher the better mapping, but it
# increases the execution time
Estimation.parametersUncertainty(uncertaintyMethod='Geral',
                                 objectiveFunctionMapping=True,
                                 iterations=5000,
                                 parametersReport=False)

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
# export_cov_y: Exports the covariance matrix of y (True or False);
# export_x: Exports the calculated data of x, its uncertainty, and degrees of freedom in a txt with comma separation(True or False);
Estimation.prediction(export_y=True,
                      export_y_xls=True,
                      export_cov_y=True,
                      export_x=True)

#%% Evaluating residuals and quality index
# using solely default options
Estimation.residualAnalysis()

#%% Plotting the main results
# using solely default options
Estimation.plots()
Exemplo n.º 3
0
                algorithm='ipopt')

#%% Evaluating the parameters uncertainty and coverage region
# uncertaintyMethod: method for calculating the covariance matrix of the parameters;
# objectiveFunctionMapping: Deals with mapping the objective function (True or False);
Estime.parametersUncertainty(uncertaintyMethod='2InvHessiana',
                             objectiveFunctionMapping=True)

#%%Running the charts without prediction.
# using solely default options
Estime.plots()

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
# export_cov_y: Exports the covariance matrix of y (True or False);
Estime.prediction(
    export_y=True,
    export_y_xls=True,
    export_cov_y=True,
)

#%% Evaluating residuals and quality index
# using solely default options
Estime.residualAnalysis()

#%% Plotting the main results
#Estime.plots()

#%% Reference of this case study
# SCHWAAB, M.M.;PINTO, J.C. Análise de Dados Experimentais I: Fundamentos da Estátistica e Estimação de Parâmetros. Rio de Janeiro: e-papers, 2007.
Exemplo n.º 4
0
                                 parametersReport=True)

#%% Evaluating model predictions
# export_y: Exports the calculated data of y, its uncertainty, and degrees of freedom in a txt with comma separation (True or False);
# export_y_xls: Exports the calculated data of y, its uncertainty, and degrees of freedom in a xls (True or False);
# export_cov_y: Exports the covariance matrix of y (True or False);
# export_x: Exports the calculated data of x, its uncertainty, and degrees of freedom in a txt with comma separation(True or False);
# export_cov_x: Exports the covariance matrix of x (True or False).
Estimation.prediction(export_y=True,
                      export_y_xls=True,
                      export_cov_y=True,
                      export_x=True,
                      export_cov_x=True)

#%% Evaluating residuals and quality index
Estimation.residualAnalysis(report=True)

#%% Plotting the main results
Estimation.plots()

#%% Model definition liear

#%% Packages importing
from MT_PEU_Linear import EstimacaoLinear
from numpy import log, array

#%% Starting the MT_PEU main object
# symbols_x: List of symbols for quantity x;
# symbols_y: List of symbols for quantity y;
# symbols_param: List of symbols for the parameters to be estimated;
# Folder: Defines the name of the folder where the results will be saved.