Skip to content

Commit c11107d

Browse files
sbfnkclaude
andcommitted
Remove R vs Julia transformation recommendations and fix KDE plot
- Removed statements recommending R's built-in functions over Julia wrappers from both transformations.Rmd and forecastbaselines.Rmd - Fixed KDE vs Marginal plot by switching from overlapping histograms to density plots, which better shows the smoothing effect and avoids the "blue rectangle" visualization issue 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
1 parent fc76ad1 commit c11107d

File tree

3 files changed

+7
-12
lines changed

3 files changed

+7
-12
lines changed

vignettes/forecast-models.Rmd

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -240,16 +240,14 @@ fc_marginal <- forecast(marginal, interval_method = NoInterval(), horizon = 1:10
240240
fc_kde <- forecast(kde, interval_method = NoInterval(), horizon = 1:100)
241241
242242
# KDE produces smoother samples
243-
hist(fc_marginal$mean,
244-
breaks = 20, main = "Marginal vs KDE",
245-
col = rgb(1, 0, 0, 0.5)
246-
)
247-
hist(fc_kde$mean,
248-
breaks = 20, add = TRUE,
249-
col = rgb(0, 0, 1, 0.5)
243+
plot(density(fc_marginal$mean),
244+
main = "Marginal vs KDE",
245+
col = "red", lwd = 2,
246+
xlab = "Forecast Value", ylab = "Density"
250247
)
248+
lines(density(fc_kde$mean), col = "blue", lwd = 2)
251249
legend("topright", c("Marginal", "KDE"),
252-
fill = c(rgb(1, 0, 0, 0.5), rgb(0, 0, 1, 0.5))
250+
col = c("red", "blue"), lwd = 2
253251
)
254252
```
255253

vignettes/forecastbaselines.Rmd

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -359,8 +359,7 @@ legend("topleft",
359359
# Data Transformations
360360

361361
For data with non-constant variance or non-negativity constraints,
362-
use transformations. **We recommend using R's built-in functions**
363-
rather than the Julia transformation wrappers.
362+
use transformations.
364363

365364
```{r transformations}
366365
# Example: exponential growth (log transform stabilizes variance)

vignettes/transformations.Rmd

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,6 @@ When working with time series data, transformations are often needed to:
2323
- **Ensure non-negativity** (e.g., for count data)
2424
- **Improve model fit** (e.g., linearize relationships)
2525

26-
While forecastbaselines includes some Julia-based transformation functions, **we strongly recommend using R's built-in transformation functions** for better reliability, flexibility, and performance.
27-
2826
# Why Use R Transformations?
2927

3028
**Advantages:**

0 commit comments

Comments
 (0)