Skip to content
C

Problem 2: Predict Using Multiple Features

Easypython

Problem 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

text
X = [[10,2],[15,3],[20,3]], y = [200,250,280], new_examples = [[18,3],[25,4]]

Example Output

text
Predictions: [267.5 331.2]

Concepts Covered

.predict() with multiple features.

Input (stdin)

Output

Run your code to see output here...