You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@systemml.apache.org by "Tommy Yu (JIRA)" <ji...@apache.org> on 2016/06/16 14:44:05 UTC
[jira] [Created] (SYSTEMML-765) MLContext return matrix with 0-base
index
Tommy Yu created SYSTEMML-765:
---------------------------------
Summary: MLContext return matrix with 0-base index
Key: SYSTEMML-765
URL: https://issues.apache.org/jira/browse/SYSTEMML-765
Project: SystemML
Issue Type: Bug
Components: APIs
Affects Versions: SystemML 0.10
Reporter: Tommy Yu
Priority: Minor
Run below code in spark-shell, but get 0-base index matrix. Mike said it maybe a issues for SystemML.
import org.apache.sysml.api.MLContext
import org.apache.sysml.api.MLOutput
val mlNew = new MLContext(sc)
mlNew.registerOutput("outputMatrix")
val outNew = mlNew.executeScript("""
outputMatrix = matrix(0,5,1);
write(outputMatrix,"tempOut","csv");
""")
outNew.getDF(sqlContext, "Prediction")
Get result:
+---+---+
| ID| C1|
+---+---+
|0.0|0.0|
|1.0|0.0|
|2.0|0.0|
|3.0|0.0|
|4.0|0.0|
+---+---+
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)