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

对比sklearn:gamma的取值问题 #6

Open
oahcnauygnid opened this issue Mar 28, 2023 · 0 comments
Open

对比sklearn:gamma的取值问题 #6

oahcnauygnid opened this issue Mar 28, 2023 · 0 comments

Comments

@oahcnauygnid
Copy link

oahcnauygnid commented Mar 28, 2023

在sklearn里对gamma的描述是使用X.var()

gamma : {'scale', 'auto'} or float, default='scale'
        Kernel coefficient for 'rbf', 'poly' and 'sigmoid'.

        - if ``gamma='scale'`` (default) is passed then it uses
          1 / (n_features * X.var()) as value of gamma,
        - if 'auto', uses 1 / n_features.

但目前这里用的是X.std(),

kernel_func = self.register_kernel(X.std())

导致收敛速度很慢,但确实取得了更高的准确度,这是有什么考量吗?

对比大概是
sklearn 时间0.004s 准确度0.9035
X.var()+1阶 时间2.7s 准确度0.9035
X.var()+2阶 时间18s 准确度0.9035
X.std()+1阶 时间15s 准确度0.9649
X.std()+2阶 时间25s 准确度0.9649

@oahcnauygnid oahcnauygnid changed the title gamma的取值问题 对比sklearn:gamma的取值问题 Mar 28, 2023
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