Visualize-ML / Book3_Elements-of-Mathematics

Book_3_《数学要素》 | 鸢尾花书:从加减乘除到机器学习;上架;欢迎继续纠错,纠错多的同学还会有赠书!
6.05k stars 1.04k forks source link

Book3_Ch21代码—一点修改 #152

Closed LONG-tian21 closed 3 months ago

LONG-tian21 commented 5 months ago

姜老师: 你好,在本节代码中,154行我觉得存在一点问题,如果直接采用iris_sns.cov()进行协方差计算存在问题,有一列数据是string格式,我觉得应当把iris数据集的最后一列去除掉以后再进行计算,改为iris_sns.iloc[:,:-1].cov()1 2 3

Visualize-ML commented 5 months ago

确实是不够准确,标签在计算cov时,忽略了,不会报错,但是有警告。

请继续批评指正

On Sat, Feb 17, 2024 at 5:41 PM LONG-tian21 @.***> wrote:

姜老师: 你好,在本节代码中,154行我觉得存在一点问题,如果直接采用iris_sns.cov() 进行协方差计算存在问题,有一列数据是string格式,我觉得应当把iris数据集的最后一列去除掉以后再进行计算,改为 iris_sns.iloc[:,:-1].cov()。 1.png (view on web) https://github.com/Visualize-ML/Book3_Elements-of-Mathematics/assets/147016054/3f0fb153-e4b2-4f93-8914-54b7b23de9db 2.png (view on web) https://github.com/Visualize-ML/Book3_Elements-of-Mathematics/assets/147016054/d55c5828-3963-46b5-b8f8-6ed56d4de664 3.png (view on web) https://github.com/Visualize-ML/Book3_Elements-of-Mathematics/assets/147016054/83fb5c0c-ba2a-4b63-8be5-4a467821276f

— Reply to this email directly, view it on GitHub https://github.com/Visualize-ML/Book3_Elements-of-Mathematics/issues/152, or unsubscribe https://github.com/notifications/unsubscribe-auth/AZHC6VZBPAKFZXO2K4R67C3YUB3LDAVCNFSM6AAAAABDNF2IM6VHI2DSMVQWIX3LMV43ASLTON2WKOZSGEZTSOJRHE2TMOI . You are receiving this because you are subscribed to this thread.Message ID: @.***>