Module Expr Str Expr Str Import alias identifier ImportFrom alias identifier ImportFrom alias identifier ImportFrom alias identifier Assign NameStore Str Assign NameStore Call AttributeLoad NameLoad attr NameLoad Assign NameStore CompareEq AttributeLoad NameLoad attr Num Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index NameLoad attr Assign NameStore Call AttributeLoad SubscriptLoad NameLoad Index UnaryOpInvert NameLoad attr Expr Call AttributeLoad NameLoad attr Str keyword Num keyword NameLoad Assign NameStore AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Num Str Assign NameStore SubscriptLoad NameLoad Slice Num Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore SubscriptLoad NameLoad Index NameLoad Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad NameLoad attr Str keyword Num Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Call AttributeLoad NameLoad attr AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr TupleLoad Call AttributeLoad NameLoad attr Str keyword Num Call AttributeLoad NameLoad attr NameLoad keyword Num Assign NameStore Num Assign NameStore Call NameLoad keyword NameLoad keyword NameLoad Expr Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Num AttributeLoad NameLoad attr Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Num Assign NameStore Call AttributeLoad NameLoad attr Call AttributeLoad NameLoad attr Str keyword Num Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr NameLoad Assign NameStore Call NameLoad AttributeLoad AttributeLoad NameLoad attr attr SubscriptLoad NameLoad ExtSlice Slice Index Num Print Call AttributeLoad Str attr NameLoad NameLoad
N/A N/A Load data, create the validation split, train a random forest, evaluate N/A uncomment the appropriate lines to save processed data to disk N/A pandas pd sklearn.ensemble RandomForestClassifier RF sklearn.metrics roc_auc_score AUC sklearn.metrics accuracy_score accuracy N/A input_file data/orig/numerai_training_data.csv N/A d N/A N/A pd read_csv input_file N/A iv N/A N/A d validation 1 N/A val N/A N/A N/A d N/A iv copy N/A train N/A N/A N/A d N/A N/A iv copy N/A N/A N/A train drop validation axis 1 inplace True N/A cols N/A train columns N/A cols N/A N/A cols insert 0 target N/A cols N/A cols N/A -1 N/A train N/A train N/A cols N/A val N/A val N/A cols N/A train_dummies N/A N/A pd get_dummies N/A train c1 N/A train_num N/A N/A pd concat N/A N/A N/A train drop c1 axis 1 N/A N/A train_dummies astype int axis 1 N/A val_dummies N/A N/A pd get_dummies N/A val c1 N/A val_num N/A N/A pd concat N/A N/A N/A val drop c1 axis 1 N/A N/A val_dummies astype int axis 1 N/A n_trees 100 N/A rf N/A RF n_estimators n_trees verbose True N/A N/A N/A rf fit N/A N/A train_num drop target axis 1 N/A train_num target N/A p N/A N/A rf predict_proba N/A N/A val_num drop target axis 1 N/A p_bin N/A N/A rf predict N/A N/A val_num drop target axis 1 N/A acc N/A accuracy N/A N/A val_num target values p_bin N/A auc N/A AUC N/A N/A val_num target values N/A p N/A N/A N/A 1 N/A N/A N/A AUC: {:.2%}, accuracy: {:.2%} format auc acc