https://pythonprogramminghelp.com/3-ways-to-diagnostic-checking-and-linear-prediction/