Lmplot - Seaborn

  Рет қаралды 8,399

Data Talks

Data Talks

Күн бұрын

Пікірлер: 10
@arhataria
@arhataria 4 жыл бұрын
Things I learned from this lecture: Regression(Linear model) Plots-1 *sns.lmplot()
@TheApoorvagni
@TheApoorvagni 5 жыл бұрын
Thanks for the video! It is really amazing!
@funny_vid3513
@funny_vid3513 4 жыл бұрын
Thank you this was very helpful
@rashmimahadevaiah8321
@rashmimahadevaiah8321 3 жыл бұрын
"confidence is done by bootstrap sample with replacement compute the linreg draw it on the graph do it 100 times 95% band of confidence based on that" robust de-weights points that are far away
@HardLessonsOfLife
@HardLessonsOfLife 3 жыл бұрын
Great Video!! I have a question. In your lmplots, what does the blue area around the regression line represent? In lmplot I get for the data I have doesn't fit in between two straight lines, instead, it is an area enclosed between two curvy lines.
@DataTalks
@DataTalks 3 жыл бұрын
That is a confidence interval of the regression using bootstrap sampling!
@markremark
@markremark 7 жыл бұрын
Hey Nathaniel great videos! I'm pretty new to Python so I'm still figuring a bunch of stuff out....but is there a way to display the R-square and equation of the regression line?
@DataTalks
@DataTalks 7 жыл бұрын
Great question, the answer is totally yes, it just depends how much customization you want to do (as in it does not fit perfectly within the seaborn toolkit). If you head over here: seaborn.pydata.org/generated/seaborn.JointGrid.html#seaborn.JointGrid And you search "Use a custom function and formatting for the annotation", you should find an example of almost what you are looking for. I then made a few tweaks and came up with this code: g = sns.JointGrid(x="total_bill", y="tip", data=tips) g = g.plot_joint(sns.regplot) g.ax_marg_x.set_axis_off() g.ax_marg_y.set_axis_off() rsquare = lambda a, b: stats.pearsonr(a, b)[0] ** 2 g.annotate(rsquare, template="{stat}: {val:.2f}", stat="$R^2$", fontsize=12) Unfortunately I don't think there is an easier way to do it :( For the equation of the line you can use this: coefs = lambda x, y: stats.linregress(x,y)[:2] g.annotate(coefs, template="{stat} = {val:.2f}x + {p:.2g}", stat="y", fontsize=12)
@markremark
@markremark 7 жыл бұрын
No ways, that actually worked! Where can I get the documentation for the last part regarding the equation so that I can try to make sense of how you got to that? Thanks again for the help!
@DataTalks
@DataTalks 7 жыл бұрын
Glad it helped! You can check out the documentation here: github.com/mwaskom/seaborn/blob/master/seaborn/axisgrid.py#L1771 As always please do subscribe to my channel and twitter (twitter.com/knatetucker) if you are interested in workshops in the Bay Area (sorry about the plug :)
42 - Introduction to Seaborn Plotting in Python
29:03
DigitalSreeni
Рет қаралды 5 М.
БУ, ИСПУГАЛСЯ?? #shorts
00:22
Паша Осадчий
Рет қаралды 2,7 МЛН
Random Emoji Beatbox Challenge #beatbox #tiktok
00:47
BeatboxJCOP
Рет қаралды 67 МЛН
Jointplot - Seaborn
6:55
Data Talks
Рет қаралды 9 М.
Facetgrid - Seaborn
8:10
Data Talks
Рет қаралды 16 М.
Seaborn Tutorial : Seaborn Full Course
59:34
Derek Banas
Рет қаралды 201 М.
Logistic Regression in R, Clearly Explained!!!!
17:15
StatQuest with Josh Starmer
Рет қаралды 524 М.
Introduction to Dash Plotly - Data Visualization in Python
29:21
Charming Data
Рет қаралды 800 М.
Data Visualization using Seaborn | Distplots
11:54
CampusX
Рет қаралды 5 М.
Seaborn   Dist plot
5:45
Data Science for All
Рет қаралды 18 М.