From the course: SQL for AI Projects: From Data Exploration to Impact

Unlock this course with a free trial

Join today to access over 25,500 courses taught by industry experts.

Feature engineering

Feature engineering

- [Instructor] Now that we've validated our raw data, the next step is to transform and prepare it for machine learning. We'll use SQL Transformations to reshape the data so it's structured in a way our model can learn from. Our first use case is a multi-class classification problem, recommending one product out of many possible tour options for each user. To build this, we'll need to join together all our key tables: sales, products, users, and attributes. Then we take the list of user attributes and pivot them into individual columns since machine learning models usually perform better with wide, structured inputs. This means converting our long row-based data into a format where each column represents a specific user trait or interaction. Finally, we clean up the column names and values to keep things consistent and interpretable. Next, we extend our recommendation task with a second challenge, a binary…

Contents