diaohancai opened a new pull request, #280:
URL: https://github.com/apache/incubator-hugegraph-computer/pull/280

   ## Purpose of the PR
   
   - implement #279 
   
   
   ## Main Changes
   
   The current random walk algorithm requires 2 additional features.
   
   1. Biased random walk.
   2. Second order random walk.
   
   Add the following parameters:
   ```java
       private String weightProperty;
       private Double defaultWeight;
       private Double minWeightThreshold;
       private Double maxWeightThreshold;
    
       private Double returnFactor;
       private Double inOutFactor;
   ```
   
   1. `String weightProperty`. To implement biased random walk. The higher the 
weight, the higher the probability of walking.
   2. `Double defaultWeight`. Provide a default value if the weight is null.
   3. `Double minWeightThreshold`. Truncate when weight is less than the 
threshold to avoid too small weight.
   4. `Double maxWeightThreshold`. Truncate when weight exceeds the threshold 
to avoid overweighting.
   5. `Double returnFactor`. Controls the probability of re-walk to a 
previously walked vertex.
   6. `Double inOutFactor`. Controls whether to walk inward or outward.
   
   For more details about `returnFactor` and `inOutFactor`, please refer to the 
paper《node2vec: scalable feature learning for networks》.
   
   ## Verifying these changes
   
   - [ ] Trivial rework / code cleanup without any test coverage. (No Need)
   - [ ] Already covered by existing tests, such as *(please modify tests 
here)*.
   - [X] Need tests and can be verified as follows.
   Unit test: `org.apache.hugegraph.computer.algorithm.sampling.RandomWalkTest`
   
   
   ## Does this PR potentially affect the following parts?
   
   - [X]  Nope
   - [ ]  Dependencies (add/update license info) <!-- Don't forget to 
add/update the info in "LICENSE" & "NOTICE" files (both in root & dist module) 
-->
   - [ ]  Modify configurations
   - [ ]  The public API
   - [ ]  Other affects (typed here)
   
   ## Documentation Status
   
   <!-- DO NOT REMOVE THIS SECTION. CHECK THE PROPER BOX ONLY. -->
   
   - [ ]  `Doc - TODO` <!-- Your PR changes impact docs and you will update 
later -->
   - [ ]  `Doc - Done` <!-- Related docs have been already added or updated -->
   - [X]  `Doc - No Need` <!-- Your PR changes don't impact/need docs -->
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to