Spaces:
Build error
Build error
Commit
·
69b351b
1
Parent(s):
04033b4
Update app.py
Browse files
app.py
CHANGED
|
@@ -14,6 +14,14 @@ import pandas as pd
|
|
| 14 |
|
| 15 |
df_strength=pd.read_csv("data_strength11.csv")
|
| 16 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 17 |
clf = XGBRegressor(learning_rate=0.1788, max_depth=27, subsample=0.5146, n_estimators=100)
|
| 18 |
clf.fit(x_train, y_train)
|
| 19 |
|
|
|
|
| 14 |
|
| 15 |
df_strength=pd.read_csv("data_strength11.csv")
|
| 16 |
|
| 17 |
+
import random
|
| 18 |
+
|
| 19 |
+
x_strength=df_strength.iloc[:,:-1]
|
| 20 |
+
y_strength=df_strength.iloc[:,-1]
|
| 21 |
+
from sklearn.model_selection import train_test_split
|
| 22 |
+
x_train, x_test, y_train, y_test=train_test_split(x_strength,y_strength, test_size=0.15, random_state=2)
|
| 23 |
+
|
| 24 |
+
|
| 25 |
clf = XGBRegressor(learning_rate=0.1788, max_depth=27, subsample=0.5146, n_estimators=100)
|
| 26 |
clf.fit(x_train, y_train)
|
| 27 |
|