Update Dialog Flow authored by Asif Khan's avatar Asif Khan
# Use Case 1: Predicting Release Year Based on Features # Use Case: Family-Friendly Action Flicks
## Title: Predicting Release Year Based on Features ## Actors:
- **User:** A person seeking family-friendly action movies for a weekend watch party.
### Actors: - **Chatbot:** A system that recommends movies based on user input.
- **Primary User:** Priya Sharma (Data Science Student)
- **System:** Netflix Dataset Application Chatbot
### Scenario:
Priya is a data science student using the Netflix Dataset Application to predict the release year of Netflix titles based on features like genre and duration.
--- ---
## Dialogue Flow ## Workflow
### Step 1: Priya Selects "Model Training" Feature
**User (Priya):** Hi, I want to train a model to predict release years based on Netflix data.
**Chatbot:** Hi Priya! Let's get started with building your predictive model. Which feature would you like to work on today?
**User:** I’d like to predict the release year of titles.
**Chatbot:** Great choice! We'll build a model for that. First, let's preprocess the data. Can you confirm the features you'd like to use? ### Step 1: Greeting
- **User:** Hello!
- **Chatbot:** Hi there! I can help you find movies, predict genres, or explore film data. What can I assist you with today?
--- ---
### Step 2: Preprocessing the Data ### Step 2: Request for Recommendations
- **User:** I’m looking for a family-friendly action movie for a weekend watch party. Any suggestions?
**User:** I’ll use **Genre** and **Duration** as features. - **Chatbot:** Sure! Here are some action movies suitable for all ages:
1. **Spy Kids**
**Chatbot:** Got it! Here’s how the preprocessing will be done: 2. **The Adventures of Sharkboy and Lavagirl**
1. **Features:** Genre and Duration will be encoded and scaled. 3. **We Can Be Heroes**
2. **Target Variable:** Release Year will remain numerical.
Do you want to handle missing values before training the model?
**User:** Yes, please fill missing values in **Duration** with the mean.
**Chatbot:** Done! Missing values in **Duration** have been filled with the mean. The **Genre** column has been encoded. Your data is now ready for training. Shall we proceed?
--- ---
### Step 3: Training the Model ### Step 3: Follow-Up Query
- **User:** Which one is the most popular?
**User:** Yes, let’s train the model. - **Chatbot:** **Spy Kids** is the most popular due to its fun spy gadget theme and family-friendly humor.
**Chatbot:** Perfect! I’ll use a **Linear Regression model** for this task. Let’s train it and evaluate its performance.
*(Model Training in Progress...)*
**Chatbot:** The model has been trained! Here are the evaluation results:
- **Mean Absolute Error (MAE):** 3.2 years
- **R² Score:** 0.85
Would you like to save this model for future predictions?
**User:** Yes, save it as **ReleaseYearPredictor**.
**Chatbot:** Your model has been saved as **ReleaseYearPredictor**. What's next?
--- ---
### Step 4: Predicting Release Years for Test Data ### Step 4: Conclusion
- **User:** Great, I’ll check out Spy Kids. Thanks!
**User:** I’d like to predict release years for some test data. - **Chatbot:** You’re welcome! Let me know if you’d like more recommendations. Enjoy your watch party!
**Chatbot:** Sure! Please upload your test dataset, and I’ll generate the predictions.
*(User Uploads Test Data...)*
**Chatbot:** Predictions are ready! Here’s a summary:
- **Input:** Genres and durations from your test data.
- **Output:** Predicted release years.
Would you like to visualize the results?
**User:** Yes, show me a scatter plot of actual vs. predicted release years.
---
### Step 5: Visualizing the Predictions
**Chatbot:** Here’s the scatter plot comparing actual and predicted release years. *(Scatter plot displayed with a line showing perfect prediction alignment.)*
- **Insight:** Most predictions are close to the actual release years, indicating good model performance.
Would you like to export this visualization or refine the model further?
**User:** Export it as a PNG file, please.
**Chatbot:** The scatter plot has been saved as **Predictions_Comparison.png**. Is there anything else you'd like to do?
---
### Outcome:
**User:** No, that’s all for now. Thanks for the help!
**Chatbot:** You’re welcome, Priya! Great job building and evaluating a predictive model. If you need more assistance with data science workflows, feel free to ask. Happy learning!
--- ---
## Key Features of the Chatbot: ## Summary
1. **Chatbot identifies the user’s intent** to find family-friendly action movies.
1. **Preprocessing Assistance:** 2. **Filters and recommends movies** based on genre and suitability.
- Handles missing values and encodes features. 3. **Provides additional insights** like popularity when prompted.
- Provides clear feedback on each step taken. 4. **Ends with a polite and open-ended conclusion.**
2. **Model Training and Evaluation:**
- Explains the model used (Linear Regression) and key metrics (MAE, R²).
3. **Prediction and Visualization:**
- Allows the user to upload test data and generates predictions.
- Creates a scatter plot comparing actual vs. predicted values.
4. **User Guidance:**
- Proactive suggestions for saving models and exporting visualizations.
- Clear communication of insights from visualizations and results.