Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

第三章 #52

Open
258728 opened this issue Jan 24, 2021 · 0 comments
Open

第三章 #52

258728 opened this issue Jan 24, 2021 · 0 comments

Comments

@258728
Copy link

258728 commented Jan 24, 2021

def init(self, k=1):
self.k = k
self.kdtree = None

# 构建kd tree
def _fit(self, X, depth=0):
    try:
        k = self.k
    except IndexError as e:
        return None
    # 这里可以展开,通过方差选择axis
    axis = depth % k

维度k取1,坐标轴始终是零!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant