jingyimei commented on a change in pull request #357: Utilities: Add one-hot
encode for dependent variable in Minibatch DL
URL: https://github.com/apache/madlib/pull/357#discussion_r267542819
##########
File path: src/ports/postgres/modules/utilities/minibatch_preprocessing.py_in
##########
@@ -448,6 +345,131 @@ class MiniBatchPreProcessor:
plpy.execute(query)
+class MiniBatchPreProcessorDL(MiniBatchPreProcessor):
+ def __init__(self, schema_madlib, source_table, output_table,
+ dependent_varname, independent_varname, buffer_size,
+ normalizing_const=1.0, **kwargs):
+ self.schema_madlib = schema_madlib
+ self.source_table = source_table
+ self.output_table = output_table
+ self.dependent_varname = dependent_varname
+ self.independent_varname = independent_varname
+ self.buffer_size = buffer_size
+ self.normalizing_const = normalizing_const if normalizing_const else
1.0
+ self.module_name = "minibatch_preprocessor_DL"
+ self.output_summary_table = add_postfix(self.output_table, "_summary")
+ self._validate_args()
+ self.num_of_buffers = self._get_num_buffers()
+ self.to_one_hot_encode = True
Review comment:
It is used by `get_dep_var_array_expr()` in the same file, so that we have
to set it to true
----------------------------------------------------------------
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