In addition to Weibo, there is also WeChat
Please pay attention

WeChat public account
Shulou
 
            
                     
                
2025-11-01 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article introduces you to the introduction of python needs to master the relevant coefficient of drawing heat map display, the content is very detailed, interested friends can refer to, hope to be helpful to you.
The data set used is still the seed data of the three wheat varieties mentioned earlier.
Those who need sample data can leave a message directly.
The data set includes seven indicators of three varieties of wheat seeds, which are
An area B perimeter C compactness LK length WK width A_coef skewness coefficient LKG groin length
 
The last variable of image.png, target, is the species to which wheat belongs, which is 0meml, respectively.
It would be nice to use python to install anaconda3 directly on your computer for the first time. I have previously recorded a video for introduction, which can be referred to.
The first step is to start jupyter lab (I am using a computer with win10 system)
Win+ shortcut key enter cmd press enter to open the command line window, and then enter jupyter lab on the command line
 
Press enter key jupyter lab to launch in the default browser
Click python3 under Notebook to create a new window
Image.png
The next step is to enter the command.
Import pandas module to read data import pandas as pd
Df = pd.read_csv ("D://Rstudio_default_working/kaggle/Seed_Data.csv")
Df.head ()
Image.png removes the last column target because df1 = df.drop ('target',axis=1) is not needed to calculate the correlation coefficient
The next step for image.png is to import the seaborn module to draw the heat map of the correlation coefficient.
Https://heartbeat.fritz.ai/seaborn-heatmaps-13-ways-to-customize-correlation-matrix-visualizations-f1c49c816f07 is referenced here.
Import seaborn as sns
Sns.heatmap (df.corr ())
Image.png
Display correlation coefficient
Sns.heatmap (df.corr (), annot=True)
Image.png
The default of correlation analysis here seems to be Pearson correlation analysis.
Change other methods
Image.pngimage.png on the introduction to python need to master the relevant coefficient of drawing heat map display to share here, I hope that the above content can be of some help to you, can learn more knowledge. If you think the article is good, you can share it for more people to see.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

The market share of Chrome browser on the desktop has exceeded 70%, and users are complaining about

The world's first 2nm mobile chip: Samsung Exynos 2600 is ready for mass production.According to a r


A US federal judge has ruled that Google can keep its Chrome browser, but it will be prohibited from

Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope





 
             
            About us Contact us Product review car news thenatureplanet
More Form oMedia: AutoTimes. Bestcoffee. SL News. Jarebook. Coffee Hunters. Sundaily. Modezone. NNB. Coffee. Game News. FrontStreet. GGAMEN
© 2024 shulou.com SLNews company. All rights reserved.