首页 诗词 字典 板报 句子 名言 友答 励志 学校 网站地图
当前位置: 首页 > 教程频道 > 服务器 > 云计算 >

seq2sparse(四)之PartialVectorMergeReducer源码分析

2013-10-08 
seq2sparse(4)之PartialVectorMergeReducer源码分析继前篇blogseq2sparse(3)之TFParitialVectorReducer源

seq2sparse(4)之PartialVectorMergeReducer源码分析

继前篇blogseq2sparse(3)之TFParitialVectorReducer源码分析 之后,继续分析下面的代码,本次分析的是PartialVectorMergeReducer的源码,这个reducer是下面的函数调用的:

  • --norm (-n) norm                    The norm to use, expressed as either a      
  •                                       float or "INF" if you want to use the       
  •                                       Infinite norm.  Must be greater or equal    
  •                                       to 0.  The default is not to normalize可以看到它的默认值是not to normalize,其实就是-1;

    下面分析reduce:(源码如下:)


    这里说看出一二是指,前面两次的value值中的单词顺序不是按照一样的规则排序的,如果你把所有的value值都拷贝下来,前后两次对比,就会发现,是一样的。


    分享,快乐,成长


    转载请注明出处:http://blog.csdn.net/fansy1990 



  • 热点排行