Spaces:
Sleeping
Sleeping
skanderovitch
commited on
Update app.py
Browse files
app.py
CHANGED
@@ -115,7 +115,7 @@ def train_model(X,labels):
|
|
115 |
return
|
116 |
train_data = lgb.Dataset(X, label=labels)
|
117 |
num_round = 10
|
118 |
-
param = {'
|
119 |
bst = lgb.train(param, train_data, num_round)
|
120 |
in_sample_preds = bst.predict(X)
|
121 |
in_sample_score = np.corrcoef([in_sample_preds,np.array(labels)])[0][1]
|
@@ -136,6 +136,7 @@ def train():
|
|
136 |
bst.save_model(filename)
|
137 |
preds = rank_candidates(bst)
|
138 |
st.session_state.preds = preds
|
|
|
139 |
|
140 |
|
141 |
|
|
|
115 |
return
|
116 |
train_data = lgb.Dataset(X, label=labels)
|
117 |
num_round = 10
|
118 |
+
param = {'objective': 'binary', 'metric' : 'auc', 'lambda_l2': 0.5}
|
119 |
bst = lgb.train(param, train_data, num_round)
|
120 |
in_sample_preds = bst.predict(X)
|
121 |
in_sample_score = np.corrcoef([in_sample_preds,np.array(labels)])[0][1]
|
|
|
136 |
bst.save_model(filename)
|
137 |
preds = rank_candidates(bst)
|
138 |
st.session_state.preds = preds
|
139 |
+
st.balloons()
|
140 |
|
141 |
|
142 |
|