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

Zwleisa patch #632

Open
wants to merge 7 commits into
base: master
Choose a base branch
from
Open

Zwleisa patch #632

wants to merge 7 commits into from

Conversation

zwleisa
Copy link

@zwleisa zwleisa commented Feb 13, 2024

y = (iris["target"] == 2).astype(np.int) 改为y = (iris["target"] == 2).astype(np.int32)

Copy link

Check out this pull request on  ReviewNB

See visual diffs & provide feedback on Jupyter Notebooks.


Powered by ReviewNB

decision_boundary = X_new[y_proba[:, 1] >= 0.5]会报ValueError: setting an array element with a sequence. The requested array has an inhomogeneous shape after 1 dimensions. The detected shape was (2,) + inhomogeneous part.的错误。需要改为decision_boundary = X_new[y_proba[:, 1] >= 0.5][0,0]
float("inf") 表示正无穷大,而在支持向量机(SVM)中,C 参数通常是一个正的浮点数,用于控制正则化的强度。将 C 设置为正无穷可能会导致数值不稳定或计算错误。
numpy不支持np.int的写法
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

Successfully merging this pull request may close these issues.

1 participant