Types

Core data types and result objects used throughout Vectrix.

ForecastResult

Main result from Vectrix.forecast(). Not the same as EasyForecastResult from the Easy API.

FieldTypeDescription
successboolWhether forecast succeeded
predictionsnp.ndarrayForecast values
dateslist[str]Forecast dates
lower95np.ndarray95% lower bound
upper95np.ndarray95% upper bound
bestModelIdstrSelected model ID
bestModelNamestrModel display name
allModelResultsdict[str, ModelResult]All model results
characteristicsDataCharacteristicsData properties

!!! note “EasyForecastResult vs ForecastResult” The Easy API returns EasyForecastResult with .lower / .upper. The Vectrix class returns ForecastResult with .lower95 / .upper95.

ModelResult

Per-model result stored in ForecastResult.allModelResults.

FieldTypeDescription
modelIdstrModel identifier
modelNamestrDisplay name
isValidboolWhether model produced valid output
mapefloatValidation MAPE
rmsefloatValidation RMSE
maefloatValidation MAE
smapefloatValidation sMAPE
predictionsnp.ndarrayModel predictions
lower95np.ndarrayLower bound
upper95np.ndarrayUpper bound
trainingTimefloatTraining time (seconds)
flatInfoFlatPredictionInfoFlat detection info

DataCharacteristics

FieldTypeDescription
lengthintNumber of observations
periodintDetected seasonal period
frequencystrFrequency label (D, W, M, etc.)
hasTrendboolWhether trend detected
trendDirectionstr‘increasing’, ‘decreasing’, ‘none’
trendStrengthfloat0–1 strength
hasSeasonalityboolWhether seasonality detected
seasonalStrengthfloat0–1 strength
predictabilityScorefloat0–100 score

DNAProfile

Returned by analyze().dna or ForecastDNA().analyze().

FieldTypeDescription
featuresdict[str, float]65+ statistical features
fingerprintstr8-char hex hash
difficultystr‘easy’, ‘medium’, ‘hard’, ‘very_hard’
difficultyScorefloat0–100 score
recommendedModelslist[str]Sorted by fitness
categorystr‘trending’, ‘seasonal’, ‘stationary’, etc.
summarystrNatural language summary

!!! warning “Feature values are inside the features dict”

# CORRECT
dna.features['trendStrength']
dna.features['seasonalStrength']
dna.features['hurstExponent']

# WRONG — AttributeError
dna.trendStrength
dna.seasonalStrength
```

**Key feature names:** `trendStrength`, `seasonalStrength`, `seasonalPeakPeriod`, `hurstExponent`, `volatility`, `cv`, `skewness`, `kurtosis`, `adfStatistic`, `spectralEntropy`, `approximateEntropy`, `garchEffect`, `volatilityClustering`, `demandDensity`, `nonlinearAutocorr`, `forecastability`, `trendSlope`, `trendDirection`, `trendLinearity`, `trendCurvature`

## ModelInfo

Available model catalog entry.

| Field | Type | Description |
|---|---|---|
| `id` | `str` | Model identifier |
| `name` | `str` | Display name |
| `category` | `str` | Model category |
| `description` | `str` | Brief description |
| `strengths` | `list[str]` | What the model is good at |