-
-
Save jurand71/709ca4a5f185b981a9f542f7b90a5d31 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Function for checking Gaussian distribution | |
import seaborn as sns | |
import scipy.stats as stats | |
sns.set_theme() | |
def Gaussian_distribution_check(data, variable): | |
fig = plt.figure(figsize=(15,5), dpi=300) | |
ax1 = fig.add_subplot(1,2,1) | |
sns.histplot(data[variable], kde=True, ax=ax1) | |
ax2 = fig.add_subplot(1,2,2) | |
stats.probplot(data[variable], dist="norm", plot=ax2) | |
plt.show() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment