Skip to content

Algorithms

We currently support the following regression and classification algorithms from Scikit-Learn, XGBoost, and LightGBM. You may pass any of these to the pgml.train(algorithm => ...) argument. The hyperparams argument will pass parameters on. See the associated documentation for valid hyperparameters of each algorithm.

Tip

Try experimenting with multiple algorithms to explore their performance characteristics on your dataset. It's often hard to predict exactly which algorithm will be the best, but once you've prepared your training data, it can be efficiently reused by PostgresML. pgml.train creates a Snapshot each time it is called with the relation_name argument. You can reuse identical data across multiple runs by omitting that, and passing a different algorithm argument instead.

The PostgresML dashboard makes it easy to compare various algorithms on your dataset.

Model Selection

Gradient Boosting

Algorithm Regression Classification
xgboost XGBRegressor XGBClassifier
xgboost_random_forest XGBRFRegressor XGBRFClassifier
lightgbm LGBMRegressor LGBMClassifier

Scikit Ensembles

Algorithm Regression Classification
ada_boost AdaBoostRegressor AdaBoostClassifier
bagging BaggingRegressor BaggingClassifier
extra_trees ExtraTreesRegressor ExtraTreesClassifier
gradient_boosting_trees GradientBoostingRegressor GradientBoostingClassifier
random_forest RandomForestRegressor RandomForestClassifier
hist_gradient_boosting HistGradientBoostingRegressor HistGradientBoostingClassifier

Support Vector Machines

Algorithm Regression Classification
svm SVR SVC
nu_svm NuSVR NuSVC
linear_svm LinearSVR LinearSVC

Linear Models

Algorithm Regression Classification
linear LinearRegression LogisticRegression
ridge Ridge RidgeClassifier
lasso Lasso -
elastic_net ElasticNet -
least_angle LARS -
lasso_least_angle LassoLars -
orthoganl_matching_pursuit OrthogonalMatchingPursuit -
bayesian_ridge BayesianRidge -
automatic_relevance_determination ARDRegression -
stochastic_gradient_descent SGDRegressor SGDClassifier
perceptron - Perceptron
passive_aggressive PassiveAggressiveRegressor PassiveAggressiveClassifier
ransac RANSACRegressor -
theil_sen TheilSenRegressor -
huber HuberRegressor -
quantile QuantileRegressor -

Other

Algorithm Regression Classification
kernel_ridge KernelRidge -
gaussian_process GaussianProcessRegressor GaussianProcessClassifier

Comments