Ticket #1211 (closed bug: worksforme)

Opened 2 years ago

Last modified 2 years ago

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:


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:1 Changed 2 years ago by ales

  • Status changed from new to assigned
  • Owner set to lanz

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.

comment:3 Changed 2 years ago by skokko

I have the same behavior without the constant variable. I opened a new ticket for this, since it is not exactly the same problem (ticket $1217)

Thank you

comment:4 Changed 2 years ago by lanz

  • Status changed from assigned to closed
  • Resolution set to worksforme

OK, I am closing this ticket.

Note: See TracTickets for help on using tickets.