reductionista commented on a change in pull request #354: Minibatch DL: Set
default normalizing constant to 1.0
URL: https://github.com/apache/madlib/pull/354#discussion_r262746736
##########
File path:
src/ports/postgres/modules/utilities/minibatch_preprocessing_dl.sql_in
##########
@@ -158,7 +159,137 @@ A summary table named \<output_table\>_summary is also
created, which has the fo
@anchor example
@par Examples
--# Create an artificial 2x2 resolution color image data set with 3 possible
classifications:
+-# Create an artificial 2x2 resolution color image data set with 3 possible
classifications.
+The RGB values are per-pixel arrays:
+<pre class="example">
+DROP TABLE IF EXISTS image_data;
+CREATE TABLE image_data AS (
+SELECT ARRAY[
+ ARRAY[(random() * 256)::integer, -- pixel (1,1)
+ (random() * 256)::integer,
+ (random() * 256)::integer],
+ ARRAY[(random() * 256)::integer, -- pixel (2,1)
+ (random() * 256)::integer,
+ (random() * 256)::integer],
+ ARRAY[(random() * 256)::integer, -- pixel (1,2)
+ (random() * 256)::integer,
+ (random() * 256)::integer],
+ ARRAY[(random() * 256)::integer, -- pixel (2,1)
+ (random() * 256)::integer,
+ (random() * 256)::integer]
+ ] as rgb, ('{cat,dog,bird}'::text[])[ceil(random()*3)] as species
+FROM generate_series(1, 52)
+);
Review comment:
If we want to give an example of how we are currently loading the data (and
I think how we were thinking most users would do it), instead of a 4x3 array it
should be a 2x2x3 array like this:
```
SELECT ARRAY[
ARRAY[
ARRAY[(random() * 256)::integer, -- pixel (1,1)
(random() * 256)::integer,
(random() * 256)::integer],
ARRAY[(random() * 256)::integer, -- pixel (2,1)
(random() * 256)::integer,
(random() * 256)::integer]
],
ARRAY[
ARRAY[(random() * 256)::integer, -- pixel (1,2)
(random() * 256)::integer,
(random() * 256)::integer],
ARRAY[(random() * 256)::integer, -- pixel (2,1)
(random() * 256)::integer,
(random() * 256)::integer]
]
]
```
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services