Problem 2: Predict Using Multiple Features
Easypython
Learn the Concept: Multiple Linear RegressionProblem Description
Write a Python program that trains a Multiple Linear Regression model and predicts the output for 2 new examples, each with multiple feature values.
Input
Training data with multiple features, and 2 new examples to predict.
Output
The predicted values for the 2 new examples.
Constraints
- None specific.
Example Input
textX = [[10,2],[15,3],[20,3]], y = [200,250,280], new_examples = [[18,3],[25,4]]
Example Output
textPredictions: [267.5 331.2]
Concepts Covered
.predict() with multiple features.
Related Problems
- Problem 1: Fit a Multiple Linear Regression ModelEasy · pythonSolve Problem
- Problem 3: Compare Coefficient Magnitudes After ScalingEasy · pythonSolve Problem
- Problem 4: Check for Multicollinearity Before ModelingEasy · pythonSolve Problem