Quantcast
Channel: Data Science, Analytics and Big Data discussions - Latest topics
Viewing all articles
Browse latest Browse all 4448

Python: How to use box-cox to transform right skewed data to normal distribution?

$
0
0

@shubham.jain wrote:

Hello.
I was solving big mart sales problem from Analytics Vidhya. Here, one of the feature 'Item_Visibility' has distribution has shown below.

I tried using the code:
from scipy.stats import boxcox
train['Item_Visibility'] = boxcox(train['Item_Visibility'])

But it produced an error "ValueError: Length of values does not match length of index"

So how can i use box-cox transformation in python to transform this to a normal distribution?

Thanks
Shubham

Posts: 1

Participants: 1

Read full topic


Viewing all articles
Browse latest Browse all 4448

Trending Articles