How to get started in DeFi

By now you might have heard of some new terms in the crypto world such as DeFi and yield farming. You want to get involved but have no idea where to start. If you missed the boat on Hodling crypto…

Smartphone

独家优惠奖金 100% 高达 1 BTC + 180 免费旋转




Seaborn tutorial for beginners

Make your plots more visually attractive.

If you are just beginning with kaggle, you might notice everyone using seaborn for visualization. The seaborn website provides a very beautiful tutorial on how to use seaborn for visualization, you can check it out if you want to learn and implement seaborn in depth. I’d recommend you go through my post to find out some really handy plots to use on your data,instead of going through an entire tutorial.

First we need to import Seaborn module

We will use sample datasets available with seaborn

Let’s take a peek at the datasets we are dealing with

Now that we have imported the datasets, lets implement seaborn plots on them.

Scatter plots are useful to see the relationship of two variables and we can draw a regression line to the plot to see the correlation of the variables.

I used relplot instead of scatterplot because we can use facetgrid which is useful to split the data and plot it according to the different columns. We will see about it later. The default type of relplot is scatter plot.

Hue parameter separates the data points based on the column we specify, it kind of makes the plot 3d.

line plots are useful in representing data against the time series.

picture found on Quora

The lineplot in seaborn can be implemented using linplot() method with same parameters or relplot method with kind = “line” parameter. Confidence interval can changed by setting the parameter ci = none.

As i said earlier, We can use relplot to use facetgrid. Look at the below fig to see the different plots for each categorical value of a particular column.

To work with categorical data we use the titanic dataset.

Swarmplots are useful when you want to know the spread of the data. The points in the swarmplot don’t overlap which is easy to see the spread.

Box plots are used to get the descriptive statistics of the data like median , lowest, highest value, 25th percentile , 75th percentile, and also outliers.

we can combine both boxplot and swarmplot.

Violin plots are also used to get the spread of the data.

Pair plots gives a matrix of plots. The each column in dataset is set against all other graphs. the column against itself gives a barplot and against others it gives us scatter plot with regression line to tell us about the correlation.

kdeplot can be used for univariate distribution, which means finding the distribution of just one column. It can be used for bivariate distribution.

bivariate distribution
univariate distribution of petal length

lmplot : Regression plot are used to find the relation of two independent variables.

Heatmaps are useful for visualizing the correlation between the variables.

here instead of sending the real dataset we send iris.corr() to get the representation of the heatmap of the columns correlation. cmap is for the color transition and annot is for the value of the transition.

Thanks for reading!

Add a comment

Related posts:

The art of writing a draft

A single drawing on a post-it can give birth to a comprehensive piece of writing. Are you ready to kickstart your writing with a single stroke of ink? I believe that deep down we are all writers. As…

Putting Yourself OUT THERE Professionally

As I reflect over my school year, I realize I had a lot of disappointments. In fact, a crazy amount of disappointments. As a rule, I don’t deal with disappointments or rejection well so I have spent…

insurance mazda 6 2016

I recommend one to try this web page where you can get rates from different companies: http://insurancefastfinder.top . Any information with the Here are a few higher. Try Amiga Insurance, would have…