<jupyter_start><jupyter_text>Seabornwhenever you get a datasetyou will be having features like f1, f2, f3, f4and based on the classification and regression problem you will be dividing your dataset and this is with respect to Supervised learning.initailly whenever you have features f1, f2, f3, f4 you need to divide your features into independent and dependent features.f1, f2, f3 -> independent featuresf4 -> dependent featuresf4 is a dependent feature(output)whenever the independent features changes the value of output also changes  Distribution plots- distplot- jointplot- pairplotPractice problem on IRIS Dataset<jupyter_code>import seaborn as sns
df = sns.load_dataset("tips") 

### inside seaborn you will be having dataset tips
df.head()
df.dtypes
### here tip -> is your dependent feature
### total bill, sex, smoker, day, time, size -> these are independent feature

### whenever you are finding a correlation the feature value should be integer or floating type then only you can find the correlation.<jupyter_output><empty_output><jupyter_text>Correlation with HeatmapA correlation heatmap uses colored cells, typically in a monochromatic scale, to show a 2D correlation matrix (table) between two discrete dimensions or event types. It is very important in Feature Selection<jupyter_code>df.corr()
## as the toal bill is increasing the tip is also increasing

## heatmap helps us to find the visualization stuff all we have to privide is that we have to provide the matrix of correlation. 
 sns.heatmap(df.corr())
## The highly correlated is given with one color, then little bit less correlated is given with another color like this the color variant will basically get applied.

## Suppose if there are two independent features and the correlation of those two independent features are same or they are higher towards 1 towards 9 at that time it is possible that you just use one feature instide of two<jupyter_output><empty_output><jupyter_text>JointPlotA join plt allows to study the relationship between 2 numeric variables. The central chart display their correlation. It is usually a scatterplot, a hexbin plot, a 2D histogram or a 2D denity plot  Univariate Analysis(just taking two features here, you can also call it as bivariate but make sure you just have 2 features in joinplot)<jupyter_code>sns.jointplot(x='tip',y='total_bill',data=df,kind='hex')
sns.jointplot(x='tip',y='total_bill',data=df,kind='reg')<jupyter_output><empty_output><jupyter_text>Pair plot- It is used in case of more than 2 independent feature.- A "pairs plot" is also known as scatterplot in which one variable in the same data row is matched with another variable's value. like this: Pair plots are just elaborations on this, showing all variables paired with all the other variables- you have ore than 2 independent features it will just combine it will just do the permutation and combination of all the feature.- And always remember whenever you are plotting this kind of diagram the features has to either flotting typ or integer typ.<jupyter_code>sns.pairplot(df)
sns.pairplot(df,hue='sex')
df['smoker'].value_counts()
sns.pairplot(df,hue='smoker')<jupyter_output><empty_output><jupyter_text>Dist plotDist plot helps us to check the distribution of the columns feature<jupyter_code>sns.distplot(df['tip'])
sns.distplot(df['tip'],kde=False,bins=10)

## Kernel density estimation<jupyter_output><empty_output><jupyter_text>Categorical PlotsSeaborn also helps us in doing the analysis on Categorical Data points. In this section we will discuss about - boxplot- violinplot- countplot- bar plot<jupyter_code>## Count plot

sns.countplot('sex',data=df)
sns.countplot('smoker',data=df)
sns.countplot('day',data=df)
sns.countplot(y='sex',data=df)
## Bar plot - you specifically have to say that what will be your x-axis value and what will be your y-axis value
sns.barplot(y='total_bill',x='sex',data=df)
df.head()<jupyter_output><empty_output><jupyter_text>Box plotA box and whisker plot(sometimes called a boxplot) is a graph that presents information from a five-number summary.<jupyter_code>sns.boxplot('sex','total_bill', data=df)
sns.boxplot(x="day", y="total_bill", data=df,palette='rainbow')
sns.boxplot(data=df,orient='v')
## Categorize my data based on some other categories

sns.boxplot(x="total_bill", y="day",hue="smoker",data=df)<jupyter_output><empty_output><jupyter_text>Violin PlotViolin plot helps us to see both the distribution of data in terms of Kernel density estimation and the box plot<jupyter_code>sns.violinplot(x="total_bill", y="day", data=df,palette='rainbow')
## Practice Homework

iris = sns.load_dataset('iris')<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.0800513698630137, 'fraction_numerical': 0.005136986301369863, 'mean_word_length': 6.189230769230769, 'pattern_counts': {'":': 0, '<': 33, '<?xml version=': 0, '>': 37, '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': '8', 'dir': 'jupyter-structured-clean-dedup', 'id': '65824', 'license': 'MIT', 'n_tokens_mistral': 1379, 'n_tokens_neox': 1329, 'n_words': 558, 'path': 'Python Basics/seaborn.ipynb', 'repo_name': 'ShristiJalan/Machine-Learning', 'size': '4672'}