Get Started

Results of the model fit using summary()

In the previous exercise you fitted a logistic regression model wells_fit using glm() and .fit(). The second step after fitting the model is to examine the model results. To do this you will use the .summary() function, which provides an overview of the model coefficients and how well they fit, along with several other statistical measures.

In the lessons to come, you will learn how to interpret the model output and the details of the given statistical measures and how to interpret them.

The model wells_fit has been preloaded in the workspace.

This is a part of the course

“Generalized Linear Models in Python”

View Course

Exercise instructions

  • Using summary(), view the model summary from wells_fit.

Hands-on interactive exercise

Have a go at this exercise by completing this sample code.

# View the results of the wells_fit model
____(____.____)
Edit and Run Code

This exercise is part of the course

Generalized Linear Models in Python

AdvancedSkill Level
5.0+
3 reviews

Extend your regression toolbox with the logistic and Poisson models and learn to train, understand, and validate them, as well as to make predictions.

Review linear models and learn how GLMs are an extension of the linear model given different types of response variables. You will also learn the building blocks of GLMs and the technical process of fitting a GLM in Python.

Exercise 1: Going beyond linear regressionExercise 2: Applying linear modelsExercise 3: Linear model, a special case of GLMExercise 4: How to build a GLM?Exercise 5: Data type and distribution familyExercise 6: Linear model and a binary response variableExercise 7: Comparing predicted valuesExercise 8: How to fit a GLM in Python?Exercise 9: Model fitting step-by-stepExercise 10: Results of the model fit using summary()
Exercise 11: Extracting parameter estimates

What is DataCamp?

Learn the data skills you need online at your own pace—from non-coding essentials to data science and machine learning.

Start Learning for Free