{"id":2344,"date":"2020-08-03T15:46:09","date_gmt":"2020-08-03T07:46:09","guid":{"rendered":"http:\/\/ufqi.com\/blog\/?p=2344"},"modified":"2020-08-05T07:59:28","modified_gmt":"2020-08-04T23:59:28","slug":"graph-similarity-algorithm-polar-neo4j","status":"publish","type":"post","link":"https:\/\/ufqi.com\/blog\/graph-similarity-algorithm-polar-neo4j\/","title":{"rendered":"Graph\u5716\u7684\u76f8\u4f3c\u6027\u8a08\u7b97\u7684\u6975\u503c\u554f\u984c"},"content":{"rendered":"<p>\u6578\u64da\u96c6\u7684\u76f8\u4f3c\u6027\u8a08\u7b97\uff0c\u5176\u61c9\u7528\u5341\u5206\u5ee3\u6c4e\uff0c\u5728\u73fe\u6709\u7684\u5404\u985e\u4eba\u5de5\u667a\u80fd\u7684\u5e95\u5c64\u7b97\u6cd5\u4e2d\uff0c\u5927\u591a\u6578\u90fd\u662f\u57fa\u65bc\u6982\u7387\uff08\u53ef\u80fd\u6027\uff09\u7684\u8fd1\u4f3c\u8a08\u7b97\uff0c\u7136\u5f8c\u53d6\u6700\u5927\u53ef\u80fd\u6027\u7684\u8fd1\u4f3c\u503c\u3002\u53c3\u8003\u00a0<a title=\"\u7406\u89e3\u8ba1\u7b97\uff1a\u4ece\u6839\u53f72\u5230AlphaGo \u2014\u2014\u7b2c1\u5b63 \u4ece\u6839\u53f7\u8c08\u8d77\" href=\"https:\/\/ufqi.com\/news\/ulongpage.191.html\">\u7406\u89e3\u8ba1\u7b97\uff1a\u4ece\u6839\u53f72\u5230AlphaGo \u2014\u2014\u7b2c1\u5b63 \u4ece\u6839\u53f7\u8c08\u8d77<\/a>\u00a0\uff08\u00a0<a href=\"https:\/\/ufqi.com\/news\/ulongpage.191.html\">https:\/\/ufqi.com\/news\/ulongpage.191.html<\/a> \uff09\u3002 \u53e6\u5916\u4f7f\u7528\u795e\u7d93\u7db2\u7d61\u53ef\u4ee5\u6a21\u64ec\u4efb\u610f\u66f2\u7dab\u51fd\u6578\uff0c<a href=\"http:\/\/neuralnetworksanddeeplearning.com\/chap4.html\">A visual proof that neural nets can compute any function<\/a>\u00a0\uff08\u00a0<a href=\"http:\/\/neuralnetworksanddeeplearning.com\/chap4.html\">http:\/\/neuralnetworksanddeeplearning.com\/chap4.html<\/a> \uff09 \u3002<br \/>\u751a\u81f3\uff0c\u5728\u65e9\u671f\u7684\u641c\u7d22\u5f15\u64ce\u7684\u8a08\u7b97\u4e2d\uff0c\u5982\u679c\u8a08\u7b97\u5169\u500b\u6bb5\u843d\u6216\u8005\u5169\u7bc7\u6587\u7ae0\u7684\u76f8\u4f3c\u6027\uff0c\u4e5f\u6709\u4f7f\u7528\u57fa\u65bc\u5716\u7684\u7b97\u6cd5\uff0c\u5c07\u6bcf\u7bc7\u6587\u7ae0\u8996\u7232\u4e00\u500b graph\uff0c\u7136\u5f8c\u4f7f\u7528\u4e0b\u9762\u7684\u5716\u7684\u76f8\u4f3c\u6027\u7684\u7b97\u6cd5\u4f86\u8a08\u7b97\u5169\u8005\u4e4b\u9593\u7684\u76f8\u4f3c\u6027\u3002<\/p>\n<p>\u5f9e\u4e00\u5806\u5716\u7247\u4e2d\u627e\u5230\u8c93\u7684\u7167\u7247\u662f\u985e\u4f3c\u7b97\u6cd5\uff0c\u8eca\u724c\u8b58\u5225\u662f\u9019\u7a2e\u7b97\u6cd5\uff0c\u4eba\u81c9\u8b58\u5225\u3001\u8a9e\u97f3\u8b58\u5225\u7b49\u90fd\u662f\u985e\u4f3c\u7684\u61c9\u7528\uff0c\u795e\u7d93\u7db2\u7d61\u3001\u6df1\u5ea6\u5b78\u7fd2\u7b49\uff0c\u83ab\u4e0d\u5982\u662f\u3002\u4eba\u5de5\u667a\u80fdAI\u4e4b\u5916\uff0c\u6211\u5011\u770b\u5230\u5404\u7a2e\u57fa\u65bc\u8208\u8da3\u7684\u5546\u54c1\u63a8\u85a6\uff0c\u5728\u7dab\u5ee3\u544a\u7684\u667a\u80fd\u5339\u914d\u7b49\u7b49\uff0c\u90fd\u6709\u9019\u4e9b\u7b97\u6cd5\u7684\u8eab\u5f71\u3002<br \/>\u6211\u5011\u66fe\u7d93\u958b\u5c55\u904e\u5728\u7dab\u5ee3\u544a\u9ede\u64ca\u7387\u9810\u6e2c\u6a21\u578b\uff0c\u5176\u4e2d\u904b\u7528\u5230KNN\u7b97\u6cd5\uff0c\u5176\u6838\u5fc3\u5c31\u7528\u5230\u4e86 Euclidean Distance\u7684\u8a08\u7b97 \uff08\u00a0<a href=\"https:\/\/www.researchgate.net\/publication\/330742123_A_practical_study_on_imbalanced_data_re-sampling_for_conversion_rate_of_online_advertising\">https:\/\/www.researchgate.net\/publication\/330742123_A_practical_study_on_imbalanced_data_re-sampling_for_conversion_rate_of_online_advertising<\/a> \uff09 \u3002<\/p>\n<p>Neo4j \u95dc\u65bc\u5716\uff08Graph\uff09\u7684\u76f8\u4f3c\u6027\u8a08\u7b97\uff08<a href=\"https:\/\/neo4j.com\/docs\/graph-algorithms\/current\/labs-algorithms\/jaccard\/\">Similarity algorithm<\/a>\uff09\u63d0\u4f9b\u4e86\u82e5\u5e72\u7b97\u6cd5\u3002<br \/><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/jaccard\/\">https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/<\/a><\/p>\n<ul>\n<li><span class=\"section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/algorithms\/node-similarity\/\">5.4.1. Node Similarity<\/a><\/span><\/li>\n<li><span class=\"section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/jaccard\/\">5.4.2. Jaccard Similarity<\/a><\/span><\/li>\n<li><span class=\"section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/cosine\/\">5.4.3. Cosine Similarity<\/a><\/span><\/li>\n<li><span class=\"section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/pearson\/\">5.4.4. Pearson Similarity<\/a><\/span><\/li>\n<li><span class=\"section active-nested-section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/euclidean\/\">5.4.5. Euclidean Distance<\/a><\/span><\/li>\n<li><span class=\"section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/overlap\/\">5.4.6. Overlap Similarity<\/a><\/span><\/li>\n<li><span class=\"section\"><a href=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/alpha-algorithms\/approximate-nearest-neighbors\/\">5.4.7. Approximate Nearest<\/a><\/span><\/li>\n<\/ul>\n<p>\u9019\u4e9b\u7b97\u6cd5\u90fd\u6709\u8a73\u7d30\u7684\u89e3\u91cb\u8aac\u660e\uff0c\u6a23\u4f8b\u4ee3\u78bc\u7b49\uff0c\u9019\u88cf\u9084\u6709\u5c0d\u5e7e\u7a2e\u4e0d\u540c\u7b97\u6cd5\u7684\u5c0d\u6bd4\u5206\u6790\uff08\u53c3\u8003\uff1a\u4f59\u5f26\u8ddd\u79bb\u3001\u6b27\u6c0f\u8ddd\u79bb\u548c\u6770\u5361\u5fb7\u76f8\u4f3c\u6027\u5ea6\u91cf\u7684\u5bf9\u6bd4\u5206\u6790 \uff0c\u00a0<a href=\"https:\/\/www.jianshu.com\/p\/c4bbad87f873\">https:\/\/www.jianshu.com\/p\/c4bbad87f873<\/a> \uff09\u3002 \u5176\u4e2d\u61c9\u7528\u8f03\u591a\u7684\u662f \u9918\u5f26\u8ddd\u96e2\u548c\u6b50\u6c0f\u8ddd\u96e2\u3002<\/p>\n<p><img loading=\"lazy\" class=\"\" src=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/images\/cosine-similarity.png\" alt=\"cosine similarity\" width=\"617\" height=\"160\" \/><\/p>\n<h3 class=\"title\">Cosine Similarity\/\u9918\u5f26\u8ddd\u96e2\u8a08\u7b97\u516c\u5f0f<\/h3>\n<p><img loading=\"lazy\" class=\"\" src=\"https:\/\/neo4j.com\/docs\/graph-data-science\/current\/images\/euclidean.png\" alt=\"euclidean\" width=\"602\" height=\"96\" \/><\/p>\n<h3 class=\"title\">Euclidean Distance\/\u6b50\u6c0f\u8ddd\u96e2\u8a08\u7b97\u516c\u5f0f<\/h3>\n<p>\u5728 Neo4j \u7684\u6587\u6a94\u4e2d\uff0c\u5c0d\u9918\u5f26\u8ddd\u96e2\u548c\u6b50\u6c0f\u8ddd\u96e2\u7684\u61c9\u7528\u5834\u666f\u90fd\u6709\u5dee\u4e0d\u591a\u7684\u63cf\u8ff0\uff1a<\/p>\n<blockquote>\n<p>\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u6b27\u51e0\u91cc\u5fb7\u8ddd\u79bb\u7b97\u6cd5\u6765\u8ba1\u7b97\u4e24\u4e2a\u4e8b\u7269\u4e4b\u95f4\u7684\u76f8\u4f3c\u6027\u3002\u7136\u540e\u6211\u4eec\u53ef\u4ee5\u4f7f\u7528\u8ba1\u7b97\u51fa\u7684\u76f8\u4f3c\u5ea6\u4f5c\u4e3a\u63a8\u8350\u67e5\u8be2\u7684\u4e00\u90e8\u5206\u3002\u4f8b\u5982\uff0c\u6839\u636e\u7528\u6237\u7684\u504f\u597d\u6765\u83b7\u5f97\u7535\u5f71\u63a8\u8350\uff0c\u8fd9\u4e9b\u7528\u6237\u6240\u7d66\u51fa\u7684\u8bc4\u5206\u4e0e\u60a8\u770b\u8fc7\u7684\u5176\u4ed6\u7535\u5f71\u7684\u8bc4\u5206\u76f8\u4f3c\u3002<br \/>We can use the Cosine Similarity algorithm to work out the similarity between two things. We might then use the computed similarity as part of a recommendation query. For example, to get movie recommendations based on the preferences of users who have given similar ratings to other movies that you\u2019ve seen.<\/p>\n<\/blockquote>\n<p>Neo4j\u662f\u4e00\u500b\u958b\u6e90\u7684NoSQL\u7684\u539f\u751f\u5716\u6578\u64da\u5eab\u3002Neo4j is an open-source, NoSQL, native graph database that provides an ACID-compliant transactional backend for your applications.<br \/>\u5716\u6578\u64da\u5eab\u5b58\u5132\u7684\u6578\u64da\u55ae\u4f4d\u662f\u7bc0\u9ede\uff08Node\uff09\u548c\u95dc\u4fc2\uff08Relations\uff09\u3002<br \/>\u901a\u5e38\uff0c\u5716\u7528\u4e00\u7d44\u6578\u64da\u8868\u793a\uff0c\u5982 g1(a0, a1, a2, a3, &#8230;.), g2(b0, b1, b2, b3, &#8230;.)\uff0c\u6975\u503c\u60c5\u6cc1\u4e0b\uff0c\u5982 g1(a0), g2(b0) \u5982\u4f55\u6bd4\u8f03\u548c\u8a08\u7b97\u76f8\u4f3c\u6027\uff1f\u9019\u662f\u672c\u6587\u8a66\u5716\u63a2\u8a0e\u7684\u8981\u9ede\u3002\u6211\u5011\u9084\u7d50\u5408\u7814\u767c\u4e2d\u7684\u00a0<img loading=\"lazy\" class=\"\" src=\"https:\/\/ufqi.com\/view\/default\/images\/ufqiwork-logo.png\" alt=\"ufqiwork-logo\" width=\"26\" height=\"26\" \/>\u6709\u798f\u5de5\u574aUfqiWork (\u00a0<a href=\"https:\/\/ufqi.com\/work\/\">https:\/\/ufqi.com\/work<\/a>\u00a0) \u7684\u5be6\u969b\u61c9\u7528\u6848\u4f8b\u5c0d\u6240\u63d0\u8b70\u7684\u7b97\u6cd5\u9032\u884c\u4e86\u9a57\u8b49\uff0c\u53d6\u5f97\u4e86\u9810\u671f\u7684\u6548\u679c\u3002<\/p>\n<p>\u5c07\u6975\u503c\u6bd4\u5982 g1(10) \u548c g(100) \u9032\u884c\u8a08\u7b97\u6642\uff0c\u5e7e\u4e4e\u6bcf\u500b\u7b97\u6cd5\u90fd\u6703\u8fd4\u56de\u6975\u5176\u4e0d\u76f8\u4f3c\u7684\u7d50\u679c\u503c: -1 .<\/p>\n<p>\u5982\u679c\u6211\u5011\u60f3\u9032\u4e00\u6b65\u5730\u63a2\u8a0e\uff0c g1(10) \u548c g2(100) \u7684\u4e0d\u76f8\u4f3c\u503c\uff0c \u8207 g2(100) \u548c g3(1000) \u7684\u4e0d\u76f8\u4f3c\u503c\uff0c\u6709\u591a\u5c11\u7a0b\u5ea6\u4e0a\u7684\u4e0d\u540c\u5462\uff1f \u986f\u7136\u4e0a\u9762\u7684\u7b97\u6cd5\u5728\u90fd\u8fd4\u56de\u4e0d\u76f8\u4f3c\u7684\u6975\u503c -1 \u6642\uff0c\u5169\u8005\u7684\u4e0d\u76f8\u4f3c\u662f\u4e00\u6a23\u7684\uff0c\u800c\u771f\u5be6\u60c5\u6cc1\u771f\u7684\u662f\u4e00\u6a23\u55ce\uff1f\u5982\u679c\u4e0d\u4e00\u6a23\uff0c\u600e\u9ebd\u4f86\u63cf\u8ff0\u9019\u7a2e\u4e0d\u76f8\u4f3c\u7684\u5dee\u7570\uff1f<\/p>\n<p>\u7c21\u55ae\u800c\u76f4\u63a5\u7684\u505a\u6cd5\u662f\u8003\u5bdf\u5169\u500b\u6578\u503c\u4e4b\u9593\u7684\u6e1b\u6cd5\u5dee\u503c\u6216\u9664\u6cd5\u5546\u503c\uff0c\u5dee\u503c\u6216\u5546\u503c\u7684\u5927\u5c0f\u6c7a\u5b9a\u4e86\u5169\u500b\u6578\u64da\u7684\u5dee\u7570\u6027\uff0c\u6b63\u6bd4\u4f8b\u95dc\u4fc2\u3002<br \/>\u6bd4\u5982\uff0c10~100\u7684\u5dee\u503c\u662f90\uff0c\u5546\u503c\u662f10\uff0c 100~1000\u7684\u5dee\u503c\u662f900\uff0c\u5546\u503c\u662f10.<\/p>\n<p>\u5982\u679c\u6211\u5011\u8981\u5b9a\u7fa9\u6216\u8005\u5957\u7528\u4e00\u4e0b\u76f8\u4f3c\u6027\uff0c10~100\u7684\u76f8\u4f3c\u6027\u7528\u6578\u503c\u8868\u9054\u662f\u591a\u5c11\uff1f 100~1000\u7684\u76f8\u4f3c\u6027\u7528\u6578\u503c\u8868\u9054\u662f\u591a\u5c11\uff1f\u5982\u679c\u6bd4\u8f03\u5dee\u503c\u7684\u8a71\uff0c\u5f8c\u8005\u7684\u5dee\u5225\u5927\u65bc\u524d\u8005\uff0c\u5982\u679c\u6bd4\u8f03\u5546\u503c\u7684\u8a71\uff0c\u524d\u8005\u8207\u5f8c\u8005\u76f8\u7b49\u3002\u5f9e\u8a9e\u7fa9\u4e0a\u4f86\u89e3\u8b80\uff0c\u986f\u7136\u4f7f\u7528\u5546\u503c\u8f03\u7b26\u5408\u9810\u671f\uff0c\u696d\u7e3e\u5169\u8005\u7684\u5dee\u7570\u662f10\u500d\u3002<\/p>\n<p>\u4f7f\u7528\u7d55\u5c0d\u5546\u503c10\u4f86\u63cf\u8ff0\u76f8\u4f3c\u6027\u986f\u7136\u4e0d\u592a\u5408\u9069\uff0c\u7232\u4e86\u4fbf\u65bc\u8868\u8ff0\u70ba\u76f8\u4f3c\u6027\uff0c\u6211\u5011\u9084\u9700\u8981\u5c0d\u5176\u9032\u884c\u6b78\u4e00\u5316\u8655\u7406\u3002\u70ba\u65b9\u4fbf\u63cf\u8ff0\u5169\u500b\u6578\u503c\u7684\u5546\u503c\uff0c\u6211\u5011\u5c0d\u5546\u503c\u53d6log10\u5c0d\u6578\uff0c\u9019\u6a23\u5927\u5e45\u964d\u4f4e\u7d55\u5c0d\u503c\u7684\u7bc4\u570d\u4e26\u63d0\u4f9b\u66f4\u5927\u7684\u66f2\u7dab\u8868\u8ff0\u7a7a\u9593\uff0c\u5176\u7d55\u5c0d\u503c\u7684\u7d30\u5fae\u8b8a\u5316\u80fd\u5920\u6620\u5c04\u5230\u76f8\u61c9\u7684\u5c0d\u6578\u503c\u4e0a\u3002<\/p>\n<p><img src=\"https:\/\/ufqi.com\/blog\/wp-content\/uploads\/2020\/08\/log-10-x-graphic.gif\" \/><br \/>\u5c0d\u6578log10(x)\u7684\u5750\u6a19\u66f2\u7dab<\/p>\n<p>\u5617\u8a66\u9032\u884c\u6b78\u4e00\u5316\uff08Normalization\uff09\u8655\u7406\u6642\uff0c\u9700\u8981\u8a2d\u5b9a\u5340\u9593\u95be\u503c\u3002\u5982\u679c\u5169\u500b\u6578\u76f8\u7b49\uff0c\u5176\u5546\u503c\u70ba1\uff0c\u53d6\u5c0d\u6578log10(1)\u6642, \u5f97\u5230\u503c\u70ba 0\uff0c\u53ef\u4ee5\u8a8d\u7232\u5105\u5169\u500b\u6578\u7684\u5982\u4e0a\u9019\u9ebd\u8a08\u7b97\u904e\u7a0b\u4e4b\u5f8c\u503c\u70ba0\u6642\uff0c\u9019\u5169\u500b\u6578\u7684\u76f8\u4f3c\u6027\u662f 100%\u3002<\/p>\n<p>\u90a3\u9ebd\uff0c\u591a\u5927\u662f\u4e0d\u76f8\u4f3c\u5462\uff1f\u5982\u679c\u505a\u6b78\u4e00\u5316\u6216\u8005\u767e\u5206\u6bd4\uff0c\u6211\u5011\u9700\u8981\u78ba\u5b9a\u3001\u5283\u5b9a\u4e00\u500b\u201c\u4e0d\u76f8\u4f3c\u503c\u201d\u7684\u6a19\u6e96\uff0c\u7121\u8ad6\u662f\u53d6\u5546\u503c\uff0c\u9084\u662f\u518d\u5c0d\u5546\u503c\u53d6\u5c0d\u6578\uff0c\u9700\u8981\u4e00\u500b\u660e\u78ba\u800c\u5177\u9ad4\u7684\u6578\u503c\u4f86\u8868\u793a\u6216\u754c\u5b9a\u5b8c\u5168\u4e0d\u76f8\u4f3c\u3002\u9019\u500b\u6578\u503c\u53ef\u80fd\u6700\u7d42\u9700\u8981\u9760\u7d93\u9a57\u7372\u5f97\uff0c\u4e5f\u8207\u8981\u8003\u5bdf\u7684\u6578\u64da\u53ef\u80fd\u7684\u53d6\u503c\u7bc4\u570d\u6709\u95dc\uff0c\u6bd4\u5982\u8003\u5bdf\u4eba\u7684\u8eab\u9ad8\u6642\uff0c\u76f8\u5dee\u4e00\u500d\u5c31\u6709\u7a2e\u5341\u842c\u516b\u5343\u88cf\u7684\u611f\u89ba\uff1b\u800c\u8003\u5bdf\u661f\u7cfb\uff0c\u5341\u842c\u516b\u5343\u91cc\u4e5f\u53ef\u80fd\u53ea\u662f\u4e00\u500d\u7684\u8868\u8ff0\u3002<strong>\u56e0\u6b64\uff0c\u9019\u500b\u7528\u4ee5\u754c\u5b9a\u201c\u4e0d\u76f8\u4f3c\u201d\u7684\u95be\u503c k \u61c9\u8a72\u662f\u6839\u64da\u7d93\u9a57\u548c\u61c9\u7528\u5834\u666f\u800c\u5b9a\u3002<\/strong><\/p>\n<p>\u65bc\u662f\uff0c\u6211\u5011\u5c31\u53ef\u4ee5\u5beb\u51fa\u6211\u5011\u7528\u65bc\u6c42\u503c\u67d0\u5169\u500b\u4efb\u610f\u6578\u7684\u76f8\u4f3c\u6027\u503c\uff0c\u8a2d\u82e5k\u70ba\u5b8c\u5168\u4e0d\u76f8\u4f3c\uff0c\u5247\u67d0\u5169\u500b\u6578\u7684\u76f8\u4f3c\u6027\u8868\u8ff0\u5340\u9593\u70ba [0, k] , \u91dd\u5c0d\u9019\u500b\u53d6\u503c\u7bc4\u570d\uff0c\u518d\u9032\u884c\u6b78\u4e00\u5316\u8655\u7406\u5247\u76f8\u5c0d\u5bb9\u6613\u3002\u6700\u7d42\uff0c\u6211\u5011\u64ec\u5beb\u4e86\u4e0b\u9762\u9019\u500b\u6c42\u53d6\u5169\u500b\u4efb\u610f\u6578\u503c\u7684\u76f8\u4f3c\u6027\u7684\u51fd\u6578\u8868\u9054\u5f0f\uff1a<\/p>\n<p>F(n1, n2, k) = normalize{ min[k,\u00a0 log10[ max(n1, n2)\/min(n1, n2)] ] };<\/p>\n<p>\u5176\u4e2dn1, n2\u70ba\u5f85\u6c42\u53d6\u76f8\u4f3c\u6027\u7684\u5169\u500b\u6578\u503c\uff0c k\u70ba\u7d93\u9a57\u5e38\u6578\u6975\u503c\uff08\u8868\u793a\u5b8c\u5168\u4e0d\u76f8\u4f3c\u503c\uff09\u3002<br \/>\u5176\u8a08\u7b97\u904e\u7a0b\u53ef\u4ee5\u63cf\u8ff0\u7232:<br \/>1) \u6bd4\u8f03n1, n2\u7684\u5927\u5c0f\uff1b<br \/>2) \u6c42\u53d6n1\uff0c n2\u8f03\u5927\u503c\u9664\u4ee5\u8f03\u5c0f\u503c\u7684\u5546;<br \/>3) \u5c0d\u5546\u503c\u53d6log10\u5c0d\u6578\uff1b<br \/>4) \u6bd4\u8f03\u5c0d\u6578\u503c\u8207\u5e38\u719fk\u7684\u5927\u5c0f\uff0c\u5982\u679c\u5546\u503c\u7684\u5c0d\u6578\u503c\u5927\u65bck\uff0c\u53d6k\u503c\uff1b<br \/>5) \u5c0d\u524d\u4e00\u6b65\u6578\u503c\u505a\u6b78\u4e00\u5316\u8655\u7406\uff0c\u5f97\u5230\u9810\u671f\u503c\u5728 [0, 1] \u4e4b\u9593.<\/p>\n<p>\u7531\u6b64\uff0c\u6211\u5011\u7372\u77e5\uff0c\u5105\u5169\u500b\u6578\u7684\u5546\u503c\u4e00\u6a23\u6642\uff0c\u5176\u76f8\u4f3c\u6027\u662f\u4e00\u6a23\u7684\u3002\u56e0\u6b6410~100 \u548c 100~1000\u7684\u76f8\u4f3c\u6027\u662f\u4e00\u6a23\u7684\u3002\u5c0d\u5546\u503c\u505a\u9032\u4e00\u6b65\u7684\u8655\u7406\u662f\u7232\u4e86\u8868\u8ff0\u548c\u904b\u7b97\u65b9\u4fbf\u3002\u985e\u4f3c\u7684\u7b97\u6cd5\u6211\u5011\u5728 <img loading=\"lazy\" class=\"\" src=\"https:\/\/ufqi.com\/view\/default\/images\/ufqiwork-logo.png\" alt=\"ufqiwork-logo\" width=\"22\" height=\"22\" \/>\u6709\u798f\u5de5\u574aUfqiWork ( <a href=\"https:\/\/ufqi.com\/work\/\">https:\/\/ufqi.com\/work<\/a> ) \u9032\u884c\u8a66\u7528\uff0c\u53d6\u5f97\u4e86\u4e00\u5b9a\u7684\u9810\u671f\u6548\u679c\u3002<\/p>\n<p>\u5716\u7684\u6975\u503c\u554f\u984c\u53ea\u662f\u76f8\u4f3c\u6027\u554f\u984c\u4e2d\u7684\u7279\u4f8b\uff0c\u540c\u6642\u9019\u4e9b\u6240\u8b02\u7684\u6975\u503c\u4e5f\u662f\u76f8\u5c0d\u7684\uff0c\u5105g1(a1), g2(a2), g3(a3)&#8230;. \u7b49\u591a\u500b\u6975\u503c\u7d44\u5408\u70ba\u4e00\u500b\u5927\u7684\u5716G(a1, a2, a3&#8230;.)\u6642\uff0c\u5176\u8207\u53e6\u5916\u4e00\u500b\u5927G(b1, b2, b3&#8230;)\u76f8\u6bd4\u8f03\u8a08\u7b97\u76f8\u4f3c\u6027\u6642\uff0c\u53c8\u56de\u6b78\u5230\u5230\u6587\u6a94\u770b\u5230\u63d0\u5230\u7684\u6578\u64da\u96c6\u76f8\u4f3c\u6027\u554f\u984c\u8a08\u7b97\u4e86\u3002<\/p>\n<p>&nbsp;<\/p>\n<hr \/>\n<h3><a href=\"https:\/\/ufqi.com\/work\"><img loading=\"lazy\" class=\"\" src=\"https:\/\/ufqi.com\/view\/default\/images\/ufqiwork-logo.png\" alt=\"ufqiwork-logo\" width=\"113\" height=\"113\" \/><br \/><\/a>UfqiWork\u00a0<span class=\"smaller\">\u6709\u798f\u5de5\u574a<\/span>\u00a0<span class=\"small\">\u670d\u52d9\u4ea4\u6613\u6240<\/span><\/h3>\n<p>\u6709\u798f\u5de5\u574aUfqiWork \u662f\u4e00\u4e2a\u5728\u7ebf\u670d\u52a1\u4ea4\u6613\u5e73\u53f0\u3002<br \/>\u6709\u798f\u5de5\u574a\u63d0\u4f9b\u5728\u7ebf\u5206\u7c7b\u670d\u52a1\u4fe1\u606f\uff0c\u81f4\u529b\u4e8e\u5728\u7ebf\u64ae\u5408\u670d\u52a1\u4ea4\u6613\u7684\u4e70\u65b9\u548c\u5356\u65b9\uff0c\u5e76\u4e3a\u4e70\u65b9\u3001\u5356\u65b9\u63d0\u4f9b\u201c\u884c\u51c6\u201d\u670d\u52a1\uff0c\u5c45\u95f4\u62c5\u4fdd\u670d\u52a1\u4ea4\u6613\u3002\u884c\u51c6\u670d\u52a1\u7684\u63d0\u4f9b\u65b9\u4e3a\u5c45\u95f4\u4ea4\u6613\u7684\u7b2c\u4e09\u65b9\u3002\u6709\u798f\u5de5\u574a\u7684\u670d\u52a1\u4ea4\u6613\u5e73\u53f0\u4e3a\u6574\u4e2a\u670d\u52a1\u4ea4\u6613\u6d41\u7a0b\u7684\u7b2c\u56db\u65b9\u3002<\/p>\n<p>\u7ebf\u4e0a\u7b7e\u7ea6\uff0c\u7ebf\u4e0b\u4ea4\u5272\u3002\u6709\u798f\u5de5\u574a\u6574\u5408\u670d\u52a1\u4ea4\u6613\u7684 <strong>\u4fe1\u606f\u6d41\u548c <\/strong><strong>\u8d44\u91d1\u6d41<\/strong>\uff0c\u5728\u7ebf\u627f\u8f7d\u4e70\u5356\u53cc\u65b9\u7684\u9700\u6c42\u4f9b\u7ed9\u4fe1\u606f\u5339\u914d\u3001\u4ea4\u6613\u64ae\u5408\uff0c\u5728\u7ebf\u627f\u62c5\u4ea4\u6613\u53cc\u65b9\u7684\u8d44\u91d1\u62e8\u4ed8\u3001\u62c5\u4fdd\u3002\u670d\u52a1\u4ea4\u6613\u7684 <strong>\u6807\u7684\u7269<\/strong>\u5728\u7ebf\u4e0b\u5b9e\u65bd\u3001\u4ea4\u5272\u3002<\/p>\n<p>\u6709\u798f\u5de5\u574a\u670d\u52a1\u4ea4\u6613\u5e73\u53f0\u670d\u52a1\u4e8e\u63d0\u4f9b\u5c45\u95f4\u4ea4\u6613\u7684\u201c\u884c\u51c6\u201d\uff0c\u901a\u8fc7\u884c\u51c6\u670d\u52a1\u4e8e\u670d\u52a1\u4ea4\u6613\u7684\u4e70\u5356\u53cc\u65b9\u3002\u4ea4\u6613\u6807\u7684\u7269\u4e0e\u5176\u4ed6\u7535\u5b50\u5546\u52a1\u4ea4\u6613\u4e0d\u540c\u7684\u662f\u5176\u975e\u6807\u51c6\u6027\uff0c\u5982\u623f\u5c4b\u3001\u5de5\u4f5c\/\u804c\u4e1a\u3001\u5bb6\u653f\/\u7ef4\u4fdd\u3001\u6c7d\u8f66\u3001\u533b\u7597\u3001\u6559\u80b2\u3001\u91d1\u878d\u3001\u51fa\u884c\u3001\u65f6\u5c1a\u7b49\u7b49\u3002\u76f8\u5e94\u5730\u884c\u51c6\u4e3a\u623f\u4ea7\u4e2d\u4ecb\uff0c\u730e\u5934\u4e2d\u4ecb\uff0c\u5546\u54c1\u5bfc\u8d2d\u3001\u63a8\u8350\u3001\u5e26\u8d27\u7b49\u3002<br \/>\u6240\u4e0d\u540c\u4e8e\u73b0\u6709\u5206\u7c7b\u5e02\u573a\u7684\u5730\u65b9\u5728\u4e8e\uff1a\u7ad9\u5728\u4e70\u65b9\u7acb\u573a\u4ee3\u8868\u4e70\u65b9\u5229\u76ca\u7684\u5c45\u95f4\u670d\u52a1\uff1b\u4e70\u65b9\u6709\u5b9a\u4ef7\u6743\uff0c\u5c45\u95f4\u670d\u52a1\u62a5\u4ef7\u3002\u76f8\u5e94\u5730\uff0c\u5356\u65b9\u4e5f\u53ef\u4ee5\u4f7f\u7528\u5b9a\u4ef7\u6743\u96c7\u4f63\u4ee3\u8868\u5356\u65b9\u7acb\u573a\u548c\u5229\u76ca\u7684\u5c45\u95f4\u670d\u52a1\u3002<\/p>\n<p>\u6709\u798f\u5de5\u574aUfqiWork \u5716\u6a19\u4e2d \u201c\u6709\u201d \u7684\u7d05\u8272\u9ad8\u4eae\u90e8\u5206\uff0c\u65e2\u50cf\u662f\u201c\u623f\u5c4b\u201d\uff08\u4f4f\u623f\uff09\uff0c\u4e5f\u50cf\u662f\u201c\u51f3\u5b50\u201d\uff08\u5de5\u4f5c\uff09\uff0c\u5bd3\u610f \u6709\u798f\u5de5\u574aUfqiWork \u81f4\u529b\u65bc\u70ba\u7528\u6236\u63d0\u4f9b\u4f4f\u623f\u3001\u5de5\u4f5c\u3001\u5bb6\u653f\u7b49\u5404\u985e\u4fe1\u606f\u5339\u914d\u53ca\u64ae\u5408\u4ea4\u6613\u670d\u52d9\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u6578\u64da\u96c6\u7684\u76f8\u4f3c\u6027\u8a08\u7b97\uff0c\u5176\u61c9\u7528\u5341\u5206\u5ee3\u6c4e\uff0c\u5728\u73fe\u6709\u7684\u5404\u985e\u4eba\u5de5\u667a\u80fd\u7684\u5e95\u5c64\u7b97\u6cd5\u4e2d\uff0c\u5927\u591a\u6578\u90fd\u662f &hellip; <a href=\"https:\/\/ufqi.com\/blog\/graph-similarity-algorithm-polar-neo4j\/\">\u7ee7\u7eed\u9605\u8bfb <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[2],"tags":[371,372,370,373,375,374],"_links":{"self":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2344"}],"collection":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/comments?post=2344"}],"version-history":[{"count":12,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2344\/revisions"}],"predecessor-version":[{"id":2357,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/posts\/2344\/revisions\/2357"}],"wp:attachment":[{"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/media?parent=2344"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/categories?post=2344"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/ufqi.com\/blog\/wp-json\/wp\/v2\/tags?post=2344"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}