Documentation for Multiobjective Parameter Estimation
¶
Affine Information Least Squares for NARMAX models.
AILS
¶
Affine Information Least Squares (AILS) for NARMAX Parameter Estimation.
AILS is a non-iterative multiobjective Least Squares technique used for finding Pareto-set solutions in NARMAX (Nonlinear AutoRegressive Moving Average with eXogenous inputs) model parameter estimation. This method is suitable for linear-in-the-parameter model structures.
Two types of auxiliary information can be incorporated: static function and steady-state gain.
Parameters¶
static_gain : bool, default=True Flag indicating the presence of data related to steady-state gain. static_function : bool, default=True Flag indicating the presence of data concerning static function. final_model : ndarray, default=[[0], [0]] Model code representation.
References¶
- Nepomuceno, E. G., Takahashi, R. H. C., & Aguirre, L. A. (2007). "Multiobjective parameter estimation for nonlinear systems: Affine information and least-squares formulation." International Journal of Control, 80, 863-871.
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
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 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
|
build_affine_data(psi, HR, QR)
¶
Construct a list of affine data components for NARMAX modeling.
Parameters¶
psi : ndarray of floats, shape (n_samples, n_parameters) The matrix of dynamic regressors. HR : ndarray of floats, shape (n_samples_static_gain, n_parameters) The matrix of static gain regressors. QR : ndarray of floats, shape (n_samples_static_function, n_parameters) The matrix of static function regressors.
Returns¶
affine_data : list of ndarrays A list containing affine data components, including the matrix of static regressors (psi), static gain regressors (if present), and static function regressors (if present).
Notes¶
This method constructs a list of affine data components used in the NARMAX modeling process. The components may include the matrix of static regressors (psi), static gain regressors (if enabled), and static function regressors (if enabled).
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
build_linear_mapping()
¶
Assemble the linear mapping matrix R using the regressor-space method.
This function constructs the linear mapping matrix R, which plays a key role in mapping the parameter vector to the cluster coefficients. It also generates a row matrix qit that assists in locating terms within the linear mapping matrix. This qit matrix is later used in creating the static regressor matrix (Q).
Returns¶
R : ndarray of int A constant matrix of ones and zeros that maps the parameter vector to cluster coefficients. qit : ndarray of int A row matrix that helps locate terms within the linear mapping matrix R and is used in the creation of the static regressor matrix (Q).
Notes¶
The linear mapping matrix R is constructed using the regressor-space method. It plays a crucial role in the parameter estimation process, facilitating the mapping of parameter values to cluster coefficients. The qit matrix aids in term localization within the linear mapping matrix R and is subsequently used to build the static regressor matrix (Q).
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
build_psi(X, y)
¶
Build the matrix of dynamic regressor for NARMAX modeling.
Parameters¶
X : ndarray of floats The input data to be used in the training process. y : ndarray of floats The output data to be used in the training process.
Returns¶
psi : ndarray of floats, shape (n_samples, n_parameters) The matrix of dynamic regressors.
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
build_static_function_information(X_static, y_static)
¶
Construct a matrix of static regressors for a NARMAX model.
Parameters¶
y_static : array-like, shape (n_samples_static_function,) Output of the static function. X_static : array-like, shape (n_samples_static_function,) Static function input.
Returns¶
Q_dot_R : ndarray of floats, shape (n_samples_static_function, n_parameters) The result of multiplying the matrix of static regressors (Q) with the linear mapping matrix (R), where n_parameters is the number of model parameters. static_covariance: ndarray of floats, shape (n_parameters, n_parameters) The covariance QR'QR static_response: ndarray of floats, shape (n_parameters,) The response QR'y
Notes¶
This function constructs a matrix of static regressors (Q) based on the provided static function outputs (y_static) and inputs (X_static). The linear mapping matrix (R) should be precomputed before calling this function. The result Q_dot_R represents the static regressors for the NARMAX model.
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
build_static_gain_information(X_static, y_static, gain)
¶
Construct a matrix of static regressors referring to the derivative (gain).
Parameters¶
y_static : array-like, shape (n_samples_static_function,) Output of the static function. X_static : array-like, shape (n_samples_static_function,) Static function input. gain : array-like, shape (n_samples_static_gain,) Static gain input.
Returns¶
HR : ndarray of floats, shape (n_samples_static_function, n_parameters) The matrix of static regressors for the derivative (gain) multiplied by the linear mapping matrix R. gain_covariance : ndarray of floats, shape (n_parameters, n_parameters) The covariance matrix (HR'HR) for the gain-related regressors. gain_response : ndarray of floats, shape (n_parameters,) The response vector (HR'y) for the gain-related regressors.
Notes¶
This function constructs a matrix of static regressors (G+H) for the derivative (gain) based on the provided static function outputs (y_static), inputs (X_static), and gain values. The linear mapping matrix (R) should be precomputed before calling this function.
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
build_system_data(y, static_gain, static_function)
¶
Construct a list of output data components for the NARMAX system.
Parameters¶
y : ndarray of floats The target data used in the identification process. static_gain : ndarray of floats Static gain output data. static_function : ndarray of floats Static function output data.
Returns¶
system_data : list of ndarrays A list containing data components, including the target data (y), static gain data (if present), and static function data (if present).
Notes¶
This method constructs a list of data components that are used in the NARMAX system identification process. The components may include the target data (y), static gain data (if enabled), and static function data (if enabled).
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
estimate(y_static=np.zeros(1), X_static=np.zeros(1), gain=np.zeros(1), y=np.zeros(1), X=np.zeros((1, 1)), weighing_matrix=np.zeros((1, 1)))
¶
Estimate the parameters via multi-objective techniques.
Parameters¶
y_static : array-like of shape = n_samples_static_function, default = ([0]) Output of static function. X_static : array-like of shape = n_samples_static_function, default = ([0]) Static function input. gain : array-like of shape = n_samples_static_gain, default = ([0]) Static gain input. y : array-like of shape = n_samples, default = ([0]) The target data used in the identification process. X : ndarray of floats, default = ([[0],[0]]) Matrix of static regressors. weighing_matrix: ndarray Weighing matrix for defining the weight of each objective.
Returns¶
J : ndarray Matrix referring to the objectives. euclidean_norm : ndarray Matrix of the Euclidean norm. theta : ndarray Matrix with parameters for each weight. HR : ndarray H matrix multiplied by R. QR : ndarray Q matrix multiplied by R. position : ndarray, default = ([[0],[0]]) Position of the best theta set.
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 |
|
get_cost_function(y, psi, theta)
¶
Calculate the cost function based on residuals.
Parameters¶
y : ndarray of floats The target data used in the identification process. psi : ndarray of floats, shape (n_samples, n_parameters) The matrix of regressors. theta : ndarray of floats The parameter vector.
Returns¶
cost_function : float The calculated cost function value.
Notes¶
This method computes the cost function value based on the residuals between the target data (y) and the predicted values using the regressors (dynamic and static) and parameter vector (theta). It quantifies the error in the model's predictions.
Source code in sysidentpy/multiobjective_parameter_estimation/estimators.py
get_term_clustering(qit)
¶
Get the term clustering of the model.
This function takes a matrix qit
and compute the term clustering based on their values. It calculates the number of occurrences of each value for each row in the matrix.
Parameters¶
qit : ndarray Input matrix containing terms clustering to be sorted.
Returns¶
N_aux : ndarray A new matrix with rows representing the number of occurrences of each value for each row in the input matrix qit
. The columns correspond to different values.
Examples¶
qit = np.array([[1, 2, 2], ... [1, 3, 1], ... [2, 2, 3]]) result = get_term_clustering(qit) print(result) [[1. 2. 0. 0.][2. 0. 1. 0.] [0. 2. 1. 0.]]
Notes¶
The function calculates the number of occurrences of each value (from 1 to the maximum value in the input matrix qit
) for each row and returns a matrix where rows represent rows of the input matrix qit
, and columns represent different values.