singular

How to find degenerate rows/columns in a covariance matrix

拟墨画扇 提交于 2019-11-28 08:38:37
I am using numpy.cov to create a covariance matrix from a dataset of over 400 time series. Using linalg.det gives me a value of zero so matrix is singular. I can use linalg.svd to see that the rank is two less than the number of columns so somewhere in the covariance matrix I have some linear combinations to make the matrix degenerate. I have used corrcoef on the underlying timeseries but no correlation > 0.78 so not obvious there. Can someone suggest a method to determine the location of the degenerate columns. Thank you. If you take the QR decomposition of a matrix A , the columns of R with

Ruby on rails: singular resource and form_for

纵然是瞬间 提交于 2019-11-28 05:11:15
I want user to work with only one order connected to user's session. So I set singular resource for order routes.rb: resource :order views/orders/new.html.erb: <%= form_for @order do |f| %> ... <% end %> But when I open the new order page I get an error: undefined method `orders_path` I know, that I can set :url => order_path in form_for , but what is the true way of resolving this collision? mckeed Unfortunately, this is a bug . You'll have to set the url like you mention. = form_for @order, :url => orders_path do |f| Where does that magic path come from? It took me a lot of tracing but I

Ruby on rails: singular resource and form_for

让人想犯罪 __ 提交于 2019-11-27 05:30:50
问题 I want user to work with only one order connected to user's session. So I set singular resource for order routes.rb: resource :order views/orders/new.html.erb: <%= form_for @order do |f| %> ... <% end %> But when I open the new order page I get an error: undefined method `orders_path` I know, that I can set :url => order_path in form_for , but what is the true way of resolving this collision? 回答1: Unfortunately, this is a bug. You'll have to set the url like you mention. = form_for @order,