Re: Multi-variable Math -- Array best choice?
Re: Multi-variable Math -- Array best choice?
- Subject: Re: Multi-variable Math -- Array best choice?
- From: Lachlan Deck <email@hidden>
- Date: Mon, 27 Aug 2007 08:40:40 +1000
On 27/08/2007, at 5:48 AM, Drew Thoeni wrote:
I have to implement a regression formula that has about 200
coefficients, so for each incoming item to be scored, we get around
200 indicator (boolean) and continuous variables that have to be
multiplied by each variable's coefficient then all summed together.
I'm thinking of putting the incoming variables in an array, the
coefficients in an array and then cycling through the two arrays
multiplying each and summing them as I go.
A few questions:
Does WO implement something beyond Java for this?
Is this the best pattern to use, or does someone have a better
pattern? If WO does not have a specific method for handling such
situations, I will happily take your pointing me outward to the
Java forums.
I imagine that cycling through yourself manually may be more
performant but if you're looking for a WO hook you might want to take
a look at registering a custom NSArray.Operator.
ERXArrayUtilities adds a few more operators on top of the usual @sum
etc.
with regards,
--
Lachlan Deck
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Webobjects-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden