Practical Data Science with Python by Nathan George

Practical Data Science with Python by Nathan George

Author:Nathan George [Nathan George]
Language: eng
Format: epub, pdf
Publisher: Packt Publishing
Published: 2021-09-29T16:00:00+00:00


Here, we loop through all column names and convert any non-interval columns to a category datatype. Now we can calculate the phik correlations and p-values:

phik_correlations = [] phik_significances = [] columns = loan_df_epoch_time.columns y = loan_df_epoch_time['LOAN_DEFAULT'] for c in columns: x = loan_df_epoch_time[c] if c in interval_columns: phik_correlations.append(phik.phik_from_array(x, y, [c])) phik_significances.append( phik.significance.significance_from_array(x, y, [c])[0]) else: phik_correlations.append(phik.phik_from_array(x, y)) phik_significances.append( phik.significance.significance_from_array(x, y)[0])



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.