Search code examples
linear-regressionorange

How to perform simple linear regression with Orange


I'm learning Orange and I want to perform a super simple task: simple linear regression with made up data points. I want to start from scratch, using data generated with the Paint Data tool. This is the workflow I have created.

enter image description here

What's wrong with this approach? Why do I get the error? It must be somehow related to the use of Paint Data tool, that perhaps requires some sort of processing? I inspected the data with Scatter Plot and it looks as expected.


Solution

  • Reading the error message could help. :) It says "Training data requires a target variable". In a more statistical terminology, Paint data outputs two independent variables, and although they are named x and y, and y is a name we often use for dependent variable, Test and Score won't do the guesswork.

    Insert a "Select Columns" widget between Paint Data and Test and Score, and drag "y" to "Target variable".