Beberapa atau semua informasi di halaman ini mungkin tidak berlaku untuk Trusted Cloud oleh S3NS.
Ringkasan klasifikasi
Kasus penggunaan umum untuk machine learning adalah mengklasifikasikan data baru menggunakan model
yang dilatih pada data berlabel serupa. Misalnya, Anda mungkin ingin memprediksi apakah email adalah spam, atau apakah ulasan produk pelanggan bersifat positif, negatif, atau netral.
Anda dapat menggunakan salah satu model berikut yang dikombinasikan dengan
fungsi ML.PREDICT
untuk melakukan klasifikasi:
Artikel pusat informasi yang direkomendasikan
Dengan menggunakan setelan default dalam pernyataan CREATE MODEL
dan
fungsi ML.PREDICT
, Anda dapat membuat dan menggunakan model klasifikasi bahkan
tanpa banyak pengetahuan ML. Namun, memiliki pengetahuan dasar tentang pengembangan ML membantu Anda mengoptimalkan data dan model untuk memberikan hasil yang lebih baik. Sebaiknya gunakan referensi berikut untuk mengembangkan
pengetahuan tentang teknik dan proses ML:
Kecuali dinyatakan lain, konten di halaman ini dilisensikan berdasarkan Lisensi Creative Commons Attribution 4.0, sedangkan contoh kode dilisensikan berdasarkan Lisensi Apache 2.0. Untuk mengetahui informasi selengkapnya, lihat Kebijakan Situs Google Developers. Java adalah merek dagang terdaftar dari Oracle dan/atau afiliasinya.
Terakhir diperbarui pada 2025-08-17 UTC.
[[["Mudah dipahami","easyToUnderstand","thumb-up"],["Memecahkan masalah saya","solvedMyProblem","thumb-up"],["Lainnya","otherUp","thumb-up"]],[["Informasi yang saya butuhkan tidak ada","missingTheInformationINeed","thumb-down"],["Terlalu rumit/langkahnya terlalu banyak","tooComplicatedTooManySteps","thumb-down"],["Sudah usang","outOfDate","thumb-down"],["Masalah terjemahan","translationIssue","thumb-down"],["Masalah kode / contoh","samplesCodeIssue","thumb-down"],["Lainnya","otherDown","thumb-down"]],["Terakhir diperbarui pada 2025-08-17 UTC."],[[["\u003cp\u003eMachine learning classification involves using a model trained on labeled data to classify new data, such as identifying spam emails or categorizing customer reviews.\u003c/p\u003e\n"],["\u003cp\u003eThe \u003ccode\u003eML.PREDICT\u003c/code\u003e function can be used with various classification models, including logistic regression, boosted tree, random forest, deep neural network (DNN), wide & deep, and AutoML models.\u003c/p\u003e\n"],["\u003cp\u003eDifferent models can be specified using the \u003ccode\u003eMODEL_TYPE\u003c/code\u003e option, such as \u003ccode\u003eLOGISTIC_REG\u003c/code\u003e, \u003ccode\u003eBOOSTED_TREE_CLASSIFIER\u003c/code\u003e, \u003ccode\u003eRANDOM_FOREST_CLASSIFIER\u003c/code\u003e, \u003ccode\u003eDNN_CLASSIFIER\u003c/code\u003e, \u003ccode\u003eDNN_LINEAR_COMBINED_CLASSIFIER\u003c/code\u003e, and \u003ccode\u003eAUTOML_CLASSIFIER\u003c/code\u003e.\u003c/p\u003e\n"],["\u003cp\u003eWhile classification models can be created and used without extensive ML knowledge, understanding the basics can help optimize both data and the model for better results.\u003c/p\u003e\n"],["\u003cp\u003eResources like the Machine Learning Crash Course, Intro to Machine Learning, and Intermediate Machine Learning are recommended for gaining familiarity with machine learning techniques.\u003c/p\u003e\n"]]],[],null,["# Classification overview\n=======================\n\nA common use case for machine learning is classifying new data by using a model\ntrained on similar labeled data. For example, you might want to predict whether\nan email is spam, or whether a customer product review is positive, negative, or\nneutral.\n\nYou can use any of the following models in combination with the\n[`ML.PREDICT` function](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-predict)\nto perform classification:\n\n- [Logistic regression models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-glm): use [logistic regression](https://developers.google.com/machine-learning/crash-course/logistic-regression) by setting the `MODEL_TYPE` option to `LOGISTIC_REG`.\n- [Boosted tree models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-boosted-tree): use a [gradient boosted decision tree](https://developers.google.com/machine-learning/decision-forests/intro-to-gbdt) by setting the `MODEL_TYPE` option to `BOOSTED_TREE_CLASSIFIER`.\n- [Random forest models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-random-forest): use a [random forest](https://developers.google.com/machine-learning/decision-forests/intro-to-decision-forests) by setting the `MODEL_TYPE` option to `RANDOM_FOREST_CLASSIFIER`.\n- [Deep neural network (DNN) models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-dnn-models): use a [neural network](https://developers.google.com/machine-learning/crash-course/neural-networks) by setting the `MODEL_TYPE` option to `DNN_CLASSIFIER`.\n- [Wide \\& Deep models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-wnd-models): use [wide \\& deep learning](https://dl.acm.org/doi/10.1145/2988450.2988454) by setting the `MODEL_TYPE` option to `DNN_LINEAR_COMBINED_CLASSIFIER`.\n- [AutoML models](/bigquery/docs/reference/standard-sql/bigqueryml-syntax-create-automl): use an [AutoML classification model](/vertex-ai/docs/tabular-data/classification-regression/overview) by setting the `MODEL_TYPE` option to `AUTOML_CLASSIFIER`.\n\nRecommended knowledge\n---------------------\n\nBy using the default settings in the `CREATE MODEL` statements and the\n`ML.PREDICT` function, you can create and use a classification model even\nwithout much ML knowledge. However, having basic knowledge about\nML development helps you optimize both your data and your model to\ndeliver better results. We recommend using the following resources to develop\nfamiliarity with ML techniques and processes:\n\n- [Machine Learning Crash Course](https://developers.google.com/machine-learning/crash-course)\n- [Intro to Machine Learning](https://www.kaggle.com/learn/intro-to-machine-learning)\n- [Intermediate Machine Learning](https://www.kaggle.com/learn/intermediate-machine-learning)"]]