From 0beac4e243f85e71554fe04093b09eb1745fea82 Mon Sep 17 00:00:00 2001 From: Patrick Wendell Date: Fri, 11 Jul 2014 17:23:23 +0000 Subject: Updating docs for 1.0.1 release --- .../python/pyspark.mllib.linalg.Vectors-class.html | 289 +++++++++++++++++++++ 1 file changed, 289 insertions(+) create mode 100644 site/docs/1.0.1/api/python/pyspark.mllib.linalg.Vectors-class.html (limited to 'site/docs/1.0.1/api/python/pyspark.mllib.linalg.Vectors-class.html') diff --git a/site/docs/1.0.1/api/python/pyspark.mllib.linalg.Vectors-class.html b/site/docs/1.0.1/api/python/pyspark.mllib.linalg.Vectors-class.html new file mode 100644 index 000000000..e1a55476e --- /dev/null +++ b/site/docs/1.0.1/api/python/pyspark.mllib.linalg.Vectors-class.html @@ -0,0 +1,289 @@ + + + + + pyspark.mllib.linalg.Vectors + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +
+ + Package pyspark :: + Package mllib :: + Module linalg :: + Class Vectors + + + + + +
[frames] | no frames]
+
+ +

Class Vectors

source code

+
+object --+
+         |
+        Vectors
+
+ +
+

Factory methods for working with vectors. Note that dense vectors are + simply represented as NumPy array objects, so there is no need to covert + them for use in MLlib. For sparse vectors, the factory methods in this + class create an MLlib-compatible type, or users can pass in SciPy's + scipy.sparse column vectors.

+ + + + + + + + + + +
+ Instance Methods
+

Inherited from object: + __delattr__, + __format__, + __getattribute__, + __hash__, + __init__, + __new__, + __reduce__, + __reduce_ex__, + __repr__, + __setattr__, + __sizeof__, + __str__, + __subclasshook__ +

+
+ + + + + + + + + + + + +
+ Static Methods
+   + + + + + + +
sparse(size, + *args)
+ Create a sparse vector, using either a dictionary, a list of +(index, value) pairs, or two separate arrays of indices and +values (sorted by index).
+ source code + +
+ +
+   + + + + + + +
dense(elements)
+ Create a dense vector of 64-bit floats from a Python list.
+ source code + +
+ +
+ + + + + + + + + +
+ Properties
+

Inherited from object: + __class__ +

+
+ + + + + + +
+ Method Details
+ +
+ +
+ + +
+

sparse(size, + *args) +
Static Method +

+
source code  +
+ +
+
+Create a sparse vector, using either a dictionary, a list of
+(index, value) pairs, or two separate arrays of indices and
+values (sorted by index).
+
+@param size: Size of the vector.
+@param args: Non-zero entries, as a dictionary, list of tupes,
+             or two sorted lists containing indices and values.
+
+>>> print Vectors.sparse(4, {1: 1.0, 3: 5.5})
+[1: 1.0, 3: 5.5]
+>>> print Vectors.sparse(4, [(1, 1.0), (3, 5.5)])
+[1: 1.0, 3: 5.5]
+>>> print Vectors.sparse(4, [1, 3], [1.0, 5.5])
+[1: 1.0, 3: 5.5]
+
+
+
+
+
+
+ +
+ +
+ + +
+

dense(elements) +
Static Method +

+
source code  +
+ +

Create a dense vector of 64-bit floats from a Python list. Always + returns a NumPy array.

+
+>>> Vectors.dense([1, 2, 3])
+array([ 1.,  2.,  3.])
+
+
+
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + + -- cgit v1.2.3