You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@spark.apache.org by "zhengruifeng (JIRA)" <ji...@apache.org> on 2016/04/20 10:56:25 UTC
[jira] [Issue Comment Deleted] (SPARK-7258) spark.ml API taking
Graph instead of DataFrame
[ https://issues.apache.org/jira/browse/SPARK-7258?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
zhengruifeng updated SPARK-7258:
--------------------------------
Comment: was deleted
(was: I have only encounter Graph-like API in Keras, within which I construct some complex networks.
Keras had two modeling API: Sequential (like Pipelines, add layers one by one), Graph (add nodes).
Its Graph API looks like this:
{code}
graph = Graph()
graph.add_input(name='input1', input_shape=(32,))
graph.add_input(name='input2', input_shape=(32,))
graph.add_node(Dense(16), name='dense1', input='input1')
graph.add_node(Dense(4), name='dense2', input='input2')
graph.add_node(Dense(4), name='dense3', input='dense1')
graph.add_output(name='output', inputs=['dense2', 'dense3'], merge_mode='sum')
graph.compile('rmsprop', {'output':'mse'})
history = graph.fit({'input1':X_train, 'input2':X2_train, 'output':y_train}, nb_epoch=10)
predictions = graph.predict({'input1':X_test, 'input2':X2_test})
{code}
And the perhaps API may look like this:
{code}
val graph = Graph()
graph.addInput(name="input1", path='...')
graph.addInput(name="input2", path='...')
graph.addSQLNode(name="sql", inputs=["input1", "input2"], sql="select * from ... join ...")
graph.addNode(name="tfidf", transformer=...)
...
graph.addOutput(name="output")
{code})
> spark.ml API taking Graph instead of DataFrame
> ----------------------------------------------
>
> Key: SPARK-7258
> URL: https://issues.apache.org/jira/browse/SPARK-7258
> Project: Spark
> Issue Type: New Feature
> Components: GraphX, ML
> Reporter: Joseph K. Bradley
>
> It would be useful to have an API in ML Pipelines for working with Graphs, not just DataFrames.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: issues-unsubscribe@spark.apache.org
For additional commands, e-mail: issues-help@spark.apache.org