Giter Club home page Giter Club logo

pythonairoad's People

Contributors

lyhue1991 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

pythonairoad's Issues

有一处不是不是很明白?

您好,我在看 DBSCAN算法的Spark实现.ipynb 代码时候,有一处不是很明白,希望可以解答一下。
文中在第八步骤

/*================================================================================*/
//  求每一个簇的代表核心和簇元素数量
/*================================================================================*/
....
val rdd_result = rdd_cluster.reduceByKey((a,b)=>{
  val id_set = a._3 | b._3 # 不明白
  val result = if(a._2>=b._2) (a._1,a._2,id_set)
  else (b._1,b._2,id_set)
  result
})
...

在这里,rdd_cluster进行了按照键的归并操作,但是rdd_cluster的已经是聚类的结果了,就说明rdd_cluster的键都是唯一的,没有重复的,所以我认为这一步骤reduceByKey是无用操作,是吗?
第二,如果我的第一的疑问有问题,那么成功运行了reduceByKey的逻辑,但是在reduceByKey的代码中,对相同类的邻居集合进行了并集|操作,为什么邻居数量result._2取的不是id_set的长度,而是Max(a._2,b._2)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.