Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature request: new keyword ratio_shared_weight #8

Open
tien-vo-xuan opened this issue Aug 25, 2012 · 0 comments
Open

Feature request: new keyword ratio_shared_weight #8

tien-vo-xuan opened this issue Aug 25, 2012 · 0 comments

Comments

@tien-vo-xuan
Copy link

Scenario to use:
When number of out-edge becomes large (using sub-graph), no way to set weight such as:

  • Very small. If you set one edge is 0.01w, 99 others edge share 0.99w, so each edge has 0.01w. So 0.01w is not 'very small' at this time.
  • Very big? no, simply set weight=0.99, and it will always be very big.

How to use:

  • Same as weight.
  • 0 <= ratio_shared_weight <= 1
  • ratio_shared_weight can be combined with other keywords but weight.

How it work:

  • When an edge (e_A) has ratio_shared_weight , this edge has shared mode.
  • When an edge (e_B) has no keyword weight, or weight=0, weight=-0, weight=0.00, weight=-0.00..., this edge has shared mode.
  • e_A's weight = ratio_shared_weight * e_B's weight.
  • Assume we has n shared mode edges. Only one edge has ratio_shared_weight=y. We call weight of this edge is Y. We call weight of other edges is X (the same value).
  • (n - 1) * X + y * X = 1
  • => X = 1 / (n + y - 1)
  • => Y = y * X

Example:

  • We have 99 edges has no keyword weight and ratio_shared_weight. Each edge has weight=X.
  • 1 edge has ratio_shared_weight=0.01. This edge has weight = Y.
  • 99 * X + 0.01 * X = 1
  • X = 1 / (99 + 0.01) ~= 0.0101
  • Y = 0.01 * 0.0101 = 0.000101 << X

Note: the name ratio_shared_weight maybe a bad name, please choose other name if this feature is okay.

Sorry for my english, Please fix me!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant