Answered step by step
Verified Expert Solution
Link Copied!

Question

00
1 Approved Answer

I have a issue in generating pearson and spearman correlation and generating heatmap only using numpy and scipy. when i worked on pairplot, it gave

I have a issue in generating pearson and spearman correlation and generating heatmap only using numpy and scipy. when i worked on pairplot, it gave me right result, however when i extend the same for heat map, it doesnt work. However when i use seaborn and pandas, i get the desired output. I am not sure where the mistake is? can you guide with correct commands in python
Ex: these are numpy data
columns_of_interest =[1,0,2,6,3]
x_data = x[:, columns_of_interest]
variables =['T ,'E,'C,'F','D']
when i use pandas:
i create dataframe : pd.Dataframe[x_data,columns=variables]
after that, i can find correlation values for pearson and spearman and plot heatmap
however, numpy and scipy is not working. it generates Nan Value. for the same data, why seaborn and pandas work and not numpy and scipy. do i need to do anything in the data set.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access with AI-Powered Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Students also viewed these Databases questions