{ "nbformat": 4, "nbformat_minor": 0, "metadata": { "colab": { "name": "lesson_12-R.ipynb", "provenance": [], "collapsed_sections": [] }, "kernelspec": { "name": "ir", "display_name": "R" }, "language_info": { "name": "R" }, "coopTranslator": { "original_hash": "fab50046ca413a38939d579f8432274f", "translation_date": "2025-11-18T19:25:36+00:00", "source_file": "4-Classification/3-Classifiers-2/solution/R/lesson_12-R.ipynb", "language_code": "pcm" } }, "cells": [ { "cell_type": "markdown", "metadata": { "id": "jsFutf_ygqSx" }, "source": [ "# Build classification model: Sweet Asian and Indian Food\n" ] }, { "cell_type": "markdown", "metadata": { "id": "HD54bEefgtNO" }, "source": [ "## Cuisine classifiers 2\n", "\n", "For dis second lesson wey dey about classification, we go look `more ways` wey we fit take classify categorical data. We go still learn wetin fit happen if we choose one classifier instead of another one.\n", "\n", "### [**Pre-lecture quiz**](https://gray-sand-07a10f403.1.azurestaticapps.net/quiz/23/)\n", "\n", "### **Prerequisite**\n", "\n", "We dey assume say you don finish di previous lessons because we go dey use some concepts wey we don learn before.\n", "\n", "For dis lesson, we go need di following packages:\n", "\n", "- `tidyverse`: Di [tidyverse](https://www.tidyverse.org/) na [collection of R packages](https://www.tidyverse.org/packages) wey dem design to make data science fast, easy and fun!\n", "\n", "- `tidymodels`: Di [tidymodels](https://www.tidymodels.org/) framework na [collection of packages](https://www.tidymodels.org/packages/) for modeling and machine learning.\n", "\n", "- `themis`: Di [themis package](https://themis.tidymodels.org/) dey provide Extra Recipes Steps to handle unbalanced data.\n", "\n", "You fit install dem like dis:\n", "\n", "`install.packages(c(\"tidyverse\", \"tidymodels\", \"kernlab\", \"themis\", \"ranger\", \"xgboost\", \"kknn\"))`\n", "\n", "Or, di script wey dey below go check whether you get di packages wey you need to complete dis module, and e go install dem for you if dem no dey.\n" ] }, { "cell_type": "code", "metadata": { "id": "vZ57IuUxgyQt" }, "source": [ "suppressWarnings(if (!require(\"pacman\"))install.packages(\"pacman\"))\n", "\n", "pacman::p_load(tidyverse, tidymodels, themis, kernlab, ranger, xgboost, kknn)" ], "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "z22M-pj4g07x" }, "source": [ "Make we start dey waka sharp sharp!\n", "\n", "## **1. Map wey dey show classification**\n", "\n", "For our [last lesson](https://github.com/microsoft/ML-For-Beginners/tree/main/4-Classification/2-Classifiers-1), we bin try answer dis question: how we go fit choose between plenty models? E dey depend well well on di kind data wey we get and di type problem wey we wan solve (like classification or regression?)\n", "\n", "Before, we don learn about di different options wey dey available to classify data using Microsoft's cheat sheet. Python Machine Learning framework, Scikit-learn, get one cheat sheet wey dey more detailed wey fit help you narrow down your estimators (another name for classifiers):\n", "\n", "
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"
\n",
"