Univariate visualization features = exploration_dict [ 'possible_continuos_features' ] dataset [ features ] . hist ( figsize = ( 20 , 20 )); dataset [ features ] . plot ( kind = 'density' , subplots = True , layout = ( 4 , 3 ), sharex = False , figsize = ( 20 , 20 )); # Sometimes you can analyze an ordinal variable just as numerical one fig , axes = plt . subplots ( nrows = 3 , ncols = 4 , figsize = ( 30 , 30 )) for idx , feat in enumerate ( features ): ax = axes [ int ( idx / 4 ), idx % 4 ] sns . boxplot ( x = feat , data = dataset , ax = ax ) ax . set_xlabel ( feat ) ax . set_ylabel ( '' ) fig . tight_layout (); from pandas.plotting import scatter_matrix % config InlineBackend.figure_format = 'png' style . use ( 'tableau-colorbli...
Comments
Post a Comment