You are viewing a plain text version of this content. The canonical link for it is here.
Posted to reviews@spark.apache.org by GitBox <gi...@apache.org> on 2019/12/01 06:18:07 UTC

[GitHub] [spark] viirya edited a comment on issue #26722: [SPARK-24666][ML] Fix infinity vectors produced by Word2Vec when numIterations are large

viirya edited a comment on issue #26722: [SPARK-24666][ML] Fix infinity vectors produced by Word2Vec when numIterations are large
URL: https://github.com/apache/spark/pull/26722#issuecomment-560061826
 
 
   I ran the test shown in the description. With the number of partitions increasing from 1:
   
   
   numPartitions = 1:
   ```
   Training model...                   
   +-------------+--------------------+
   |         word|              vector|
   +-------------+--------------------+
   |     Unspoken|[-1.1236536502838...|
   |       Talent|[0.25907281041145...|
   |    Hourglass|[-0.1529812067747...|
   |Nickelodeon's|[0.56294345855712...|
   |      Priests|[-0.6632155776023...|
   |    Religion:|[-0.2995840609073...|
   |           Bu|[-0.1570600569248...|
   |      Totoro:|[-0.6866843700408...|
   |     Trouble,|[-0.0878739282488...|
   |       Hatter|[0.30810326337814...|
   |          '79|[0.30140322446823...|
   |         Vile|[0.24635089933872...|
   |         9/11|[-0.0068172565661...|
   |      Santino|[0.02316198870539...|
   |      Motives|[0.01498097740113...|
   |          '13|[0.41122323274612...|
   |       Fierce|[-0.5384349822998...|
   |       Stover|[-0.1143656522035...|
   |          'It|[0.64874994754791...|
   |        Butts|[0.30401131510734...|
   +-------------+--------------------+
   only showing top 20 rows
   ```
   
   numPartitions = 5:
   ```
   Training model...
   +-------------+--------------------+
   |         word|              vector|
   +-------------+--------------------+
   |     Unspoken|[-6.7764405751741...|
   |       Talent|[-9.6067479920091...|
   |    Hourglass|[-5.7962791272710...|
   |Nickelodeon's|[-5.5408793368190...|
   |      Priests|[-3.4655685116755...|
   |    Religion:|[1.75421539703848...|
   |           Bu|[5.605338120192E1...|
   |      Totoro:|[-7.3925109040147...|
   |     Trouble,|[-8.3033904E7,1.2...|
   |       Hatter|[8.05359369958017...|
   |          '79|[6.48125380885584...|
   |         Vile|[-1.1937402140810...|
   |         9/11|[7.41007681173124...|
   |      Santino|[2.34601249830338...|
   |      Motives|[1.62917771495709...|
   |          '13|[2.42768495215902...|
   |       Fierce|[-2.9470496032303...|
   |       Stover|[-1.6529095739310...|
   |          'It|[-2.644077182976E...|
   |        Butts|[1.79399782848582...|
   +-------------+--------------------+
   only showing top 20 rows
   ```
   ...
   
   numPartitions = 20:
   ```
   Training model...
   +-------------+--------------------+
   |         word|              vector|
   +-------------+--------------------+
   |     Unspoken|[-2.6176356140015...|
   |       Talent|[-5.5199353538505...|
   |    Hourglass|[1.86132916555005...|
   |Nickelodeon's|[-9.0021568288662...|
   |      Priests|[-7.5406975123998...|
   |    Religion:|[5.01159335080765...|
   |           Bu|[9.12173977905292...|
   |      Totoro:|[2.22915976975771...|
   |     Trouble,|[2.96316624467027...|
   |       Hatter|[1.68119056598216...|
   |          '79|[3.15082808602809...|
   |         Vile|[1.25104734842133...|
   |         9/11|[-1.3190123545398...|
   |      Santino|[-8.8219865210421...|
   |      Motives|[1.21626889307140...|
   |          '13|[-3.9497276817527...|
   |       Fierce|[-5.7803542675530...|
   |       Stover|[3.02013414112860...|
   |          'It|[5.61268932083837...|
   |        Butts|[1.12267731121987...|
   +-------------+--------------------+
   only showing top 20 rows
   ```
   
   numPartitions = 25, infinity vectors show up:
   ```
   Training model...
   +-------------+--------------------+
   |         word|              vector|
   +-------------+--------------------+
   |     Unspoken|[-1.1421569937574...|
   |       Talent|[-Infinity,-Infin...|
   |    Hourglass|[-9.5144596513321...|
   |Nickelodeon's|[-2.6736808943986...|
   |      Priests|[-3.2282427842550...|
   |    Religion:|[5.17546632302999...|
   |           Bu|[1.75799700304267...|
   |      Totoro:|[-7.4863996312756...|
   |     Trouble,|[-5.0377472139952...|
   |       Hatter|[-2.3868325167321...|
   |          '79|[6.10459795780245...|
   |         Vile|[-3.5907428812103...|
   |         9/11|[-Infinity,Infini...|
   |      Santino|[-3.9457649799987...|
   |      Motives|[-5.8161171272514...|
   |          '13|[-5.9268523384381...|
   |       Fierce|[-Infinity,-Infin...|
   |       Stover|[-7.4122975091097...|
   |          'It|[1.19725408831668...|
   |        Butts|[Infinity,Infinit...|
   +-------------+--------------------+
   only showing top 20 rows
   ```

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: reviews-unsubscribe@spark.apache.org
For additional commands, e-mail: reviews-help@spark.apache.org