Skip to content
CampusEduX

Problem 2: Predict Using Multiple Features

Easypython
Learn the Concept: Multiple Linear Regression

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.

Related Problems

  • Problem 1: Fit a Multiple Linear Regression Model
    Easy · python
    Solve Problem
  • Problem 3: Compare Coefficient Magnitudes After Scaling
    Easy · python
    Solve Problem
  • Problem 4: Check for Multicollinearity Before Modeling
    Easy · python
    Solve Problem

Input (stdin)

Output

Run your code to see output here...