[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

*Subject*: Re: how to speed up multiple regressions?*From*: Craig Markwardt <craigmnet(at)cow.physics.wisc.edu>*Date*: 30 Apr 2001 16:04:11 -0500*Newsgroups*: comp.lang.idl-pvwave*Organization*: U. Wisc. Madison Physics -- Compact Objects*References*: <3AED9E52.DD89C5D5@atmos.colostate.edu> <onzocytev9.fsf@cow.physics.wisc.edu> <3AEDC171.804DC55@atmos.colostate.edu>*Reply-To*: craigmnet(at)cow.physics.wisc.edu*Xref*: news.doit.wisc.edu comp.lang.idl-pvwave:24757

Charlotte DeMott <demott@atmos.colostate.edu> writes: > Hi Craig, > > Thanks for taking a look. I was hoping someone would point out to me a very > obvious blunder I was making. I had high hopes upon reading your message, > but I think I'm sticking all of this in a loop to compute the significance > because datadof is NOT a constant for all points in my array. In the first > loop I included in the original post, data_tau is the decorrelation timescale > at each data point which is, unfortunately, not constant. T_CVF, as you > indicated, requires the 2nd argument (datadof in my case) to be a scalar. My > problem is that datadof isn't the same for all data points. > > However, your post make me realize that I can do the regression in a slightly > different way that will eliminate this problem, and save me loads of time. > > So while your suggestion wasn't the fix I was looking for, it jarred my tired > brain enough to think of another work-around. So thanks! Okay, so I didn't see that data_tau was variable, sorry :-) I'm glad you figured out a way to do it. I wanted to mention a possible way to get around the T_CVF problem. What you can do is precompute a table of values and then use spline interpolation. Spine interpolation using SPL_INIT and SPL_INTERP is vectorizable, so it should be really fast. You can put a lot of samples into your table so it can be quite precise (you might interpolate in log-log space if your dynamic range is large). Craig -- -------------------------------------------------------------------------- Craig B. Markwardt, Ph.D. EMAIL: craigmnet@cow.physics.wisc.edu Astrophysics, IDL, Finance, Derivatives | Remove "net" for better response --------------------------------------------------------------------------

**References**:**how to speed up multiple regressions?***From:*Charlotte DeMott

**Re: how to speed up multiple regressions?***From:*Craig Markwardt

**Re: how to speed up multiple regressions?***From:*Charlotte DeMott

- Prev by Date:
**Re: how to speed up multiple regressions?** - Next by Date:
**forcing variable definition in IDL?** - Prev by thread:
**Re: how to speed up multiple regressions?** - Next by thread:
**% Loop limit expression too large for loop variable type.** - Index(es):