Jump to content

weighted normalized distribution (math challenge)


Recommended Posts

Hey smart people,

 

Im not sure if the topic title describes my problem very well but,...

 

I have a math problem that's been holding me up.

Maybe someone out there can help.

 

Say I have a bunch of points with normalized values

sorted by highest to lowest like...

 

@ptnum      @value

0                 .9

1                 .4

2                 .3

3                 .01

ect..

 

How do I now remap "value" for each point so that the total adds up to one?

BUT this new distributed remapped value is weighted by the original value.

 

 

The obvious thing to do would be: (@value/sum of @value) but the result is:

 

 

@ptnum      @value             @simple normalized

0                  .9                      .55

1                  .4                      .24

2                  .3                      .186

3                  .01                    .00621

ect..

 

This kind of remapping is not ideal because  point 0 is has a very high value which gets lost.

In the case above I could keep point 0 at .9 the distribute the remaining .1 across the rest of the points.

Which I know how to do but what happens when you have a case like:

 

 

@ptnum      @value           

0                  .6                      

1                  .58                    

2                  .52                   

3                  .1    

4                  .1             

ect..

 

In this case I would need to average the first three points then distribute the remainder across the rest of the points.

Is there a really smart solution out there that doesnt involve setting up test conditions then adapting the code?

 

I've attached a hip file that demonstrated the problem..

Thx!

 

 

 

mathProb.hiplc

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...