2017-05-27 19 views
0

kdツリーの構築方法が不思議です。私はすでにウェブで見つけて見つけたkdtreeしかし、残念なことにそれは実装されていません。なぜならSklearnのKD Treeにはメソッドquer_range sk KDtreeがあるからです。コードを検索できるサイトはありますか?sk学習のKDツリーの実装

答えて

2

複数のファイルに分割されています。 function you mentionedを定義することがBinaryTreeから継承だと

cdef class KDTree(BinaryTree) 

意味、、:あなたが表示されますあなたのリンクされたファイルの先頭で

この(BinaryTree)ファイル内にもいくつかのコメント:

# Implementation Notes 
# -------------------- 
# This implementation uses the common object-oriented approach of having an 
# abstract base class which is extended by the KDTree and BallTree 
# specializations. 
# 
# The BinaryTree "base class" is defined here and then subclassed in the BallTree 
# and KDTree pyx files. These files include implementations of the 
# "abstract" methods. 

だから、この特別なファイルの中に、あなたは、いくつかの抽象メソッドは、基本クラスからquery_radius -methodを作るのに十分である規定されているにリンクされています作業。