Grafice de regresie în Seaborn

Vizualizarea datelor cu Seaborn – nivel intermediar

Chris Moffitt

Instructor

Introducere în regplot

  • Funcția regplot generează un grafic de dispersie cu o linie de regresie
  • Utilizarea este similară cu displot
  • Variabilele data, x și y trebuie definite
sns.regplot(data=df, x="alcohol", y="pH" )

Grafic de dispersie

Vizualizarea datelor cu Seaborn – nivel intermediar

lmplot() se construiește pe baza regplot()

  • regplot - nivel de bază
sns.regplot(data=df,
            x="alcohol",
            y="quality")

Grafic calitate vin

  • lmplot - nivel înalt
sns.lmplot(data=df, 
           x="alcohol",
           y="quality")

Grafic calitate vin

Vizualizarea datelor cu Seaborn – nivel intermediar

Fatetare cu lmplot

  • Organizați datele după culori (hue)
sns.lmplot(data=df, 
           x="quality",
           y="alcohol",
           hue="type")

Grafic calitate vin cu hue

  • Organizați datele pe coloane (col)
sns.lmplot(data=df, 
           x="quality",
           y="alcohol",
           col="type")

Calitate vin pe coloane

Vizualizarea datelor cu Seaborn – nivel intermediar

Să exersăm!

Vizualizarea datelor cu Seaborn – nivel intermediar

Preparing Video For Download...