Skip to content

Commit

Permalink
feat: display uploaded images
Browse files Browse the repository at this point in the history
  • Loading branch information
Kaixhin committed Oct 28, 2015
1 parent 75c81b3 commit 98a7707
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 4 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ After a project has been created on FGLab, if this machine is available to run e

Results and custom data must be saved as files into a subfolder in the specified results directory, where the name of the subfolder is the experiment ID, e.g. `/data/mnist/55e069f9cf4e1fe075b76b95`. For an example that uses all of the following features, see [rand.js](https://github.com/Kaixhin/FGMachine/blob/master/test/rand.js).

Non-JSON files are uploaded to MongoDB [GridFS](http://docs.mongodb.org/manual/core/gridfs/) via FGLab, which allows them to be downloaded later in their native format. JSON files are automatically parsed, with fields being added to the experiment object. An example, `notes.json`, may look like this:
Non-JSON files are uploaded to MongoDB [GridFS](http://docs.mongodb.org/manual/core/gridfs/) via FGLab, which allows them to be downloaded later in their native format. Images are automatically displayed on the experiment page, allowing plots to be created by the machine learning code. JSON files are automatically parsed, with fields being added to the experiment object. An example, `notes.json`, may look like this:

```json
{
Expand Down Expand Up @@ -105,7 +105,7 @@ The `_scores` field is a map that can be used to store multiple floats that repr

#### _charts

The `_charts` field is a either an object or array of objects that can be used to store data that will be charted on FGLab using [C3.js](http://c3js.org/), and hence mimics its [API](http://c3js.org/examples.html). This means that it is possible to create different chart types and adjust plotting options, with a minor change in the API so that numeric arrays can be directly exported. Rather than prepending arrays in the `columns` array with the column names, the `columnNames` array is used to perform this on FGLab.
The `_charts` field is a either an object or array of objects that can be used to store data that will be charted on FGLab using [C3.js](http://c3js.org/), and hence mimics its [API](http://c3js.org/examples.html). Given that FGLab renders uploaded images, this is to allow the interactivity afforded by C3.js. This means that it is possible to create different chart types and adjust plotting options, with a minor change in the API so that numeric arrays can be directly exported. Rather than prepending arrays in the `columns` array with the column names, the `columnNames` array is used to perform this on FGLab.

Charts with lots of values are downsampled for performance reasons, using the [Largest-Triangle-Three-Buckets algorithm](http://hdl.handle.net/1946/15343) for visualisation purposes. By default the following options are added to disable points and enable zoom, but these can be overriden:

Expand Down Expand Up @@ -155,4 +155,4 @@ An example [Multiple XY Line Chart](http://c3js.org/samples/simple_xy_multiple.h
}
```

The usage of `_charts` has an inherent tradeoff between storing numerical results in a more intuitive place in the experiment object and easily visualising data. The recommendation is to use `_charts` for visualising data where desired, and extract the data given the `_charts`' structure. However, it is still possible to duplicate the numerical results in a separate array under a custom field in a JSON file.
The usage of `_charts` has an inherent tradeoff between storing numerical results in a more intuitive place in the experiment object and easily visualising data. The recommendation is to use `_charts` for visualising data where desired (which may not be necessary if plots are generated by the machine learning code), and extract the data given the `_charts`' structure. However, it is still possible to duplicate the numerical results in a separate array under a custom field in a JSON file.
2 changes: 1 addition & 1 deletion examples/Calinski-Harabasz/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ The following are the results of running the code on MATLAB R2015b - your result
| linkage | 1 | \_NaN\_ |
| kmeans | 1 | \_NaN\_ |

Each experiment also produces two scatter plots to show the clustering - one based on sepal length vs. sepal width, and the other based on petal length vs. petal width.
Each experiment also produces two scatter plots to show the clustering - one based on sepal length vs. sepal width, and the other based on petal length vs. petal width. Note that FGLab automatically displays uploaded images, so it is possible to create the plots within MATLAB and have them displayed on the experiment page.

## Citations

Expand Down
2 changes: 2 additions & 0 deletions examples/Recurrent-Attention-Model/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,8 @@ For each glimpse, the extracted patches, `patch<x>.png`, are also extracted:

![patch1](https://raw.githubusercontent.com/Kaixhin/FGMachine/master/examples/Recurrent-Attention-Model/patch1.png)

These images are displayed along with the normal download link for uploaded files.

## Citations

[1] Mnih, V., Heess, N., & Graves, A. (2014). Recurrent models of visual attention. In *Advances in Neural Information Processing Systems* (pp. 2204-2212).
Expand Down

0 comments on commit 98a7707

Please sign in to comment.