alana89 commited on
Commit
73560fb
·
verified ·
1 Parent(s): 21fc54b

Update README.md

Browse files
Files changed (1) hide show
  1. README.md +3 -8
README.md CHANGED
@@ -32,20 +32,15 @@ from sklearn.model_selection import train_test_split
32
 
33
  from tabstar.tabstar_model import TabSTARClassifier
34
 
35
- # Load sample data
36
  csv_path = files("tabstar").joinpath("resources", "imdb.csv")
37
  x = pd.read_csv(csv_path)
38
  y = x.pop('Genre_is_Drama')
39
-
40
- # Split train/test
41
  x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.1)
42
-
43
- # Initialize and train
44
  tabstar = TabSTARClassifier()
45
  tabstar.fit(x_train, y_train)
46
-
47
- # Predict and evaluate
48
- y
49
  ```
50
 
51
  ---
 
32
 
33
  from tabstar.tabstar_model import TabSTARClassifier
34
 
 
35
  csv_path = files("tabstar").joinpath("resources", "imdb.csv")
36
  x = pd.read_csv(csv_path)
37
  y = x.pop('Genre_is_Drama')
 
 
38
  x_train, x_test, y_train, y_test = train_test_split(x, y, test_size=0.1)
39
+ # For regression tasks, replace `TabSTARClassifier` with `TabSTARRegressor`.
 
40
  tabstar = TabSTARClassifier()
41
  tabstar.fit(x_train, y_train)
42
+ y_pred = tabstar.predict(x_test)
43
+ print(classification_report(y_test, y_pred))
 
44
  ```
45
 
46
  ---