Narrowing the range of iteration times

Offering: openGaussDev

More detail: Narrowing the range of iteration times

Match-id-e8830353af1a99500aa8e97a0a0894b2872e4f24
This commit is contained in:
openGaussDev
2022-03-08 12:31:49 +08:00
committed by yanghao
parent 4cb0596eda
commit f45ec47b1b
5 changed files with 5 additions and 4 deletions

View File

@ -258,7 +258,7 @@ static HyperparameterDefinition pca_hyperparameter_definitions[] = {
HYPERPARAMETER_INT4("number_components", 1, 1, true, INT32_MAX, true, HyperparametersGD, number_dimensions,
HP_NO_AUTOML()),
HYPERPARAMETER_INT4("batch_size", 1000, 1, true, INT32_MAX, true, HyperparametersGD, batch_size, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("max_iterations", 100, 1, true, INT32_MAX, true, HyperparametersGD, max_iterations,
HYPERPARAMETER_INT4("max_iterations", 100, 1, true, ITER_MAX, true, HyperparametersGD, max_iterations,
HP_NO_AUTOML()),
HYPERPARAMETER_INT4("max_seconds", 0, 0, true, INT32_MAX, true, HyperparametersGD, max_seconds, HP_NO_AUTOML()),
HYPERPARAMETER_FLOAT8("tolerance", 0.0005, 0.0, true, DBL_MAX, true, HyperparametersGD, tolerance, HP_NO_AUTOML()),

View File

@ -1041,7 +1041,7 @@ HyperparameterDefinition kmeans_hyperparameter_definitions[] = {
HYPERPARAMETER_INT4("verbose", 0, 0, true, 2, true, HyperparametersKMeans, verbosity, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("num_centroids", 1, 1, true, 1000000, true, HyperparametersKMeans, num_centroids,
HP_NO_AUTOML()),
HYPERPARAMETER_INT4("max_iterations", 10, 1, true, INT32_MAX, true, HyperparametersKMeans, num_iterations,
HYPERPARAMETER_INT4("max_iterations", 10, 1, true, ITER_MAX, true, HyperparametersKMeans, num_iterations,
HP_NO_AUTOML()),
HYPERPARAMETER_INT4("num_features", 0, 1, true, INT32_MAX, true, HyperparametersKMeans, n_features, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("batch_size", 1000, 1, true, 1000000, true, HyperparametersKMeans, batch_size, HP_NO_AUTOML()),

View File

@ -225,7 +225,7 @@ const char *xgboost_boost_str[] = {"gbtree", "gblinear", "dart"};
const char *xgboost_tree_method_str[] = {"auto", "exact", "approx", "hist", "gpu_hist"};
const char *xgboost_eval_metric_str[] = {"rmse", "rmsle", "map", "mae", "auc", "aucpr" };
static HyperparameterDefinition xgboost_hyperparameter_definitions[] = {
HYPERPARAMETER_INT4("n_iter", 10, 1, true, INT32_MAX, true, HyperparamsXGBoost, n_iterations, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("n_iter", 10, 1, true, ITER_MAX, true, HyperparamsXGBoost, n_iterations, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("batch_size", 10000, 1, true, INT32_MAX, true, HyperparamsXGBoost, batch_size, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("max_depth", 5, 0, true, INT32_MAX, true, HyperparamsXGBoost, max_depth, HP_NO_AUTOML()),
HYPERPARAMETER_INT4("min_child_weight", 1, 0, true, INT32_MAX, true, HyperparamsXGBoost, min_child_weight,

View File

@ -25,6 +25,7 @@
#include "utils/builtins.h"
#include "utils/timestamp.h"
#define ITER_MAX 10000
uint64_t time_diff(struct timespec *time_p1, struct timespec *time_p2);
double interval_to_sec(double time_interval);

View File

@ -270,7 +270,7 @@ typedef struct HyperparametersGD {
HYPERPARAMETER_FLOAT8("learning_rate", 0.8, 0.0, false, DBL_MAX, true, \
HyperparametersGD, learning_rate, \
HP_AUTOML_FLOAT(1E-6, 1E3, 9, ProbabilityDistribution::LOG_RANGE)), \
HYPERPARAMETER_INT4("max_iterations", 100, 1, true, INT32_MAX, true, \
HYPERPARAMETER_INT4("max_iterations", 100, 1, true, ITER_MAX, true, \
HyperparametersGD, max_iterations, \
HP_AUTOML_INT(1, 100, 10, ProbabilityDistribution::LOG_RANGE)), \
HYPERPARAMETER_INT4("max_seconds", 0, 0, true, INT32_MAX, true, \