Easy API

The simplest way to use Vectrix. One function call for each task.

Functions

forecast()

forecast(
    data,                    # str | DataFrame | ndarray | list | Series | dict
    date=None,               # str — date column name
    value=None,              # str — value column name
    steps=30,                # int — forecast horizon
    verbose=False,           # bool
    models=None,             # list[str] | None — model IDs to evaluate
    ensemble=None,           # str | None — 'mean', 'weighted', 'median', 'best'
    confidence=0.95          # float — 0.80, 0.90, 0.95, 0.99
) -> EasyForecastResult

Available model IDs: 'dot', 'auto_ets', 'auto_arima', 'auto_ces', 'four_theta', 'auto_mstl', 'tbats', 'theta', 'dtsf', 'esn', 'garch', 'croston', 'ets_aan', 'ets_aaa', 'naive', 'mean', 'rwd', 'window_avg', 'egarch', 'gjr_garch', 'seasonal_naive', 'mstl'

analyze()

analyze(
    data,                    # str | DataFrame | ndarray | list | Series | dict
    date=None,               # str
    value=None,              # str
    period=None,             # int | None — seasonal period (auto if None)
    features=True,           # bool
    changepoints=True,       # bool
    anomalies=True,          # bool
    anomalyThreshold=3.0     # float — z-score threshold
) -> EasyAnalysisResult

regress()

regress(
    y=None,                  # ndarray | Series | None (direct mode)
    X=None,                  # ndarray | DataFrame | None (direct mode)
    data=None,               # DataFrame | None (formula mode)
    formula=None,            # str | None — "y ~ x1 + x2"
    method='ols',            # str — 'ols', 'ridge', 'lasso', 'huber', 'quantile'
    summary=True,            # bool — auto-print summary
    alpha=None,              # float | None — regularization strength
    diagnostics=False        # bool — auto-run diagnostics
) -> EasyRegressionResult

compare()

compare(
    data,                    # str | DataFrame | ndarray | list | Series | dict
    date=None,               # str
    value=None,              # str
    steps=30,                # int
    verbose=False,           # bool
    models=None              # list[str] | None
) -> pd.DataFrame           # Returns DataFrame directly, NOT a Result object

Returned DataFrame columns: model, mape, rmse, mae, smape, time_ms, selected

quickReport()

quickReport(
    data, date=None, value=None, steps=30
) -> dict                   # Returns dict, NOT a Result object

Returned dict keys: 'forecast' (EasyForecastResult), 'analysis' (EasyAnalysisResult), 'summary' (str)

Alias: quick_report = quickReport (backward compatibility)

loadSample()

loadSample(name: str) -> pd.DataFrame

Load a built-in sample dataset.

Available samples: 'airline', 'retail', 'stock', 'temperature', 'energy', 'web', 'intermittent'

Sampledate colvalue col
airlinedatepassengers
retaildatesales
stockdateclose
temperaturedatetemperature
energydateconsumption_kwh
webdatepageviews
intermittentdatedemand

listSamples()

listSamples() -> pd.DataFrame

List available built-in sample datasets.

Result Classes

EasyForecastResult

Attributes:

AttributeTypeDescription
.predictionsnp.ndarrayForecast values
.dateslist[str]Forecast dates
.lowernp.ndarrayLower CI
.uppernp.ndarrayUpper CI
.modelstrBest model name
.mapefloatMAPE %
.rmsefloatRMSE
.maefloatMAE
.smapefloatsMAPE
.modelslist[str]All valid model names (sorted by MAPE)

Methods:

MethodAliasReturnsDescription
summary()strText summary
toDataframe()to_dataframe()DataFramedate, prediction, lower95, upper95
compare()DataFrameAll models ranked by MAPE
allForecasts()all_forecasts()DataFramedate + one col per model
describe()DataFrame.describe() style stats
toCsv(path)to_csv(path)selfSave to CSV
toJson(path=None)to_json(path=None)strJSON string or save to file
save(path)selfAlias for toJson(path)
plot()Figurematplotlib plot (optional dep)

EasyAnalysisResult

AttributeTypeDescription
.dnaDNAProfileDNA profile object
.changepointsnp.ndarrayChangepoint int indices (NOT dicts)
.anomaliesnp.ndarrayAnomaly int indices (NOT dicts)
.featuresdictStatistical features dict
.characteristicsDataCharacteristicsData characteristics
.summary()strFormatted report

!!! warning “anomalies/changepoints are int arrays”

# CORRECT
for idx in analysis.anomalies:
    print(f"Anomaly at index {idx}")

# WRONG — will crash
for a in analysis.anomalies:
    print(a['index'], a['value'])  # TypeError!
```

### EasyRegressionResult

**Attributes (camelCase primary, snake_case aliases):**

| Primary | Alias | Type | Description |
|---------|-------|------|-------------|
| `coefficients` || `np.ndarray` | Including intercept |
| `pvalues` || `np.ndarray` | P-values |
| `rSquared` | `r_squared` | `float` ||
| `adjRSquared` | `adj_r_squared` | `float` | Adjusted R² |
| `fStat` | `f_stat` | `float` | F-statistic |
| `durbinWatson` | `durbin_watson` | `float` | Durbin-Watson statistic |

**Methods:**

| Method | Returns | Description |
|--------|---------|-------------|
| `summary()` | `str` | Regression summary table |
| `diagnose()` | `str` | Full diagnostics report |
| `predict(X, interval, alpha)` | `DataFrame` | Predictions with intervals |