Skip to content

Commit 00cc108

Browse files
committed
xgboost random forest test is too slow
1 parent afa820f commit 00cc108

File tree

6 files changed

+13
-10
lines changed

6 files changed

+13
-10
lines changed

pgml-extension/examples/binary_classification.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ SELECT * FROM pgml.train('Breast Cancer Detection', algorithm => 'random_forest'
119119

120120
-- Gradient Boosting
121121
SELECT * FROM pgml.train('Breast Cancer Detection', algorithm => 'xgboost', hyperparams => '{"n_estimators": 10}');
122-
SELECT * FROM pgml.train('Breast Cancer Detection', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
122+
-- SELECT * FROM pgml.train('Breast Cancer Detection', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
123123
-- SELECT * FROM pgml.train('Breast Cancer Detection', algorithm => 'lightgbm', hyperparams => '{"n_estimators": 1}');
124124
-- Histogram Gradient Boosting is too expensive for normal tests on even a toy dataset
125125
-- SELECT * FROM pgml.train('Breast Cancer Detection', algorithm => 'hist_gradient_boosting', hyperparams => '{"max_iter": 2}');

pgml-extension/examples/image_classification.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'random_forest', hyp
6060

6161
-- gradient boosting
6262
SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'xgboost', hyperparams => '{"n_estimators": 10}');
63-
SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
63+
-- SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
6464
-- SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'lightgbm', hyperparams => '{"n_estimators": 1}');
6565
-- Histogram Gradient Boosting is too expensive for normal tests on even a toy dataset
6666
-- SELECT * FROM pgml.train('Handwritten Digits', algorithm => 'hist_gradient_boosting', hyperparams => '{"max_iter": 2}');

pgml-extension/examples/joint_regression.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ SELECT * FROM pgml.train_joint('Exercise vs Physiology', algorithm => 'random_fo
5656

5757
-- gradient boosting
5858
SELECT * FROM pgml.train_joint('Exercise vs Physiology', algorithm => 'xgboost', hyperparams => '{"n_estimators": 10}');
59-
SELECT * FROM pgml.train_joint('Exercise vs Physiology', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
59+
--SELECT * FROM pgml.train_joint('Exercise vs Physiology', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
6060
-- SELECT * FROM pgml.train_joint('Exercise vs Physiology', algorithm => 'lightgbm', hyperparams => '{"n_estimators": 1}');
6161
-- Histogram Gradient Boosting is too expensive for normal tests on even a toy dataset
6262
-- SELECT * FROM pgml.train_joint('Exercise vs Physiology', algorithm => 'hist_gradient_boosting', hyperparams => '{"max_iter": 10}');

pgml-extension/examples/multi_classification.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ SELECT * FROM pgml.train('Iris Flower Types', algorithm => 'random_forest', hype
5353

5454
-- gradient boosting
5555
SELECT * FROM pgml.train('Iris Flower Types', algorithm => 'xgboost', hyperparams => '{"n_estimators": 10}');
56-
SELECT * FROM pgml.train('Iris Flower Types', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
56+
--SELECT * FROM pgml.train('Iris Flower Types', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
5757
-- SELECT * FROM pgml.train('Iris Flower Types', algorithm => 'lightgbm', hyperparams => '{"n_estimators": 1}');
5858
-- Histogram Gradient Boosting is too expensive for normal tests on even a toy dataset
5959
-- SELECT * FROM pgml.train('Iris Flower Types', algorithm => 'hist_gradient_boosting', hyperparams => '{"max_iter": 2}');

pgml-extension/examples/regression.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ SELECT * FROM pgml.train('Diabetes Progression', algorithm => 'random_forest', h
8080

8181
-- gradient boosting
8282
SELECT * FROM pgml.train('Diabetes Progression', algorithm => 'xgboost', hyperparams => '{"n_estimators": 10}');
83-
SELECT * FROM pgml.train('Diabetes Progression', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
83+
--SELECT * FROM pgml.train('Diabetes Progression', algorithm => 'xgboost_random_forest', hyperparams => '{"n_estimators": 10}');
8484
-- SELECT * FROM pgml.train('Diabetes Progression', algorithm => 'lightgbm', hyperparams => '{"n_estimators": 1}');
8585
-- Histogram Gradient Boosting is too expensive for normal tests on even a toy dataset
8686
-- SELECT * FROM pgml.train('Diabetes Progression', algorithm => 'hist_gradient_boosting', hyperparams => '{"max_iter": 10}');

pgml-extension/examples/transformers.sql

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -33,13 +33,16 @@ SELECT pgml.transform(
3333
]
3434
);
3535

36-
SELECT pgml.load_dataset('opus_books', 'en-fr');
3736
SELECT pgml.load_dataset('kde4', kwargs => '{"lang1": "en", "lang2": "es"}');
37+
CREATE OR REPLACE VIEW kde4_en_to_es AS
38+
SELECT translation->>'en' AS "en", translation->>'es' AS "es"
39+
FROM pgml.kde4
40+
LIMIT 10;
3841
SELECT pgml.tune(
3942
'Translate English to Spanish',
40-
task => 'translation_en_to_es',
41-
relation_name => 'pgml.kde4',
42-
y_column_name => 'translation',
43+
task => 'translation',
44+
relation_name => 'kde4_en_to_es',
45+
y_column_name => 'es', -- translate into spanish
4346
model_name => 'Helsinki-NLP/opus-mt-en-es',
4447
hyperparams => '{
4548
"learning_rate": 2e-5,
@@ -49,7 +52,7 @@ SELECT pgml.tune(
4952
"weight_decay": 0.01,
5053
"max_length": 128
5154
}',
52-
test_size => 0.05,
55+
test_size => 0.5,
5356
test_sampling => 'last'
5457
);
5558

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy