Created
July 26, 2017 15:39
-
-
Save DanielSnipes/b10a0711da666c06fb7f548af96db00d to your computer and use it in GitHub Desktop.
coef fx
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
def show_coefs(data, classifier_name): | |
cols = data.columns | |
coefficients = pd.concat([pd.DataFrame(cols), pd.DataFrame(np.transpose(classifier_name.coef_))], axis = 1) | |
coefficients.columns = ['name', 'coef'] | |
coefficients['OR'] = np.e**coefficients['coef'] | |
return coefficients.dropna() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment