Home>
Currently, we have created a function for searching for cocoons recently using the APIsklearn.neighbors.NearestNeighbors
.
NearestNeighbors
'salgorithm
parameter specifieskd_tree
to improve search efficiency
I can't confirm how the kd tree is built.
sklearn.tree.DecisionTreeClassifier
visible likesklearn.tree.plot_tree
?
I can get the value stored internally inKDTree (X) .__ getstate __ ()
, but I don't know what it means.
I want to see how the tree is divided even if I can't visualize it ...
I'm sorry for being thrown away, but please give me your answer.
-
Answer # 1
Related articles
- python 3x - i want to list the strings as they are
- python - i want to speed up the for statement
- python - i want to scrape the contents of java in (web) html
- python - how to check the character code on mac
- python - i want the block to disappear when the ball hits the block
- python - i want to ignore the header and loop
- i want to pass the python path in bash
- i want to get the full text of rt with tweepy in python
- python - i want to get the elements in the linked site
- python - i want to find the mode of a pixel with a pixel value of 1 or more
- python - i want to determine if the channel is a text channel
- javascript - i want to check if the key exists
- python - i want to set the user name logged in with django to url and jump to my page
- ruby on rails - i want to display the details page
- python - i want to read an image and display it
- python - i want to avoid line breaks in the file path
- python 3x - how to get the value of scrolledtext
- python - i want to know how to keep outputting to csv
- python - delete bom on the command line
- i want to upload the code to github
Related questions
- python 3x - about the calculation of cross entropy in pytorch
- python 3x - i don't know how to tune when doing image classification problem with vgg16 with [pytorch] (i want to get 90% accura
- python - optuna light-library import error in gbm parameter tuning
- python 3x - i get a runtimeerror: size mismatch, in the image classification of pytorch what should i do?
- python - attributeerror: module'chainerfunction' has no attribute'max_pooling_2d'
- python 3x - inflating table data using gan
- python 3x - cnn-what is the average pooling process?
- python - pedestrian age group discrimination using opencv
- python 3x - i want to display the importance extracted by evaluating with random forest as a column graph
- python - tensorflow-gpu recognition takes time
Looking at the source code comments, the tree structure seems to be managed by a one-dimensional array stored in the
node_dataattribute of the
KDTree
object.According to the comment, KDTree.node_data [0] is the root node and the two child nodes of node KDTree.node_data [i] are KDTree.node_data [2 * i + 1] and KDTree.node_data [2 * i + See 2].
See the source code comments for the meaning of each element of KDTree.node_data. (There are about 3000 lines and I don't read all of them, so I don't know the details of the implementation.)
The KDTree class inherits the BinaryTree class, so the following two codes are applicable.
scikit-learn/_binary_tree.pxi
scikit-learn/_kd_tree.pyx
Code to store and confirm 1D array as tree structure