Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

add_baselines.py 495 B

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
  1. import os
  2. import pandas as pd
  3. from lendingclub.modeling.models import Model, load_scored_df
  4. from lendingclub import config
  5. dpath = config.data_dir
  6. base_loan_info = pd.read_feather(os.path.join(dpath, 'base_loan_info.fth'))
  7. eval_loan_info = load_scored_df()
  8. for model in ['baseline', 'A', 'B', 'C', 'D', 'E', 'F', 'G']:
  9. m = Model(model)
  10. eval_loan_info['{0}_score'.format(model)] = m.score(base_loan_info)
  11. eval_loan_info.to_feather(os.path.join(dpath, 'eval_loan_info_scored.fth'))
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...