{"templateId":"markdown","sharedDataIds":{"sidebar":"sidebar-sidebars.yaml"},"props":{"metadata":{"markdoc":{"tagList":[]},"redocly_category":"Products","product_name":"Machine Learning","type":"markdown"},"seo":{"title":"Gluon Predict","description":"Treasure Data Product Documentation · Collect and Unify · Segment and Activate · Experiment and Analyze · Decisioning Automate with AI Scale and Trust.","siteUrl":"https://docs.treasuredata.com","lang":"en-US","llmstxt":{"hide":false,"sections":[{"title":"Table of contents","includeFiles":["**/*"],"excludeFiles":[]}],"excludeFiles":[]}},"dynamicMarkdocComponents":[],"compilationErrors":[],"ast":{"$$mdtype":"Tag","name":"article","attributes":{},"children":[{"$$mdtype":"Tag","name":"Heading","attributes":{"level":1,"id":"gluon-predict","__idx":0},"children":["Gluon Predict"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["This notebook is used for prediction using a prediction model built by ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["gluon_train"]}," notebook."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"sample-output","__idx":1},"children":["Sample Output"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If the same column name to label that is used in training (e.g., y) exists in ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["input_table"]}," , prediction result is resulted in ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predicted_y"]}," with ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predicted"]}," prefix_. If the label column does not exist in ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["input_table"]}," , prediction is resulted in ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["y"]}," column."]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["The columns ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predicted_proba"]}," and ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predicted_probabilities"]}," are results for binary or multiclass classifications. For binary classification, ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predict_proba"]}," is probability of positive class. You can get the probability of a negative class by 1.0 - ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predict_proba"]},". For multiclass classification, ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["predict_proba"]}," is probability of predicted class."]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"y"},"children":["y"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"predicted_y"},"children":["predicted_y"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"predicted_proba"},"children":["predicted_proba"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"predicted_probabilities"},"children":["predicted_probabilities"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.29304519295692444"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{\"no\": 0.706954836845398, \"yes\": 0.29304519295692444}"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["no"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.00487339636310935"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{\"no\": 0.9951266050338745, \"yes\": 0.00487339636310935}"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["..."]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["yes"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["0.5266873240470886"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["{\"no\": 0.4733126759529114, \"yes\": 0.5266873240470886}"]}]}]}]}]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["If ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid_column"]}," is provided, it only appends prediction results to the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid"]}," column and the resulting size of table will be small. It is assumed that ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["user_id"]}," or ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["product_id"]}," is unique for the ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid_column"]},"."]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"workflow-example","__idx":2},"children":["Workflow Example"]},{"$$mdtype":"Tag","name":"p","attributes":{},"children":["For a sample workflow, see ",{"$$mdtype":"Tag","name":"MarkdownLink","attributes":{"href":"https://github.com/treasure-data/treasure-boxes/blob/automl/machine-learning-box/automl/ml_experiment.dig"},"children":["Treasure Boxes"]},"."]},{"$$mdtype":"Tag","name":"CodeBlock","attributes":{"data-language":"yaml","header":{"controls":{"copy":{}}},"source":"+gluon_predict:\n  ml_predict>:\n    notebook: gluon_predict\n    model_name: gluon_model\n    input_table: ml_datasets.bank_marketing_test\n    output_table: ml_test.predicted\n","lang":"yaml"},"children":[]},{"$$mdtype":"Tag","name":"Heading","attributes":{"level":3,"id":"parameters","__idx":3},"children":["Parameters"]},{"$$mdtype":"Tag","name":"div","attributes":{"className":"md-table-wrapper"},"children":[{"$$mdtype":"Tag","name":"table","attributes":{"className":"md"},"children":[{"$$mdtype":"Tag","name":"thead","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter name"},"children":["Parameter name"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Parameter on Console"},"children":["Parameter on Console"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Description"},"children":["Description"]},{"$$mdtype":"Tag","name":"th","attributes":{"data-label":"Default Value"},"children":["Default Value"]}]}]},{"$$mdtype":"Tag","name":"tbody","attributes":{},"children":[{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["docker.task_mem"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Docker Task Mem"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Task memory size. Available values are 64g, 128g (default), 256g, 384g, or 512g depending on your contracted tiers"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["128g"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["model_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Model Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Prediction model name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["input_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Input Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TD table name used for test data"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["output_table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output Table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["TD table name to export the prediction result"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["-"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["output_mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output Mode"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Output mode for exporting ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["output_table:"]}," overwrite or replace or append. Usually, there is no need to specify and append for semi-realtime prediction with ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid_filter"]}]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["overwrite"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["ignore_columns"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Ignore Columns"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Columns to ignore when building a prediction model"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["time"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rowid_column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rowid Column"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["The ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid"]}," (primary key) column. Note that when ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid_column"]}," is specified, only rowid column and prediction result columns are displayed in the output table."]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["rowid_filter"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Rowid Filter"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Filtering rows for prediction by ",{"$$mdtype":"Tag","name":"em","attributes":{},"children":["rowid"]}," column values"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_leaderboard"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Leaderboard"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export leaderboard as a TD table, if specified"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["export_feature_importance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export Feature Importance"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Export feature importance as a TD table, if specified"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["hide_table_contents"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Hide Table Contents"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Suppress showing table contents"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["false"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["shared_model"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Shared Model"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Specify a shared model UUID"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["audience_name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audience Name"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Audience parent (master) segment name to merge an attribute table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]},{"$$mdtype":"Tag","name":"tr","attributes":{},"children":[{"$$mdtype":"Tag","name":"td","attributes":{},"children":["foreign_key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Foreign Key"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["Foreign key in an Audience parent (master) table to merge an attribute table"]},{"$$mdtype":"Tag","name":"td","attributes":{},"children":["None"]}]}]}]}]}]},"headings":[{"value":"Gluon Predict","id":"gluon-predict","depth":1},{"value":"Sample Output","id":"sample-output","depth":3},{"value":"Workflow Example","id":"workflow-example","depth":3},{"value":"Parameters","id":"parameters","depth":3}],"frontmatter":{"seo":{"title":"Gluon Predict"}},"lastModified":"2025-11-22T02:43:27.000Z","pagePropGetterError":{"message":"","name":""}},"slug":"/products/customer-data-platform/machine-learning/automl/notebook-solutions/gluon-predict","userData":{"isAuthenticated":false,"teams":["anonymous"]},"isPublic":true}