# If my data looks like this, is linear regression just never gonna be useful?

Clearly you can see that there is no linear relationship. If there was one it would be a vertical line which is not that useful. I need some type of regression rather than classification as the output is continuous. The only options I can think of are neural networks and SVR (support vector regressors). Is linear regression a waste of time here? What would you use?

The use case is - I am trying to predict the rgb color of a polygon based on its area, length, index, complexity, #of lines, # of curves, and intensity (black and white).

In this first step I am merely trying to predict the amount of red from 0 to 1. (scaled down from 255).

Edit:

here are the labels - rgb values: http://www.heypasteit.com/clip/2HZX

here is the data with the 7 features: http://www.heypasteit.com/clip/2HZY

• its really hard to see this data... can you jitter your plots? Or zoom in towards x=0... what's the scale on the x-axis? Or better yet, do you have a sample of the actual data? – Brandon Loudermilk Mar 3 '16 at 23:49
• added samples of the data in those urls – BigBoy1337 Mar 4 '16 at 0:03
• It seems some of your inputs have exaggerated values. Try ignoring them, or excluding them from the plots. – Emre Mar 4 '16 at 0:10
• That might possibly help. In general, are there times where linear regression is just a waste and clearly not gonna work - like if you see data like it is here? Or is there always something that you can do to get the data into a form where linear regression might work - like removing outliners, etc. – BigBoy1337 Mar 4 '16 at 0:17
• It works when there is a linear relationship between the features and the response. If you picked the features yourself, you should have some idea about whether such a relationship holds, otherwise you find out when you try. It helps to know something about the process that relates the input to the output. – Emre Mar 4 '16 at 0:22

I tried running a RANSAC model on your data, but got worse results than a straight linear regressor. The ten-fold cross-validated mean absolute error over all three response variables (r,g,b) for the linear model was about 0.37. I also ran a random forest model for comparison, and got about the same score. This suggests that the linear model is not shabby, but it is up to you to decide if either is good enough.

import sklearn.linear_model, sklearn.cross_validation, sklearn.ensemble, pandas