1. Home
  2. Explore
  3. Computer Science
  4. Linear Regression Overview

Study methods

Flashcards
Quiz
Fill in the blanks
Written test
Lesson
Notes
Podcast
Content

Linear Regression Overview

  • 42Unfamiliar
  • 0Learning
  • 0Familiar
  • 0Mastered
Topic: Regression Fundamentals
Regression analysis helps us understand the relationship between two or more variables by creating a
model.

42 questions

  1. 1
    Regression analysis helps us understand the relationship between two or more variables by creating a
    _____
    model.
    Hint

    Think about what the model does with the variables.

    Answer

    predictive

  2. 2
    In regression, the variable we want to predict is called the
    _____
    variable.
    Hint

    It depends on the other variables.

    Answer

    dependent

  3. 3
    In linear regression, the dependent variable must be a
    _____
    numerical value.
    Hint

    Think about the type of data that can take any value within a range.

    Answer

    continuous

  4. 4
    The equation of a straight line in simple linear regression is y=mx+cy = mx + cy=mx+c, where mmm is the
    _____
    and ccc is the intercept.
    Hint

    It indicates how much y changes when x increases by one unit.

    Answer

    slope

  5. 5
    The difference between the actual value of yyy and the predicted value from the regression line is called the
    _____
    .
    Hint

    It's also known as the error in prediction.

    Answer

    residual

  6. 6
    The best-fit line in linear regression is the one that minimizes the sum of squared
    _____
    .
    Hint

    It's the criterion for choosing the line.

    Answer

    residuals

  7. 7
    In multiple linear regression, the equation involves more than one
    _____
    variable.
    Hint

    These are the predictors or features.

    Answer

    independent

  8. 8
    In multiple linear regression, the model represents a
    _____
    in higher dimensions.
    Hint

    It's a generalization of a line to more than two dimensions.

    Answer

    hyperplane

  9. 9
    Before building a linear regression model, the dataset is typically split into a
    _____
    set and a testing set.
    Hint

    This set is used to teach the model.

    Answer

    training

  10. 10
    The metric that measures the average squared difference between actual and predicted values is called
    _____
    .
    Hint

    It's often abbreviated as MSE.

    Answer

    mean squared error

  11. 11
    The square root of the mean squared error is called
    _____
    .
    Hint

    It's in the same units as the target variable.

    Answer

    root mean squared error

  12. 12
    The coefficient of determination, denoted as
    _____
    , measures the proportion of variance in the dependent variable explained by the model.
    Hint

    It's often written as R-squared.

    Answer

    R2R^2R2

  13. 13
    Adjusted R-squared is preferred over R-squared because it penalizes the inclusion of
    _____
    variables.
    Hint

    Variables that do not improve the model.

    Answer

    useless

  14. 14
    One assumption of linear regression is that there is a
    _____
    relationship between the independent and dependent variables.
    Hint

    The model assumes a straight-line relationship.

    Answer

    linear

  15. 15
    Another assumption is that the residuals are normally distributed with mean
    _____
    .
    Hint

    The average of the errors should be zero.

    Answer

    zero

  16. 16
    Homoscedasticity means that the variance of residuals is
    _____
    across all levels of the independent variable.
    Hint

    Opposite of heteroscedasticity.

    Answer

    constant

  17. 17
    Multicollinearity occurs when independent variables are highly
    _____
    with each other.
    Hint

    They are not independent as assumed.

    Answer

    correlated

  18. 18
    The correlation coefficient rrr measures the
    _____
    and direction of a linear relationship between two variables.
    Hint

    It ranges from -1 to +1.

    Answer

    strength

  19. 19
    When rrr is close to zero, it indicates no
    _____
    relationship, but there could still be a nonlinear relationship.
    Hint

    The coefficient only captures straight-line correlations.

    Answer

    linear

  20. 20
    Outliers can have a strong influence on the regression line, often
    _____
    it toward themselves.
    Hint

    They can distort the best-fit line.

    Answer

    pulling

  21. 21
    When a categorical variable has no natural order (e.g., gender), it should be converted using
    _____
    encoding.
    Hint

    Creates dummy variables for each category.

    Answer

    one-hot

  22. 22
    For missing values in numeric columns, a common imputation strategy is to use the
    _____
    of that column.
    Hint

    It is robust to outliers.

    Answer

    median

  23. 23
    Columns with very low variance (e.g., almost all values the same) are often removed using a
    _____
    filter.
    Hint

    They provide little information for prediction.

    Answer

    low variance

  24. 24
    In R, the function used to fit a linear regression model is
    _____
    .
    Hint

    Stands for linear model.

    Answer

    lm

  25. 25
    Gradient descent is an optimization algorithm that iteratively updates model parameters to minimize the
    _____
    .
    Hint

    Also called loss function.

    Answer

    cost function

  26. 26
    The size of the step taken during gradient descent is controlled by the
    _____
    rate.
    Hint

    Too high can cause overshooting; too low slows convergence.

    Answer

    learning

  27. 27
    In linear regression, the coefficients represent the
    _____
    change in the dependent variable for a one-unit change in the independent variable.
    Hint

    It's the expected effect.

    Answer

    average

  28. 28
    The point (xˉ\bar{x}xˉ, yˉ\bar{y}yˉ​) always lies on the
    _____
    regression line.
    Hint

    It's a property of ordinary least squares.

    Answer

    best-fit

  29. 29
    When building a model in R, the predicted values can be obtained using the
    _____
    function.
    Hint

    It's a generic function for model predictions.

    Answer

    predict

  30. 30
    In Python, after fitting a LinearRegression model, predictions on test data are obtained by calling the
    _____
    method.
    Hint

    Same as in R, but it's a method.

    Answer

    predict

  31. 31
    The difference between the total sum of squares (SST) and the sum of squared errors (SSE) is the sum of squares due to
    _____
    (SSR).
    Hint

    It represents the variation explained by the model.

    Answer

    regression

  32. 32
    If the residuals show a pattern (e.g., increasing spread as X increases), it indicates a violation of the
    _____
    assumption.
    Hint

    The opposite of constant variance.

    Answer

    homoscedasticity

  33. 33
    When a categorical variable has an ordinal nature (e.g., low, medium, high), you can use
    _____
    encoding to convert it to numbers.
    Hint

    Assigns integers like 0, 1, 2.

    Answer

    label

  34. 34
    The R function summary() on an lm object provides the
    _____
    of the model, including coefficients and R-squared.
    Hint

    It's the same name as the function.

    Answer

    summary

  35. 35
    When using the lm() function in R, the dependent variable is placed on the
    _____
    side of the tilde (~) in the formula.
    Hint

    It's y ~ x.

    Answer

    left

  36. 36
    A major reason for splitting data into training and test sets is to avoid
    _____
    on the training data.
    Hint

    The model may memorize rather than generalize.

    Answer

    overfitting

  37. 37
    In the context of the lecture, the 'mpg' dataset is used to predict
    _____
    from weight, horsepower, etc.
    Hint

    Miles per gallon.

    Answer

    mileage

  38. 38
    The gradient descent algorithm uses
    _____
    derivatives to update parameters in the direction of steepest descent.
    Hint

    It considers the effect of changing one parameter at a time.

    Answer

    partial

  39. 39
    A model with R2R^2R2 close to 1 indicates a very good fit, but it may still have high
    _____
    if overfitted.
    Hint

    It's about the model's sensitivity to training data.

    Answer

    variance

  40. 40
    In the diamond dataset example, the root mean squared error for the first model (price ~ carat) was about
    _____
    .
    Hint

    It's a number around 1000.

    Answer

    1002

  41. 41
    The second model with carat, x, y, z had a higher RMSE of about
    _____
    , showing it performed worse.
    Hint

    It's larger than the first model's RMSE.

    Answer

    1574

  42. 42
    When using predict() in R on test data, you pass the new data as a
    _____
    frame with the same column names.
    Hint

    It's a rectangular data structure.

    Answer

    data

1 of 42
Question 1 of 42

Ask anything

We've read this whole study set, so questions about it get the best answers.

FlashcardsQuizFill in the blanksWritten testLessonNotesPodcastContent