[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: transformation question
From: |
Ben Pfaff |
Subject: |
Re: transformation question |
Date: |
Wed, 26 Apr 2006 14:45:32 -0700 |
User-agent: |
Gnus/5.110004 (No Gnus v0.4) Emacs/21.4 (gnu/linux) |
Jason Stover <address@hidden> writes:
> On Wed, Apr 26, 2006 at 11:44:10AM -0700, Ben Pfaff wrote:
>> Finally: I'm a little confused about the context you're talking
>> about. How (or why) would you be examining a variable before the
>> transformations that initialize it have executed? It sounds like
>> there's some important fact here that I'm missing.
>
> Users should be able to save many different variables that result from
> the REGRESSION procedure. I just checked in some code that lets
> them save residuals and predicted values. The problem was that
> the first transformation to execute needs to look in the dictionary
> and scan cases, which haven't been completely filled in. I checked in a
> fix for it after I sent my last message. I hope it isn't too offensive.
I'm glad I'm not offended so easily. It would make it very hard
to work with other people.
I took a look at the updated code. The transformation procedure
here, in regression_trns_resid_proc(), is very unusual. For each
case, it obtains the complete set of variables in default_dict
and iterates through them, examining those variables that appear
in the model and their values in the current case.
This is what the code appears to do now:
Each time the transformation procedure is passed a case:
Look at each variable in default_dict. If it's one we
recognize, do something with its value in the case. Do
some calculations on those values and produce some output
in the current case.
If that's correct, here's the way I would have expected it to be
done:
While assembling the transformation: Make a list of the
variables involved.
Each time the transformation procedure is passed a case:
Iterate through the list of variables involved. We know
they're involved, because they're in the list, so we do
something with its value in the case. Do some
calculations on those values and produce some output in
the current case.
In other words, the core code is the same, but we make the list
of variables that are involved in advance so we don't have to do
it every time through a case.
You're concerned about what variables are initialized, but I
don't know whether that's relevant. If I understand correctly,
the code only needs to look at the values of variables that it
examined during the procedure, and those variables are definitely
initialized. I don't think it looks at the values of other
variables at all (right?).
Do I misunderstand what is going on?
--
God leaned close as mud as man sat up, looked around, and spoke. Man blinked.
"What is the purpose of all this?" he asked politely. "Everything must have a
purpose?" asked God. "Certainly," said man. "Then I leave it to you to think
of one for all this," said God. And He went away. --Vonnegut, _Cat's Cradle_