[ Skip to the content ]

Institute of Formal and Applied Linguistics Wiki


[ Back to the navigation ]

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
Next revision Both sides next revision
spark:spark-introduction [2014/11/04 09:39]
straka
spark:spark-introduction [2014/11/11 08:57]
straka
Line 7: Line 7:
 To run interactive Python shell in local Spark mode, run (on your local workstation or on cluster) To run interactive Python shell in local Spark mode, run (on your local workstation or on cluster)
   IPYTHON=1 pyspark   IPYTHON=1 pyspark
-The IPYTHON=1 parameter instructs Spark to use ''ipython'' instead of ''python'' (the ''ipython'' is an enhanced interactive shell than Python). If you do not want ''ipython'' or you do not have it installed (it is installed everywhere on the cluster, but maybe not on your local workstations -- ask our IT if you want it), leave out the ''IPYTHON=1''.+The IPYTHON=1 parameter instructs Spark to use ''ipython'' instead of ''python'' (the ''ipython'' is an enhanced interactive shell than Python). If you do not want ''ipython'' or you do not have it installed (it is installed everywhere on the cluster, but maybe not on your local workstations -- ask our IT if you want it), use only ''pyspark''.
  
 After a local Spark executor is started, the Python shell starts. Severel lines above After a local Spark executor is started, the Python shell starts. Severel lines above
Line 63: Line 63:
  
 ===== K-Means Example ===== ===== K-Means Example =====
-To show an example of iterative algorithm, consider [[http://en.wikipedia.org/wiki/K-means_clustering|Standard iterative K-Means algorithm]].+An example implementing [[http://en.wikipedia.org/wiki/K-means_clustering|Standard iterative K-Means algorithm]] follows:
 <file python> <file python>
 import numpy as np import numpy as np

[ Back to the navigation ] [ Back to the content ]