numenta / nupic-legacy

Numenta Platform for Intelligent Computing is an implementation of Hierarchical Temporal Memory (HTM), a theory of intelligence based strictly on the neuroscience of the neocortex.
http://numenta.org/
GNU Affero General Public License v3.0
6.34k stars 1.56k forks source link

Visualize, plot OPF experiment results #2658

Closed breznak closed 8 years ago

breznak commented 9 years ago

I'd like to visualize the results .csv from running OPF experiment. It should be relatively easy, but perhaps some of you have already written a nice utility for that? NAB, @rhyolight ?


WORKING branch: https://github.com/breznak/nupic/tree/plot_results

TODO:


UPDATES:

jefffohl commented 8 years ago

@breznak I noticed that you removed "timestamp" from the excludes array used in the generateFieldMapfunction. We need to add this back in, or else we end up with 2 instances of "timestamp" in that array, because we have to unshift that item into the array at the end of the routine. This is because "timestamp" has to be at the beginning of the returned array.

breznak commented 8 years ago

I noticed that you removed "timestamp" from the excludes array

@jefffohl yes, sorry. It worked and I wasn't aware that it would double the column. You can just change to var EXCLUDE_FIELDS = [TIMESTAMP]; to get it back. Will you do that, or should I?

jefffohl commented 8 years ago

@breznak - I can do it. Though, it depends on what your intentions are for EXCLUDE_FIELDS. If it is to make a list of fields that the user might want to exclude, then it might make more sense to hard-code it into the generateFieldMap function.

breznak commented 8 years ago

If it is to make a list of fields that the user might want to exclude ...

@jefffohl I thought that was the meaning. If we hard-code it, will it still be possible to plot the "timestamp" column? (usually it's linear, although there can be jumps so it can be interesting being able to plot it too)

jefffohl commented 8 years ago

@breznak - In DyGraphs, the x-axis is always the timestamp. So, how would one plot the timestamp against the timestamp?

breznak commented 8 years ago

..ah, you got me :grinning:

jefffohl commented 8 years ago

New PR here: https://github.com/breznak/nupic/pull/15

breznak commented 8 years ago

@jefffohl merged, thank you!

breznak commented 8 years ago

Another thing I got stuck at https://github.com/breznak/nupic/pull/16 - a work to be able to highlight certain ranges when a field is over a threshold.

breznak commented 8 years ago

Small but needed doc in https://github.com/breznak/nupic/pull/17

breznak commented 8 years ago

some graph options in https://github.com/breznak/nupic/pull/19

breznak commented 8 years ago

@jefffohl in testing the UTC/local time, I've noticed an annoying usability problem: In the hotgym file, if you zoom to 1 week range, the daily trends are nicely visible, but the x-axis shows only days, so it's hard to get time for an exact point (one has to click it and see a pop-up window). So:

breznak commented 8 years ago

@jefffohl a couple of another ideas:

breznak commented 8 years ago
breznak commented 8 years ago

@rhyolight looks like we're getting ready! If you have time, could you give this a shot? (and possibly improve the visualization/Readme ?)

rhyolight commented 8 years ago

@breznak @jefffohl Great work. I really like this. I tried it out and it works great. IMO you should merge with the current feature set, then email nupic-discuss with an explanation of how to use. See if any more feature requests come in.

@breznak Go ahead and create a PR and I'll review. But I'm not sure I'll have time to update the readme but I'll try.

jefffohl commented 8 years ago

I can work on the README. Or is that something only the Flag Bearer is supposed to do?

rhyolight commented 8 years ago

@jefffohl Well there is no need to add to the main repo README. But the one in scripts/visualization should be created / updated.

jefffohl commented 8 years ago

@rhyolight - yes, I was referring to the README in scripts/visualization

jefffohl commented 8 years ago

@breznak do you feel that the current state of breznak/nupic/plot_results is what you would like to see for a first PR? If not, what features do you feel are needed? My understanding is that the outstanding features that in development are:

Anything else?

jefffohl commented 8 years ago

@rhyolight - I have some tooling questions too. Should we be adding some unit tests here, and if so, do we have any existing Javascript testing frameworks in place within NuPIC? Also, if we are going to continue to build on this web app, I would like to start implementing some build tools to help with development (such as using gulp for build, SaSS for compiling CSS, bower for managing packages, etc.). This then forces the question - should this be inside NuPIC - or should it be its own project? (Since there is no dependency on NuPIC within this app)

breznak commented 8 years ago

Yes @jefffohl , I'm very satisfied with the current state of plot_results; it's more than what I've wanted at the beginning. Are you happy with the current state, OK for a PR?

Those features in development are other enhancements, so not blocking the current state. I'll just reword them in my words:

rhyolight commented 8 years ago

You are writing the first JavaScript I'm aware of in NuPIC. If you plan on continuing, I would be more in favor of breaking out your plotting tool into its own repository and adding tests there.

The reason is I don't really want to add a new JavaScript runtime to a Python project just to run tests. I think it would be cleaner to have it in its own repo, especially because of its generic functionality.

I say create a PR for now, but if this gets any bigger, move to another repo in nupic-community.


Matt Taylor OS Community Flag-Bearer Numenta

On Thu, Nov 5, 2015 at 11:54 AM, Jeff Fohl notifications@github.com wrote:

@rhyolight https://github.com/rhyolight - I have some tooling questions too. Should we be adding some unit tests here, and if so, do we have any existing Javascript testing frameworks in place within NuPIC? Also, if we are going to continue to build on this web app, I would like to start implementing some build tools to help with development (such as using gulp for build, SaSS for compiling CSS, bower for managing packages, etc.). This then forces the question - should this be inside NuPIC - or should it be its own project? (Since there is no dependency on NuPIC within this app)

— Reply to this email directly or view it on GitHub https://github.com/numenta/nupic/issues/2658#issuecomment-154172255.

breznak commented 8 years ago

About the build tools - I can't judge how much they are needed, but I wouldn't be for extra dependencies to NuPIC, same for tests. This means something like nupic.visualizations repo would be nice(?) The nice thing now is you can fire off a browser and view a nupic results, so the new repo would have to be easily distributable - pip (?)

jefffohl commented 8 years ago

Sounds like we are agreed then. I will update the README, and we can make a PR [EDIT: @breznak already made a PR :)]. For further development, I can create a new repo, with a proper set of build tools, tests, etc.

jefffohl commented 8 years ago

I am not sure what the best way to distribute this would be, but pip seems like a strange fit - isn't that for Python packages only? For front-end apps like this, we would usually use something like Bower. Though, most of the people in this community are probably not avid users of Bower. Of course, it should be pretty easy for people to just use git to clone the repo.

breznak commented 8 years ago

FTR..the work has moved to its stand-alone community repo here: https://github.com/nupic-community/nupic.visualizations