更新时间:2022-12-08 GMT+08:00
Personal_rank算法
您可以使用GES提供的接口执行personal_rank算法。示例代码如下
public static void executeAlgorithm(GraphClient graphClient) throws ApiException { PersonalRankParameters parameters = new PersonalRankParameters(); parameters.setMaxIterations(1000); parameters.setSource("46"); AlgorithmReq req = new AlgorithmReq(); req.setAlgorithmName(AlgorithmNames.PERSONAL_RANK); req.setParameters(parameters); AsyncAPIResp asyncAPIResp = graphClient.algorithmQuery(req); String jobId = asyncAPIResp.getJobId(); PersonalRankJobReq req1 = new PersonalRankJobReq(); req1.setJobId(jobId); JobResp<QueryData<PersonalRankResult>> resp = graphClient.queryJobStatus(req1); System.out.println(resp); }
父主题: 执行算法