Memuat
Memuat
Autoregression AR(p) for Fisheries and Marine Science
0 views
Forecast sea surface temperature with Autoregression AR(p) using wind speed and cloud cover as supporting variables. Autoregression AR(p) models the current value as a linear combination of its p previous values. It suits stationary time series whose values depend on their own history.

Forecast sea surface temperature with Autoregression AR(p) using wind speed and cloud cover as supporting variables.
| Role | Variable | Unit |
|---|---|---|
| Main | Sea surface temperature | °C |
| Supporting 1 | Wind speed | m/s |
| Supporting 2 | Cloud cover | % |
The AR(11) model forecasts Sea surface temperature 12 periods ahead with RMSE 2.406 and MAPE 7.12%. The order was chosen by AIC.
Computed from illustrative synthetic data, not from a real study.
Autoregression AR(p) models the current value as a linear combination of its p previous values. It suits stationary time series whose values depend on their own history.
Report the selected order, coefficients, and forecast error on test data. Include residual autocorrelation results to show the model is adequate.
A short starting script with this project's variable names. The delivered version is adapted to your data and fully commented.
import numpy as np
import matplotlib.pyplot as plt
rng = np.random.default_rng(12)
n = 300
e = rng.normal(0, 1, n)
sea_surface_temperature = np.zeros(n)
for i in range(2, n):
sea_surface_temperature[i] = 0.6 * sea_surface_temperature[i - 1] - 0.3 * sea_surface_temperature[i - 2] + e[i]
wind_speed = np.arange(n)
train, test = sea_surface_temperature[:270], sea_surface_temperature[270:]
pmax = 6
def lagmat(y, p, start):
X = np.column_stack([y[start - k - 1:len(y) - k - 1] for k in range(p)])
return np.column_stack([np.ones(len(X)), X]), y[start:]
best = None
for p in range(1, pmax + 1):
X, t = lagmat(train, p, pmax)
beta = np.linalg.lstsq(X, t, rcond=None)[0]
sse = ((t - X @ beta) ** 2).sum()
aic = len(t) * np.log(sse / len(t)) + 2 * (p + 1)
print("p =", p, "AIC =", round(aic, 2))
if best is None or aic < best[0]:
best = (aic, p, beta)
_, p, beta = best
print("Selected p:", p, "coef:", beta.round(3))
hist = list(train)
fc = []
for _ in range(len(test)):
nxt = beta[0] + sum(beta[k + 1] * hist[-k - 1] for k in range(p))
fc.append(nxt); hist.append(nxt)
print("Forecast RMSE:", round(np.sqrt(np.mean((test - np.array(fc)) ** 2)), 3))
plt.plot(wind_speed[250:], sea_surface_temperature[250:], label="Data")
plt.plot(wind_speed[270:], fc, "r", label="AR forecast")
plt.legend()
plt.show()Choose how much help you need. Each higher package includes everything in the lower ones. Prices exclude 11% VAT.
Package 1
US$22
excl. 11% VAT
Duration: 5 working days
Output: Python files + result figures
Deliverables
Package 2 · most chosen
US$59
excl. 11% VAT
Duration: 9 working days
Output: Code + analysis + interpretation notes
Includes all of Package 1, plus
Package 3
US$134
excl. 11% VAT
Duration: 14-17 working days
Output: Code + analysis + guidance until ready to present
Includes all of Packages 1 & 2, plus
Yes. Autoregression AR(p) is commonly used at this level in Fisheries and Marine Science. We adapt the analysis to your research question, your own data and your supervisor's requirements.
No. The sheet is computed from illustrative synthetic data so you can see the kind of output Python gives. For your order we run the same method on your own data.
That is the point of the packages. Every script is commented, and Package 3 includes two coaching sessions plus practice questions so you can explain the method and the results at your seminar and defence.
Each project has three packages: Package 1 (code and explanation) US$22, Package 2 (your data analysis and interpretation) US$59 and Package 3 (full guidance) US$134, excluding 11% VAT. Larger datasets, extra methods or tight deadlines adjust the quote after a short consultation.
The result sheet uses illustrative synthetic data. Python is a trademark of the Python Software Foundation.
Back to Python portfolio