TIBCOSoftware / catalystml

CatalystML is an open source specification for real-time feature processing, purpose built to transform data for machine learning models.
BSD 3-Clause "New" or "Revised" License
2 stars 3 forks source link

Apply operation #17

Closed abramvandergeest closed 5 years ago

abramvandergeest commented 5 years ago

@mellistibco @fm-tibco - I would like your opinion on this.

@skothari-tibco and I have been working on implementing the Apply operation and we can come up with an issue on how to build operation in the spec. Below are two examples on the apply operation from the NLP demo. Where $words, $set, and $nostop are the outputs of other operations and $item is defined in the apply operation spec to refer to the value from the map/array given in "data". In apply acting on count we run into the issue of how to pass $nostop to the operation count. I think that $nostop should be processed by the implementation engine and just be the data as it is passed into apply/count. Samip suggests that we turn data into an array that includes the array/map apply is working on as well as $nostop such that when the user references $nostop in count the operation apply joins the two uses of $nostop. What do you guys think?

                      {
                        "operation":"apply",
                        "input":{
                          "data":"$words",
                          "function":{
                            "operation":"stem",
                            "input":{"str":"$item"},
                            "params":{"algo":"Porter"}
                          }
                        },
                        "params":{
                          "mapOrArray":"array"
                        },
                        "output":"stemwords"
                      }

and { "operation":"apply", "input":{ "data":"$set", "function":{ "operation":"count", "input":{ "s0":"$nostop", "s1":"$item" } } }

abramvandergeest commented 5 years ago

This has been done so that it is processed recursively