Foundations of Machine LearningFeature Extraction and PreprocessingFeature Extraction and PreprocessingLesson 4- 1Feature Extraction and PreprocessingThe examples discussed in linear regression used simple numeric explanatory variables, such as the diameter of a pizza. Many machine learning problems require learning from observations of categorical variables, text, or images. In this lesson, you will learn basic techniques for preprocessing data and creating feature representations of these observations. These techniques can be used with the regression models, Linear Regression, as well as the models we will discuss in subsequent lesson.Feature Extraction and PreprocessingLesson 4- 2Feature Extraction and PreprocessingExtracting features from categorical variablesExtracting features from textExtracting features from imagesData normalizationFeature Extraction and PreprocessingLesson 4 - 3Extracting features from categorical variablesTypes of variablesNominal ( 定类 ): categories, states, or “names of things” Hair_color = {auburn, black, blond, brown, grey, red, white} marital status, occupation, ID numbers, zip codes Feature Extraction and PreprocessingLesson 4 - 4Extracting features from categorical variablesTypes of variablesNominal ( 定类 ): categories, states, or “names of things” Hair_color = {auburn, black, blond, brown, grey, red, white} marital status, occupation, ID numbers, zip codes Binary (二类)Nominal attribute with only 2 states (0 and 1) Symmetric binary: both outcomes equally important, e.g., gender Asymmetric binary: outcomes not equally important, e.g., medical test (positive vs. negative) Convention: assign 1 to most important outcome (e.g., HIV positive )Feature Extraction and PreprocessingLesson 4 - 5Extracting fea...