modelfoxdotdev / modelfox

ModelFox makes it easy to train, deploy, and monitor machine learning models.
Other
1.46k stars 63 forks source link

What kind of models and training methods are used by tangram? #52

Closed m-kru closed 2 years ago

m-kru commented 2 years ago

I am trying to get to know what kind of models and training methods are used by tangram. However, I struggle to find any information. The help message from tangram train --help says nothing on that. I can only see that tangram is training 8 models. In the About info page I can read "... of the gradient boosted decision tree algorithm.", but this information is also very rudimentary.

isabella commented 2 years ago

Hi @m-kru. We should add the information about which models are trained in tangram train --help!

The current default hyperparameter grid is as follows:

Linear Models

learning_rate: [0.1, 0.01] l2_regularization: [1.0, 0.1] max_epochs: 1000

Gradient Boosted Decision Trees:

learning_rate: [0.1, 0.01] l2_regularization: [1.0, 0.1] max_leaf_nodes: 512 max_depth: 50 max_rounds: 1000

Does that answer your question?

m-kru commented 2 years ago

@isabella thanks for your quick reply. What Linear Model is it? Do you mean Linear Regression?

isabella commented 2 years ago

Linear regression trained via Stochastic Gradient Descent. The default batch size is 128.

lnicola commented 2 years ago

@isabella are classification (i.e. non-regression) trees supported? I tried to train a model, but the statistics include the RMSE, which doesn't really make sense for classification.

isabella commented 2 years ago

hi @lnicola. Yes classification models are definitely supported. The most likely explanation you are getting a regreession model is that your target column is numeric. If you would like Tangram to train a classification model given a numeric target column, you can pass a config file to training. e.g. tangram train --config config.json ...

{
    "dataset": {
        "columns": [
            {
                "name": <your target column>,
                "type": "enum",
                "variants": [
                    <variant 1>,
                    <variant 2>,
                    <variant 3>
                                        ...
                ]
            }
                ]
        }
}