LFD Book Forum

LFD Book Forum (http://book.caltech.edu/bookforum/index.php)
-   Homework 5 (http://book.caltech.edu/bookforum/forumdisplay.php?f=134)
-   -   Animation for logistic regression, first 20 epochs (http://book.caltech.edu/bookforum/showthread.php?t=4278)

Michael Reach 05-07-2013 09:15 PM

Animation for logistic regression, first 20 epochs
 
http://s14.postimg.org/o094tqpw1/animation.gif

Just practicing animations. Must be a better way to do it: Installed "animation" package in R. Used saveHtml option. Took that link to makegif.com. That created a link with a gif in it. Used Chrome developer tools to extract the gif from the web page, and saved it on my disk. Then used postimage.org to save the image back on a link [now it's an image, not a web page with a image in it]. Then posted [img]lnk[/img] here.

yaser 05-07-2013 10:18 PM

Re: Animation for logistic regression, first 20 epochs
 
Quote:

Originally Posted by Michael Reach (Post 10762)
Just practicing animations. Must be a better way to do it: Installed "animation" package in R. Used saveHtml option. Took that link to makegif.com. That created a link with a gif in it. Used Chrome developer tools to extract the gif from the web page, and saved it on my disk. Then used postimage.org to save the image back on a link [now it's an image, not a web page with a image in it]. Then posted [img]lnk[/img] here.

On my system, it shows the final epoch only.

Michael Reach 05-08-2013 07:56 AM

Re: Animation for logistic regression, first 20 epochs
 
I work on several machines. On some it shows the whole animation, on others just the last epoch. Dunno.

Huh: Found this
https://bugzilla.mozilla.org/show_bug.cgi?id=17126
on a Mozilla forum, which reports a similar bug in IE and Mozilla (I was using Chrome). Thread goes on forever, but some kind of browser issue with animated gif files.

jlaurentum 05-08-2013 08:10 AM

Re: Animation for logistic regression, first 20 epochs
 
Hello Michael:

What I do is generate a bunch of png graphic files sequentually numbered. Within the R script, I then invoke this

Code:

system("convert -delay 30 *.png youranimation.gif")
This "convert" command is available with ImageMagick, which is a package for Linux. I'm not sure if its available for windows, but if it is, you should install it because its pretty handy.

Michael Reach 05-08-2013 10:44 AM

Re: Animation for logistic regression, first 20 epochs
 
Yeah, the animation package mentions that you need something like InstaMagick. I'll try that - it is available for Windows. Thanks.

Elroch 05-08-2013 01:18 PM

Re: Animation for logistic regression, first 20 epochs
 
If it's any help, it's failed to animate on Chrome, Safari, Firefox and IE on my machine. :confused:

Looking forward to seeing it when you repost!

[I've noticed it's only 37.5 kb. I suspect this means it cannot be the intended animation, as that would be less than 2k per frame with a moderately complex image]

Michael Reach 05-08-2013 03:02 PM

Re: Animation for logistic regression, first 20 epochs
 
"Looking forward to seeing it when you repost!"
Heh - you're already starting on the next homework! This is mainly of interest to me, and mostly for the practice doing animations.


All times are GMT -7. The time now is 09:10 PM.

Powered by vBulletin® Version 3.8.3
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
The contents of this forum are to be used ONLY by readers of the Learning From Data book by Yaser S. Abu-Mostafa, Malik Magdon-Ismail, and Hsuan-Tien Lin, and participants in the Learning From Data MOOC by Yaser S. Abu-Mostafa. No part of these contents is to be communicated or made accessible to ANY other person or entity.