[this page on wiki][index][EN][BG][CS][DA][DE][EL][ES][ET][FI][FR][GA][HR][HU][IT][MT][NL][PL][PT][RO][SK][SL][SV]

Practical: Linear Regression

Administrative Information

Title Linear Regression
Duration 60
Module A
Lesson Type Practical
Focus Practical - AI Modelling
Topic AI modeling

Keywords

linear regression, maximum likelihood, maximum a posteriori, basis functions,

Learning Goals

Expected Preparation

Learning Events to be Completed Before

Obligatory for Students

  • A review of basic linear algebra and solving linear systems numerically.

Optional for Students

None.

References and background for students

Recommended for Teachers

  • A review of how the numpy functions used in the notebook are parameterized.

Lesson materials

Instructions for Teachers

This learning event consist of laboratory tasks that shall be solved by the students with the help of the leading instructor.

Prepare a notebook environment with numpy, matplotlib and scikit-learn installed.

Outline/time schedule

Duration (min) Description Concepts
5 Brief of the tasks to be conducted
5 Generating linear datasets with Gaussian noise additive noise, np.random.randn()
15 Fitting and evaluating linear regression models in via linear solvers matrix operations in numpy, np.linalg.solve(), RMSE, plotting
10 Transforming samples and polynomial regression Vandermonde-matrix, np.power.outer()
10 Fitting and evaluating linear models with regularization Numerical stability, condition number, plotting
15 Fitting a linear model on real datasets scikit-learn: StandardScaler(), LinearRegression()

Acknowledgements

The Human-Centered AI Masters programme was Co-Financed by the Connecting Europe Facility of the European Union Under Grant №CEF-TC-2020-1 Digital Skills 2020-EU-IA-0068.