Last active
August 17, 2022 19:31
-
-
Save JarrydWannenburg/2971e6c4cc3c7f122336bfa4f2a61848 to your computer and use it in GitHub Desktop.
House_Prices_Adv_Reg
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
# Try/Except to append multiple altair charts to a list | |
myl = [] | |
for col in dataset.columns: | |
try: | |
myl.append(chart(dataset, col, target_var)) | |
except: | |
pass | |
else: | |
pass | |
# Compile all charts in the list to one html document | |
a = myl[0] | |
for i in range(1,len(myl)): | |
a = a & myl[i] | |
a.properties( | |
title = 'Feature Histograms & Boxplots' | |
).configure_axis(labelFontSize=15, titleFontSize=25) | |
a.save('figures/Feature_Visuals.html') | |
# Check if all variables were visualized | |
print('Features accounted for:', len(myl), 'out of', len(dataset.T)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment