This legacy version of AI Platform Prediction is deprecated and will no longer be available on Google Cloud after January 31, 2025. All models, associated metadata, and deployments will be deleted after January 31, 2025. Migrate your resources to Vertex AI to get new machine learning features that are unavailable in AI Platform.
Using scikit-learn on Kaggle and AI Platform Prediction
Stay organized with collections
Save and categorize content based on your preferences.
You can deploy scikit-learn models trained in Kaggle to AI Platform Prediction for
serving predictions at scale.
This AI Adventures episode explains the basic workflow about how to take a model
trained anywhere, including Kaggle, and serve online predictions from
AI Platform Prediction.
Save your model using the
sklearn.externals.joblib library,
making sure to name the file model.joblib. Select the Commit & Run
button to execute all of your kernel code cells in order. This saves and runs
your model training code.
You can download your model files from the Output tab in your kernel.
At the main link to your kernel,
https://www.kaggle.com/[YOUR-USER-NAME]/[YOUR-KERNEL-NAME]/:
Select the Output tab at the top of the page.
Your model.joblib file appears in a list of Data Sources. To
download the file, select the Download All button. Alternatively, hover
your mouse over the name of the model, and then select the download icon
that appears by the model name.
[[["Easy to understand","easyToUnderstand","thumb-up"],["Solved my problem","solvedMyProblem","thumb-up"],["Other","otherUp","thumb-up"]],[["Hard to understand","hardToUnderstand","thumb-down"],["Incorrect information or sample code","incorrectInformationOrSampleCode","thumb-down"],["Missing the information/samples I need","missingTheInformationSamplesINeed","thumb-down"],["Other","otherDown","thumb-down"]],["Last updated 2025-03-05 UTC."],[[["Scikit-learn models trained on Kaggle can be deployed to AI Platform Prediction to serve predictions at scale."],["The process involves training a scikit-learn model on Kaggle, saving it as `model.joblib` using the `sklearn.externals.joblib` library, and downloading it."],["After downloading, upload the `model.joblib` file to Cloud Storage."],["Create model and version resources on AI Platform Prediction, providing details about the model and its location in Cloud Storage."],["The model can then be used for online predictions by sending a prediction request to AI Platform Prediction."]]],[]]