Repository: incubator-systemml Updated Branches: refs/heads/master db92414b1 -> a3e7e5c49
[SYSTEMML-1605] Updated zeppelin tutorial notebook Closes #495. Project: http://git-wip-us.apache.org/repos/asf/incubator-systemml/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-systemml/commit/a3e7e5c4 Tree: http://git-wip-us.apache.org/repos/asf/incubator-systemml/tree/a3e7e5c4 Diff: http://git-wip-us.apache.org/repos/asf/incubator-systemml/diff/a3e7e5c4 Branch: refs/heads/master Commit: a3e7e5c49678ca6fc9683a5f1c56ea39381765e1 Parents: db92414 Author: Glenn Weidner <gweid...@us.ibm.com> Authored: Fri May 12 12:20:42 2017 -0700 Committer: Glenn Weidner <gweid...@us.ibm.com> Committed: Fri May 12 12:20:43 2017 -0700 ---------------------------------------------------------------------- samples/zeppelin-notebooks/tutorial1_zeppelin.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-systemml/blob/a3e7e5c4/samples/zeppelin-notebooks/tutorial1_zeppelin.json ---------------------------------------------------------------------- diff --git a/samples/zeppelin-notebooks/tutorial1_zeppelin.json b/samples/zeppelin-notebooks/tutorial1_zeppelin.json index a0385dd..e71b58c 100644 --- a/samples/zeppelin-notebooks/tutorial1_zeppelin.json +++ b/samples/zeppelin-notebooks/tutorial1_zeppelin.json @@ -1 +1 @@ -{"paragraphs":[{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1460062914890_499572682","id":"20160407-210154_742995576","dateCreated":"Apr 7, 2016 9:01:54 PM","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:354","text":"%dep\r\nz.load(\"org.apache.systemml:systemml:0.9.0-incubating\")","dateUpdated":"Apr 8, 2016 12:30:17 AM","dateFinished":"Apr 7, 2016 9:04:46 PM","dateStarted":"Apr 7, 2016 9:04:46 PM","result":{"code":"SUCCESS","type":"TEXT","msg":"res1: org.apache.zeppelin.spark.dep.Dependency = org.apache.zeppelin.spark.dep.Dependency@2652117f\n"}},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph _1460063047961_207364377","id":"20160407-210407_1127760007","dateCreated":"Apr 7, 2016 9:04:07 PM","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:375","dateUpdated":"Apr 7, 2016 9:04:46 PM","dateFinished":"Apr 7, 2016 9:05:10 PM","dateStarted":"Apr 7, 2016 9:04:46 PM","result":{"code":"SUCCESS","type":"TEXT","msg":"import org.apache.sysml.api.MLContext\n"},"text":"import org.apache.sysml.api.MLContext"},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1460063086400_-566304364","id":"20160407-210446_523705226","dateCreated":"Apr 7, 2016 9:04:46 PM","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:395","dateUpdated":"Apr 7, 2016 9:44:43 PM","dateFinished":"Apr 7, 2016 9:44:44 PM","dateStarted":"Apr 7, 2016 9:44:43 PM","result":{"code":"SUCCESS","type":"TEXT"," msg":"import org.apache.spark.sql.SQLContext\nsqlCtx: org.apache.spark.sql.SQLContext = org.apache.spark.sql.SQLContext@44252a8a\nml: org.apache.sysml.api.MLContext = org.apache.sysml.api.MLContext@f5ff11c\ndml: String = \n\"\nX = rand(rows=100, cols=10)\nsumX = sum(X)\noutMatrix = matrix(sumX, rows=1, cols=1)\nwrite(outMatrix, \" \", format=\"csv\")\n\"\nout: org.apache.sysml.api.MLOutput = org.apache.sysml.api.MLOutput@7f2976c4\noutMatrix: org.apache.spark.sql.DataFrame = [ID: double, C1: double]\n"},"text":"import org.apache.spark.sql.SQLContext\nval sqlCtx = new SQLContext(sc)\nval ml = new MLContext(sc)\nval dml = \"\"\"\nX = rand(rows=100, cols=10)\nsumX = sum(X)\noutMatrix = matrix(sumX, rows=1, cols=1)\nwrite(outMatrix, \" \", format=\"csv\")\n\"\"\"\nml.reset()\nml.registerOutput(\"outMatrix\")\nval out = ml.executeScript(dml)\nval outMatrix = out.getDF(sqlCtx, \"outMatrix\")"},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"value s":[],"groups":[],"scatter":{}},"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1460063826194_1965196735","id":"20160407-211706_2075868632","dateCreated":"Apr 7, 2016 9:17:06 PM","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:413","dateUpdated":"Apr 7, 2016 9:45:23 PM","dateFinished":"Apr 7, 2016 9:45:23 PM","dateStarted":"Apr 7, 2016 9:45:23 PM","result":{"code":"SUCCESS","type":"TEXT","msg":"+---+------------------+\n| ID| C1|\n+---+------------------+\n|0.0|508.60328663270093|\n+---+------------------+\n\n"},"text":"outMatrix.show()"},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true,"editorMode":"ace/mode/sh"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1460065523381_66686365","id":"20160407-214523_1983686952","dateCreated":"Apr 7, 2016 9:45:23 PM","status":"FINISHED","progressUpda teIntervalMs":500,"$$hashKey":"object:506","dateUpdated":"Apr 7, 2016 9:50:27 PM","dateFinished":"Apr 7, 2016 9:50:31 PM","dateStarted":"Apr 7, 2016 9:50:27 PM","result":{"code":"SUCCESS","type":"TEXT","msg":"--2016-04-07 21:50:28-- https://sparktc.ibmcloud.com/repo/latest/SystemML.jar\nResolving sparktc.ibmcloud.com (sparktc.ibmcloud.com)... 169.54.146.42\nConnecting to sparktc.ibmcloud.com (sparktc.ibmcloud.com)|169.54.146.42|:443... connected.\nHTTP request sent, awaiting response... 200 OK\nLength: 6299395 (6.0M) [application/x-java-archive]\nSaving to: 'SystemML.jar'\n\n 0K .......... .......... .......... .......... .......... 0% 261K 23s\n 50K .......... .......... .......... .......... .......... 1% 390K 19s\n 100K .......... .......... .......... .......... .......... 2% 777K 15s\n 150K .......... .......... .......... .......... .......... 3% 391K 15s\n 200K .......... .......... .......... .......... .......... 4% 779K 14s\n 250K .......... ..... ..... .......... .......... .......... 4% 777K 12s\n 300K .......... .......... .......... .......... .......... 5% 781K 12s\n 350K .......... .......... .......... .......... .......... 6% 780K 11s\n 400K .......... .......... .......... .......... .......... 7% 782K 11s\n 450K .......... .......... .......... .......... .......... 8% 781K 10s\n 500K .......... .......... .......... .......... .......... 8% 784K 10s\n 550K .......... .......... .......... .......... .......... 9% 69.8M 9s\n 600K .......... .......... .......... .......... .......... 10% 783K 9s\n 650K .......... .......... .......... .......... .......... 11% 785K 8s\n 700K .......... .......... .......... .......... .......... 12% 72.6M 8s\n 750K .......... .......... .......... .......... .......... 13% 785K 8s\n 800K .......... .......... .......... .......... .......... 13% 784K 8s\n 850K .......... .......... .......... .......... .......... 14% 69.5M 7s\n 900K ...... .... .......... .......... .......... .......... 15% 785K 7s\n 950K .......... .......... .......... .......... .......... 16% 73.5M 7s\n 1000K .......... .......... .......... .......... .......... 17% 787K 7s\n 1050K .......... .......... .......... .......... .......... 17% 68.8M 6s\n 1100K .......... .......... .......... .......... .......... 18% 789K 6s\n 1150K .......... .......... .......... .......... .......... 19% 66.6M 6s\n 1200K .......... .......... .......... .......... .......... 20% 788K 6s\n 1250K .......... .......... .......... .......... .......... 21% 72.4M 6s\n 1300K .......... .......... .......... .......... .......... 21% 792K 5s\n 1350K .......... .......... .......... .......... .......... 22% 72.9M 5s\n 1400K .......... .......... .......... .......... .......... 23% 785K 5s\n 1450K .......... .......... .......... .......... .......... 24% 73.4M 5s\n 1500K .......... .......... .......... .......... .......... 25% 76.9M 5s\n 1550K .. ........ .......... .......... .......... .......... 26% 794K 5s\n 1600K .......... .......... .......... .......... .......... 26% 55.5M 5s\n 1650K .......... .......... .......... .......... .......... 27% 792K 5s\n 1700K .......... .......... .......... .......... .......... 28% 76.9M 4s\n 1750K .......... .......... .......... .......... .......... 29% 799K 4s\n 1800K .......... .......... .......... .......... .......... 30% 48.1M 4s\n 1850K .......... .......... .......... .......... .......... 30% 53.7M 4s\n 1900K .......... .......... .......... .......... .......... 31% 800K 4s\n 1950K .......... .......... .......... .......... .......... 32% 42.3M 4s\n 2000K .......... .......... .......... .......... .......... 33% 799K 4s\n 2050K .......... .......... .......... .......... .......... 34% 45.4M 4s\n 2100K .......... .......... .......... .......... .......... 34% 73.8M 4s\n 2150K .......... .......... .......... .......... .......... 35% 802K 4s\n 2200 K .......... .......... .......... .......... .......... 36% 44.1M 3s\n 2250K .......... .......... .......... .......... .......... 37% 74.8M 3s\n 2300K .......... .......... .......... .......... .......... 38% 802K 3s\n 2350K .......... .......... .......... .......... .......... 39% 58.0M 3s\n 2400K .......... .......... .......... .......... .......... 39% 52.0M 3s\n 2450K .......... .......... .......... .......... .......... 40% 803K 3s\n 2500K .......... .......... .......... .......... .......... 41% 68.7M 3s\n 2550K .......... .......... .......... .......... .......... 42% 54.0M 3s\n 2600K .......... .......... .......... .......... .......... 43% 67.7M 3s\n 2650K .......... .......... .......... .......... .......... 43% 802K 3s\n 2700K .......... .......... .......... .......... .......... 44% 72.4M 3s\n 2750K .......... .......... .......... .......... .......... 45% 76.8M 3s\n 2800K .......... .......... .......... .......... .......... 46% 802K 3s\n 2850K .......... .......... .......... .......... .......... 47% 68.9M 3s\n 2900K .......... .......... .......... .......... .......... 47% 72.7M 2s\n 2950K .......... .......... .......... .......... .......... 48% 71.4M 2s\n 3000K .......... .......... .......... .......... .......... 49% 805K 2s\n 3050K .......... .......... .......... .......... .......... 50% 59.7M 2s\n 3100K .......... .......... .......... .......... .......... 51% 74.2M 2s\n 3150K .......... .......... .......... .......... .......... 52% 78.6M 2s\n 3200K .......... .......... .......... .......... .......... 52% 811K 2s\n 3250K .......... .......... .......... .......... .......... 53% 68.5M 2s\n 3300K .......... .......... .......... .......... .......... 54% 78.7M 2s\n 3350K .......... .......... .......... .......... .......... 55% 76.8M 2s\n 3400K .......... .......... .......... .......... .......... 56% 74.2M 2s\n 3450K .......... .......... .......... .......... .......... 56% 810K 2s \n 3500K .......... .......... .......... .......... .......... 57% 69.7M 2s\n 3550K .......... .......... .......... .......... .......... 58% 75.6M 2s\n 3600K .......... .......... .......... .......... .......... 59% 64.1M 2s\n 3650K .......... .......... .......... .......... .......... 60% 84.3M 2s\n 3700K .......... .......... .......... .......... .......... 60% 813K 2s\n 3750K .......... .......... .......... .......... .......... 61% 68.7M 2s\n 3800K .......... .......... .......... .......... .......... 62% 59.3M 1s\n 3850K .......... .......... .......... .......... .......... 63% 78.6M 1s\n 3900K .......... .......... .......... .......... .......... 64% 79.4M 1s\n 3950K .......... .......... .......... .......... .......... 65% 819K 1s\n 4000K .......... .......... .......... .......... .......... 65% 32.7M 1s\n 4050K .......... .......... .......... .......... .......... 66% 62.5M 1s\n 4100K .......... .......... .......... .......... .......... 67% 80.1 M 1s\n 4150K .......... .......... .......... .......... .......... 68% 67.0M 1s\n 4200K .......... .......... .......... .......... .......... 69% 71.9M 1s\n 4250K .......... .......... .......... .......... .......... 69% 827K 1s\n 4300K .......... .......... .......... .......... .......... 70% 44.6M 1s\n 4350K .......... .......... .......... .......... .......... 71% 77.6M 1s\n 4400K .......... .......... .......... .......... .......... 72% 62.9M 1s\n 4450K .......... .......... .......... .......... .......... 73% 78.9M 1s\n 4500K .......... .......... .......... .......... .......... 73% 832K 1s\n 4550K .......... .......... .......... .......... .......... 74% 39.8M 1s\n 4600K .......... .......... .......... .......... .......... 75% 51.5M 1s\n 4650K .......... .......... .......... .......... .......... 76% 79.2M 1s\n 4700K .......... .......... .......... .......... .......... 77% 80.0M 1s\n 4750K .......... .......... .......... .......... .......... 78% 83.1M 1s\n 4800K .......... .......... .......... .......... .......... 78% 828K 1s\n 4850K .......... .......... .......... .......... .......... 79% 42.5M 1s\n 4900K .......... .......... .......... .......... .......... 80% 58.9M 1s\n 4950K .......... .......... .......... .......... .......... 81% 81.3M 1s\n 5000K .......... .......... .......... .......... .......... 82% 70.3M 1s\n 5050K .......... .......... .......... .......... .......... 82% 82.1M 1s\n 5100K .......... .......... .......... .......... .......... 83% 831K 1s\n 5150K .......... .......... .......... .......... .......... 84% 68.6M 1s\n 5200K .......... .......... .......... .......... .......... 85% 48.0M 0s\n 5250K .......... .......... .......... .......... .......... 86% 73.5M 0s\n 5300K .......... .......... .......... .......... .......... 86% 71.6M 0s\n 5350K .......... .......... .......... .......... .......... 87% 74.0M 0s\n 5400K .......... .......... .......... .......... .......... 88% 67.7M 0s\n 5450K .......... .......... .......... .......... .......... 89% 831K 0s\n 5500K .......... .......... .......... .......... .......... 90% 38.5M 0s\n 5550K .......... .......... .......... .......... .......... 91% 80.7M 0s\n 5600K .......... .......... .......... .......... .......... 91% 58.1M 0s\n 5650K .......... .......... .......... .......... .......... 92% 80.2M 0s\n 5700K .......... .......... .......... .......... .......... 93% 81.6M 0s\n 5750K .......... .......... .......... .......... .......... 94% 814K 0s\n 5800K .......... .......... .......... .......... .......... 95% 77.0M 0s\n 5850K .......... .......... .......... .......... .......... 95% 80.6M 0s\n 5900K .......... .......... .......... .......... .......... 96% 85.3M 0s\n 5950K .......... .......... .......... .......... .......... 97% 83.9M 0s\n 6000K .......... .......... .......... .......... .......... 98% 69.3M 0s\n 6050K .......... .......... .......... .......... ....... ... 99% 834K 0s\n 6100K .......... .......... .......... .......... .......... 99% 77.1M 0s\n 6150K . 100% 3343G=3.0s\n\n2016-04-07 21:50:31 (1.99 MB/s) - 'SystemML.jar' saved [6299395/6299395]\n\n"},"text":"%sh\nwget https://sparktc.ibmcloud.com/repo/latest/SystemML.jar"},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true,"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1460065827533_-970219022","id":"20160407-215027_1832456962","dateCreated":"Apr 7, 2016 9:50:27 PM","status":"ERROR","progressUpdateIntervalMs":500,"$$hashKey":"object:528","dateUpdated":"Apr 7, 2016 9:51:02 PM","dateFinished":"Apr 7, 2016 9:51:02 PM","dateStarted":"Apr 7, 2016 9:51:02 PM","result":{"code":"ERROR","type":"TEXT","msg":"Must be used before SparkInterpreter (%spark) initialized\nHint: put this paragraph before any Spark code and restart Zeppelin/Interpreter"},"text":"%dep\nz.load(\"SystemML.jar\")"},{"config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true},"settings":{"params":{},"forms":{}},"jobName":"paragraph_1460065862398_1266603814","id":"20160407-215102_2146717979","dateCreated":"Apr 7, 2016 9:51:02 PM","status":"READY","progressUpdateIntervalMs":500,"$$hashKey":"object:550"}],"name":"Test MLContext in Zeppelin","id":"2BF3FUMPS","angularObjects":{"2BGXRRNEQ":[],"2BGXC9DMN":[],"2BHJKJYEK":[],"2BGF74GHC":[]},"config":{"looknfeel":"default"},"info":{}} \ No newline at end of file +{"paragraphs":[{"text":"%dep\r\nz.load(\"org.apache.systemml:systemml:0.14.0-incubating\")","user":"anonymous","dateUpdated":"2017-05-12T11:44:50-0700","config":{"colWidth":12,"editorMode":"ace/mode/scala","results":[{"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}}}],"enabled":true,"editorSetting":{"language":"scala"}},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"res0: org.apache.zeppelin.dep.Dependency = org.apache.zeppelin.dep.Dependency@433ae9fc\n"}]},"apps":[],"jobName":"paragraph_1494610315765_971105361","id":"20160407-210154_742995576","dateCreated":"2017-05-12T10:31:55-0700","dateStarted":"2017-05-12T11:44:50-0700","dateFinished":"2017-05-12T11:45:00-0700","status":"FINISHED","progressUpdateIntervalMs":500,"focus":true,"$$hashKey":"object:5689"},{"text":"sc","user":"anonymous","dateUpdated":"2017-05-12T11:45:12-0700","config":{"colWidth":12,"enabled":true,"results":{}," editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\nres0: org.apache.spark.SparkContext = org.apache.spark.SparkContext@167bdf90\n"}]},"apps":[],"jobName":"paragraph_1494614606357_-213824970","id":"20170512-114326_719701142","dateCreated":"2017-05-12T11:43:26-0700","dateStarted":"2017-05-12T11:45:12-0700","dateFinished":"2017-05-12T11:45:24-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5690"},{"text":"sc.version","user":"anonymous","dateUpdated":"2017-05-12T11:45:29-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\nres1: String = 2.1.0\n"}]},"apps":[],"jobName":"paragraph_1494610556791_-90095047","id":"20170512-103556_1836482719","dateCreated":"2017-05-12T10:35:56-0700","dat eStarted":"2017-05-12T11:45:29-0700","dateFinished":"2017-05-12T11:45:29-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5691"},{"text":"spark","user":"anonymous","dateUpdated":"2017-05-12T11:45:32-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\nres2: org.apache.spark.sql.SparkSession = org.apache.spark.sql.SparkSession@5fb3d950\n"}]},"apps":[],"jobName":"paragraph_1494612059615_-422958685","id":"20170512-110059_619823343","dateCreated":"2017-05-12T11:00:59-0700","dateStarted":"2017-05-12T11:45:32-0700","dateFinished":"2017-05-12T11:45:32-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5692"},{"text":"import org.apache.sysml.api.mlcontext._\nimport org.apache.sysml.api.mlcontext.ScriptFactory._","user":"anonymous","dateUpdated":"2017-05-12T11:45:35-0700", "config":{"colWidth":12,"editorMode":"ace/mode/scala","results":[{"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}}}],"enabled":true,"editorSetting":{"language":"scala"}},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\nimport org.apache.sysml.api.mlcontext._\n\nimport org.apache.sysml.api.mlcontext.ScriptFactory._\n"}]},"apps":[],"jobName":"paragraph_1494610315766_972259607","id":"20160407-210407_1127760007","dateCreated":"2017-05-12T10:31:55-0700","dateStarted":"2017-05-12T11:45:35-0700","dateFinished":"2017-05-12T11:45:35-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5693"},{"text":"val ml = new MLContext(spark)","user":"anonymous","dateUpdated":"2017-05-12T11:45:42-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCES S","msg":[{"type":"TEXT","data":"\nml: org.apache.sysml.api.mlcontext.MLContext = org.apache.sysml.api.mlcontext.MLContext@56f9544e\n"}]},"apps":[],"jobName":"paragraph_1494612075970_1862095681","id":"20170512-110115_978861967","dateCreated":"2017-05-12T11:01:15-0700","dateStarted":"2017-05-12T11:45:42-0700","dateFinished":"2017-05-12T11:45:42-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5694"},{"text":"import org.apache.spark.sql._\nimport org.apache.spark.sql.types.{StructType,StructField,DoubleType}\nimport scala.util.Random\n\nval numRows = 1000\nval numCols = 100\nval data = sc.parallelize(0 to numRows-1).map { _ => Row.fromSeq(Seq.fill(numCols)(Random.nextDouble)) }\nval schema = StructType((0 to numCols-1).map { i => StructField(\"C\" + i, DoubleType, true) } )\nval df = sqlContext.createDataFrame(data, schema)","user":"anonymous","dateUpdated":"2017-05-12T11:45:45-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"lang uage":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\nimport org.apache.spark.sql._\n\nimport org.apache.spark.sql.types.{StructType, StructField, DoubleType}\n\nimport scala.util.Random\n\nnumRows: Int = 1000\n\nnumCols: Int = 100\n\ndata: org.apache.spark.rdd.RDD[org.apache.spark.sql.Row] = MapPartitionsRDD[1] at map at <console>:42\nschema: org.apache.spark.sql.types.StructType = StructType(StructField(C0,DoubleType,true), StructField(C1,DoubleType,true), StructField(C2,DoubleType,true), StructField(C3,DoubleType,true), StructField(C4,DoubleType,true), StructField(C5,DoubleType,true), StructField(C6,DoubleType,true), StructField(C7,DoubleType,true), StructField(C8,DoubleType,true), StructField(C9,DoubleType,true), StructField(C10,DoubleType,true), StructField(C11,DoubleType,true), StructField(C12,DoubleType,true), StructField(C13,DoubleType,true), StructField(C14,DoubleType,true), StructField( C15,DoubleType,true), StructField(C16,DoubleType,true), StructField(C17,DoubleType,true), StructField(C18,DoubleType,true), StructField(C19,DoubleType,true), StructField(C20,DoubleType,true), StructField(C21,DoubleType,true), ...\ndf: org.apache.spark.sql.DataFrame = [C0: double, C1: double ... 98 more fields]\n"}]},"apps":[],"jobName":"paragraph_1494613302223_333591160","id":"20170512-112142_1828353367","dateCreated":"2017-05-12T11:21:42-0700","dateStarted":"2017-05-12T11:45:45-0700","dateFinished":"2017-05-12T11:45:51-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5695"},{"text":"val minMaxMean =\n\"\"\"\nminOut = min(Xin)\nmaxOut = max(Xin)\nmeanOut = mean(Xin)\n\"\"\"","user":"anonymous","dateUpdated":"2017-05-12T11:45:55-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\n\n\n\n\n\ nminMaxMean: String =\n\"\nminOut = min(Xin)\nmaxOut = max(Xin)\nmeanOut = mean(Xin)\n\"\n"}]},"apps":[],"jobName":"paragraph_1494613973746_1554581666","id":"20170512-113253_943926853","dateCreated":"2017-05-12T11:32:53-0700","dateStarted":"2017-05-12T11:45:55-0700","dateFinished":"2017-05-12T11:45:55-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5696"},{"text":"val mm = new MatrixMetadata(numRows, numCols)\nval minMaxMeanScript = dml(minMaxMean).in(\"Xin\", df, mm).out(\"minOut\", \"maxOut\", \"meanOut\")","user":"anonymous","dateUpdated":"2017-05-12T11:46:01-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\nmm: org.apache.sysml.api.mlcontext.MatrixMetadata = rows: 1000, columns: 100, non-zeros: None, rows per block: None, columns per block: None\n\n\n\n\n\n\n\n\nminMaxMeanScript: o rg.apache.sysml.api.mlcontext.Script =\nInputs:\n [1] (Dataset as Matrix) Xin: [C0: double, C1: double ... 98 more fields]\n\nOutputs:\n [1] minOut\n [2] maxOut\n [3] meanOut\n"}]},"apps":[],"jobName":"paragraph_1494614017051_-917622","id":"20170512-113337_768342478","dateCreated":"2017-05-12T11:33:37-0700","dateStarted":"2017-05-12T11:46:01-0700","dateFinished":"2017-05-12T11:46:06-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5697"},{"text":"val (min, max, mean) = ml.execute(minMaxMeanScript).getTuple[Double, Double, Double](\"minOut\", \"maxOut\", \"meanOut\")","user":"anonymous","dateUpdated":"2017-05-12T11:46:13-0700","config":{"colWidth":12,"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"results":{"code":"SUCCESS","msg":[{"type":"TEXT","data":"\n\n\nmin: Double = 2.2701668049962542E-5\nmax: Double = 0.9999982074959571\nmean: Double = 0.49901354112086954\n"}]} ,"apps":[],"jobName":"paragraph_1494614064744_-751901503","id":"20170512-113424_1524717418","dateCreated":"2017-05-12T11:34:24-0700","dateStarted":"2017-05-12T11:46:13-0700","dateFinished":"2017-05-12T11:46:15-0700","status":"FINISHED","progressUpdateIntervalMs":500,"$$hashKey":"object:5698"},{"user":"anonymous","dateUpdated":"2017-05-12T11:44:01-0700","config":{"colWidth":12,"graph":{"mode":"table","height":300,"optionOpen":false,"keys":[],"values":[],"groups":[],"scatter":{}},"enabled":true,"results":{},"editorSetting":{"language":"scala"},"editorMode":"ace/mode/scala"},"settings":{"params":{},"forms":{}},"apps":[],"jobName":"paragraph_1494610315774_969181616","id":"20160407-215102_2146717979","dateCreated":"2017-05-12T10:31:55-0700","status":"READY","errorMessage":"","progressUpdateIntervalMs":500,"$$hashKey":"object:5699"}],"name":"tutorial1_zeppelin","id":"2CEYWMUA2","angularObjects":{"2CEM2EBHQ:shared_process":[]},"config":{"looknfeel":"default","personalizedMode":"false"},"in fo":{}} \ No newline at end of file