<jupyter_start><jupyter_text>Let's plot the box plot to see the distribution and the percentiles of the categorical data<jupyter_code>plt.figure(figsize=(12,8))

for feature in category:
    sns.boxplot(x=feature,y='price',data=df.sort_values('price'))
    plt.show()<jupyter_output><empty_output><jupyter_text>Lets plot the countplot for the categorical variables<jupyter_code>plt.figure(figsize=(15,8))
for feature in category:
    sns.countplot(df[feature])
    plt.show()
conti=[feature for feature in df.columns if len(df[feature].unique())>25]
conti<jupyter_output><empty_output><jupyter_text>Let's see if the given continuous data are normally distributed or not<jupyter_code>plt.figure(figsize=(12,8))
for feature in conti:
    sns.distplot(df[feature])
    plt.show()<jupyter_output>/home/suman/anaconda3/lib/python3.8/site-packages/seaborn/distributions.py:2551: FutureWarning: `distplot` is a deprecated function and will be removed in a future version. Please adapt your code to use either `displot` (a figure-level function with similar flexibility) or `histplot` (an axes-level function for histograms).
  warnings.warn(msg, FutureWarning)<jupyter_text>All the data seems to be normally distributed and  now we can do feature engineering<jupyter_code># Let's change the categorical variable to the numerical value
category
from sklearn.preprocessing import LabelEncoder
lbl=LabelEncoder()
for feature in category:
    df[feature]=lbl.fit_transform(df[feature])
df.head()
# since the id is not important we can drop that feature 
df.drop('ID',axis=1,inplace=True,)
df.head()<jupyter_output><empty_output><jupyter_text>Let's see the correlation between the features and the price<jupyter_code>plt.figure(figsize=(20,15))
sns.heatmap(df.corr(),annot=True)
## let's drop some features having low correlation with the price

x=df.drop(['make','price','city-mpg','peak-rpm'],axis=1)
y=df['price']
from sklearn.model_selection import train_test_split
x_train,x_test,y_train,y_test=train_test_split(x,y,test_size=0.2)
from sklearn.ensemble import AdaBoostRegressor
model=AdaBoostRegressor()
model.fit(x_train,y_train)
score=model.score(x_test,y_test)
score
y_pred=model.predict(x_test)
y_pred<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.11175942549371634, 'fraction_numerical': 0.011669658886894075, 'mean_word_length': 7.475285171102661, 'pattern_counts': {'":': 0, '<': 20, '<?xml version=': 0, '>': 21, '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': '5', 'dir': 'jupyter-structured-clean-dedup', 'id': '451655', 'license': 'Apache-2.0', 'n_tokens_mistral': 769, 'n_tokens_neox': 737, 'n_words': 182, 'path': 'Day3/CarPricePrediction.ipynb', 'repo_name': 'golesuman/66-days-of-data-challenge-', 'size': '2228'}