Displaying 4 results from an estimated 4 matches for "scaled_valu".
Did you mean:
scaled_value
2011 Jun 03
0
ragged data.frame? using plyr
...want to "normalise" it using the following function (unless you have
a better idea...):
adj.values<-function(dframe){
value_mean<-mean(dframe$value)
value_sd<-sd(dframe$value)
norm_value<-(dframe$value-value_mean)/value_sd
score_scale<-100
score_offset<-1000
scaled_value<-norm_value*score_scale+score_offset
names(scaled_value)<-dframe$id
return(scaled_value)
}
score_out<-ddply(dat,.(day),adj.values)
Gives me my data.frame all nice and pretty and ready to do the following:
score_out.melt<-melt(score_out,id='day')
names(score_out.melt)<...
2007 May 03
2
[patch] Mac Universal Binaries
On 5/3/07, Erik de Castro Lopo <mle+la@mega-nerd.com> wrote:
> Peter Grayson wrote:
>
> Personally I think universal binaries are a bad idea.
They have obviously served some purpose, but I tend to agree that the
concept does not seem to scale well once outside the Apple microcosm.
> For one of my projects, libsndfile, endian issues is not the only
> think that breaks in
2007 May 03
0
[patch] Mac Universal Binaries
...83649.0 -2147483648 -2147483648 (0x80000000)
-2147483650.0 -2147483648 -2147483648
As you can see out of range floats are correctly clipped on PPC,
but only correctly clipped for negative floats on x86.
libsndfile has code a bit like this:
if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= 1.0 * 0x7FFFFFFF)
int_value = 0x7fffffff ;
if (CPU_CLIPS_NEGATIVE == 0 && scaled_value <= (-8.0 * 0x10000000))
int_value = 0x80000000 ;
On PPC, the above two lines get optimised out. On Intel x86, only
the second gets optimised out.
> Do they affect all...
2007 May 03
2
[patch] Mac Universal Binaries
...version somewhere
will overflow and 2) optimise it out (since it's undefined anyway) or do
other funny things with it. That's why I wouldn't depend on the right
thing happening, even on PPC.
> libsndfile has code a bit like this:
>
> if (CPU_CLIPS_POSITIVE == 0 && scaled_value >= 1.0 * 0x7FFFFFFF)
> int_value = 0x7fffffff ;
>
> if (CPU_CLIPS_NEGATIVE == 0 && scaled_value <= (-8.0 * 0x10000000))
> int_value = 0x80000000 ;
>
> On PPC, the above two lines get optimised out. On Intel x86, only
> the second gets optim...