Documentation for Residual Analysis¶
  calculate_residues(y, yhat) ¶
 Calculate the residues (errors) between true and predicted values.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
 y  |   array-like of shape (n_samples,)  |    True values.  |  required | 
 yhat  |   array-like of shape (n_samples,)  |    Predicted values.  |  required | 
Returns:
| Name | Type | Description | 
|---|---|---|
residues |   ndarray of shape (n_samples,)  |    Residues (errors) between true and predicted values.  |  
Source code in sysidentpy/residues/residues_correlation.py
  compute_cross_correlation(y, yhat, arr) ¶
 Compute the cross-correlation between the residues and another array.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
 y  |   array-like of shape (n_samples,)  |    True values.  |  required | 
 yhat  |   array-like of shape (n_samples,)  |    Predicted values.  |  required | 
 arr  |   array-like of shape (n_samples,)  |    Another array to compute the cross-correlation with.  |  required | 
Returns:
| Name | Type | Description | 
|---|---|---|
ccf |   ndarray of shape (n_samples,)  |    Cross-correlation function.  |  
upper_bound |   float  |    Upper bound for the confidence interval.  |  
lower_bound |   float  |    Lower bound for the confidence interval.  |  
Source code in sysidentpy/residues/residues_correlation.py
  compute_residues_autocorrelation(y, yhat) ¶
 Compute the autocorrelation of the residues.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
 y  |   array-like of shape (n_samples,)  |    True values.  |  required | 
 yhat  |   array-like of shape (n_samples,)  |    Predicted values.  |  required | 
Returns:
| Name | Type | Description | 
|---|---|---|
e_acf |   ndarray of shape (n_samples,)  |    Autocorrelation of the residues.  |  
upper_bound |   float  |    Upper bound for the confidence interval.  |  
lower_bound |   float  |    Lower bound for the confidence interval.  |  
Source code in sysidentpy/residues/residues_correlation.py
  get_unnormalized_e_acf(e) ¶
 Compute the unnormalized autocorrelation function of the residues.
Parameters:
| Name | Type | Description | Default | 
|---|---|---|---|
 e  |   array-like of shape (n_samples,)  |    Residues (errors).  |  required | 
Returns:
| Name | Type | Description | 
|---|---|---|
unnormalized_e_acf |   ndarray of shape (2*n_samples-1,)  |    Unnormalized autocorrelation function of the residues.  |