# Ticket #1211 (closed bug: worksforme)

## Exception "raise LinAlgError, 'Singular matrix'" when attribute has value of o in all examples in Linear Regression

Reported by: | skokko | Owned by: | lanz |
---|---|---|---|

Milestone: | Component: | library | |

Severity: | minor | Keywords: | Singular matrix |

Cc: | Blocking: | ||

Blocked By: |

### Description

I have an Example Table, and one of the variables always has the value 0.0 in every example. When running Linear Regression, I was expecting that the beta for this variable would be 0 and the algorithm would ignore this variable and solve for the rest. Instead it raises an exception 'Singular matrix' in line 328 of file linalg.py: " if resultsinfo? > 0: raise LinAlgError, 'Singular matrix'".

## Change History

### comment:2 Changed 2 years ago by lanz

Could you be a little more specific about which version of orange and numpy you are using (try the latest if you are not using it already) and how to reproduce this error.

I tried adding a constant variable (all 0.0) to the *housing.tab* data set and when I ran Orange.regression.linear.LinearRegressionLearner it worked without problems. The coefficient for the constant variable was 0.0, as you suggest it should be.

**Note:**See TracTickets for help on using tickets.