Skip to content

Instantly share code, notes, and snippets.

@oborchers
Created May 30, 2020 14:47
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save oborchers/39596027760aa7d18913026276e182fe to your computer and use it in GitHub Desktop.
Save oborchers/39596027760aa7d18913026276e182fe to your computer and use it in GitHub Desktop.
topn = 50
# Using -coef_ because we sort size
top_idx = argsort(-est.coef_)[-topn:]
print(
len(
set(top_idx).intersection(set(data["noise_index"]))
)
)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment