dataviz

Animation of optimization in torch

In this post I will show you how to use the {gganimate} R package to make an animated GIF illustrating Adam optimization of a function using {torch}: library(torch) library(gganimate) library(tidyverse) We will use torch::optim_adam() to find the value of x that minimizes the following function: f <- function(x) (6 * x - 2) ^ 2 * sin(12 * x - 4) The function looks as follows: The adam_iters dataset will contain an iter column (for the iteration/step identifier) and an x column (the value of x after each iteration):

Resources for learning to visualize data with R/ggplot2

@bearloga I'm currently learning visualisation with R/ggplot2 and was wondering whether you could share tips/links/videos/books/resources that helped you in your journey :-) — Raya راية (@rayasharbain) March 12, 2018 Sure! Here ya go: Tips The only tip I’ll give is that you should strive to make every chart look exactly how you want it to look and say exactly what you want it to say. You will learn in the process of doing.