<jupyter_start><jupyter_text>1. Read the data<jupyter_code>train = pd.read_csv("train.csv")
data = train
data.head()<jupyter_output><empty_output><jupyter_text>2. The ndependent Variable 'SalePrice'<jupyter_code>data['SalePrice'].describe()
sns.distplot(data['SalePrice']);
print("Skewness: %f" % data['SalePrice'].skew())
print("Kurtosis: %f" % data['SalePrice'].kurt())<jupyter_output>Skewness: 1.882876
Kurtosis: 6.536282<jupyter_text>The Salesprice seems to follow a normal distribution, but it has positive skewness and kurtosis  3. Correlation of 'SalePrice' and other variables  3.1 Numerical variables<jupyter_code>#'GrLivArea'
data.plot.scatter(x='GrLivArea', y='SalePrice', ylim=(0,800000));<jupyter_output><empty_output><jupyter_text>There is a positive liner relationship between GrLivArea and SalesPrice.<jupyter_code>data.plot.scatter(x='TotalBsmtSF', y='SalePrice', ylim=(0,800000));<jupyter_output><empty_output><jupyter_text>There is a positive relationship between GrLivArea and SalesPrice. The shape of the chart seems like either a liner or exponential relationship (ignoring outliners)<jupyter_code>data['YearBuilt_To_Today'] = 2017 - data.YearBuilt
data.plot.scatter(x='YearBuilt_To_Today', y='SalePrice', ylim=(0,800000));<jupyter_output><empty_output><jupyter_text>The YearBuilt is tricky. I tranformed it to YearBuilt_To_Today, so it's no longer a category value but a numeric value.   Correlation matrix (heatmap style)<jupyter_code>#correlation matrix
corrmat = data.corr()
f, ax = plt.subplots(figsize=(12, 9))
sns.heatmap(corrmat, vmax=.8, square=True);<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.12965260545905707, 'fraction_numerical': 0.02977667493796526, 'mean_word_length': 8.95679012345679, 'pattern_counts': {'":': 0, '<': 24, '<?xml version=': 0, '>': 24, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '6', 'dir': 'jupyter-structured-clean-dedup', 'id': '423501', 'license': 'MIT', 'n_tokens_mistral': 624, 'n_tokens_neox': 573, 'n_words': 121, 'path': 'House Prices Advanced Regression Techniques/yxu29_EDA.ipynb', 'repo_name': 'topseer/DataScience', 'size': '1612'}