{"id":347,"date":"2017-10-08T20:03:38","date_gmt":"2017-10-08T11:03:38","guid":{"rendered":"https:\/\/www8281uo.sakura.ne.jp\/blog\/?p=347"},"modified":"2017-10-08T20:03:38","modified_gmt":"2017-10-08T11:03:38","slug":"networkx-%e3%81%8b%e3%82%89%e3%80%81graphlab-create-%e3%81%ab%e4%b9%97%e3%82%8a%e6%8f%9b%e3%81%88%e3%81%9f%e8%a9%b1","status":"publish","type":"post","link":"https:\/\/www8281uo.sakura.ne.jp\/blog\/?p=347","title":{"rendered":"NetworkX \u304b\u3089\u3001Graphlab Create \u306b\u4e57\u308a\u63db\u3048\u305f\u8a71"},"content":{"rendered":"<p>\u9577\u3089\u304f\uff08\uff12\u5e74\u304f\u3089\u3044\uff09<a href=\"https:\/\/networkx.github.io\/\">NetworkX<\/a> \u306e\u30e6\u30fc\u30b6\u3060\u3063\u305f\u304c\u3001\u4eca\u56de <a href=\"https:\/\/turi.com\/\">Graphlab Create<\/a> \u306b\u4e57\u308a\u63db\u3048\u305f\u3002\u305d\u308c\u3068\u540c\u6642\u306b\u3001<a href=\"https:\/\/github.com\/saghul\/pythonz\">pythonz<\/a> + <a href=\"https:\/\/virtualenv.pypa.io\/en\/stable\/\">virtualenv<\/a> \u304b\u3089\u3001<a href=\"https:\/\/anaconda.org\/anaconda\/python\">anaconda<\/a> \u306b\u4e57\u308a\u63db\u3048\u305f\u3002<\/p>\n<p>\u3053\u3053\u306b\u66f8\u3044\u3066\u3044\u308b\u3053\u3068\u306f\u3001\u81ea\u5206\u304c\u4f55\u304b\u5927\u4e8b\u306a\u3053\u3068\u3092\u52d8\u9055\u3044\u3057\u3066\u3044\u306a\u3051\u308c\u3070\u6050\u3089\u304f\u5f53\u305f\u308a\u524d\u306e\u3053\u3068\u306a\u306e\u3067\u3001\u308f\u3056\u308f\u3056\u8a00\u308f\u306a\u304f\u3066\u3082\u3001\u3068\u601d\u308f\u308c\u304b\u306d\u306a\u3044\u3002\u3060\u3051\u3069\u3001\u30b0\u30e9\u30d5\u306e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u8abf\u3079\u3066\u3044\u308b\u521d\u5b66\u8005\u306b\u306f\u591a\u5c11\u6709\u7528\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u66f8\u304d\u6b8b\u3057\u3066\u304a\u304f\u3002<!--more--><\/p>\n<p>\u4e57\u308a\u63db\u3048\u305f\u4e3b\u306a\u7406\u7531\u306f\u3001\u30e1\u30e2\u30ea\u306e\u4f7f\u7528\u91cf\u3002NetworkX \u306f\u3001API \u306f\u8c4a\u5bcc\u3060\u3057\u3001\u901f\u3044\u3002\u3060\u3051\u3069\u3001\u30e1\u30e2\u30ea\u306e\u4f7f\u7528\u91cf\u304c\u591a\u3044\u3002\u305d\u306e\u305f\u3081\u3001\u5927\u304d\u306a\u30b0\u30e9\u30d5\u3092\u51e6\u7406\u3057\u3088\u3046\u3068\u3059\u308b\u3068 swap \u3057\u3066\u3057\u307e\u3046\u3053\u3068\u304c\u5ea6\u3005\u3042\u3063\u305f\u3002\u4e00\u4eba\u3067\u5360\u6709\u3057\u3066\u3044\u308b\u30de\u30b7\u30f3\u3067\u3042\u308c\u3070\u305d\u308c\u3067\u3082\u307e\u307e\u8a31\u3055\u308c\u308b\u306e\u3060\u304c\u3001\u5171\u6709\u30de\u30b7\u30f3\u3067\u305d\u308c\u3092\u3084\u308b\u3068\u968f\u5206\u5acc\u308f\u308c\u3066\u3057\u307e\u3046\u306e\u3067\u3053\u307e\u308b\u3002<\/p>\n<p>\u305d\u3053\u3067\u3001\u76ee\u3092\u4ed8\u3051\u305f\u306e\u304c Graphlab Create\u3002\u5143\u3005\u306e Graphlab \u306f C++ \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u3060\u3063\u305f\u3057\u3001\u30a8\u30c3\u30b8\u306e weight \u4ee5\u5916\u306e\u5c5e\u6027\u5024\u304c\u3064\u3051\u3089\u308c\u306a\u304f\u3066\u4f7f\u3044\u3065\u3089\u305d\u3046\u3060\u3063\u305f\u3002\u305d\u308c\u304c Python \u306e\u30e9\u30a4\u30d6\u30e9\u30ea\u306b\u306a\u308a\u3001\u30ce\u30fc\u30c9\u3068\u30a8\u30c3\u30b8\u305d\u308c\u305e\u308c\u306b\u5c5e\u6027\u304c\u3064\u3051\u3089\u308c\u308b\u3088\u3046\u306b\u306a\u3063\u3066\u3044\u3066\u3001\u3053\u308c\u306a\u3089\u9078\u629e\u80a2\u306b\u306a\u308a\u305d\u3046\u3060\u3001\u3068\u601d\u3063\u305f\u3002<\/p>\n<p><a href=\"https:\/\/turi.com\/products\/create\/docs\/index.html\">Graphlab Create \u30c9\u30ad\u30e5\u30e1\u30f3\u30c8<\/a>\u306e\u4e2d\u306e <a href=\"https:\/\/turi.com\/products\/create\/docs\/generated\/graphlab.SArray.html#graphlab.SArray\">SArray \u306e\u9805<\/a>\u306b\u306f\u4ee5\u4e0b\u306e\u3088\u3046\u306b\u3042\u308b\u3002SArray \u306f \u30b0\u30e9\u30d5\u30c7\u30fc\u30bf\uff08SGraph\uff09\u3092\u5b9f\u73fe\u3059\u308b\u305f\u3081\u306e\u57fa\u672c\u3068\u306a\u308b\u30c7\u30fc\u30bf\u69cb\u9020\u3002<\/p>\n<blockquote><p>SArray is scaled to hold data that are much larger than the machine\u2019s main memory. It fully supports missing values and random access. The data backing an SArray is located on the same machine as the GraphLab Server process. Each column in an\u00a0<a class=\"reference internal\" title=\"graphlab.SFrame\" href=\"https:\/\/turi.com\/products\/create\/docs\/generated\/graphlab.SFrame.html#graphlab.SFrame\"><code class=\"xref py py-class docutils literal\"><span class=\"pre\">SFrame<\/span><\/code><\/a>\u00a0is an SArray.<\/p><\/blockquote>\n<p>\u306a\u308b\u307b\u3069\u3001\u4e3b\u8a18\u61b6\u3088\u308a\u3082\u5927\u304d\u306a\u30c7\u30fc\u30bf\u3092\u6271\u3048\u308b\u3088\u3046\u306b\u4f5c\u3089\u308c\u3066\u3044\u308b\u3068\u3002\u6c42\u3081\u3066\u3044\u305f\u306e\u306f\u3053\u308c\u3060\u3001\u3068\u3044\u3046\u3053\u3068\u3067\u3001\u4f7f\u3063\u3066\u307f\u308b\u3053\u3068\u306b\u3059\u308b\u3002\u3059\u308b\u3068\u3001\u78ba\u304b\u306b\u3001\u30e1\u30e2\u30ea\u306b\u4f7f\u7528\u91cf\u306f\u6e1b\u3089\u305b\u308b\u3002\u4f53\u611f\u306f\u3001\uff15\u5206\u306e\uff11\u304f\u3089\u3044\u306b\u306a\u308b\u30a4\u30e1\u30fc\u30b8\u3002\u304a\u304a\u3001\u3053\u308c\u306f\u7d20\u6674\u3089\u3057\u3044\u3002<\/p>\n<p>\u3068\u3053\u308d\u304c\u3001\u30b0\u30e9\u30d5\u89e3\u6790\u306e\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u3092\u5b9f\u88c5\u3057\u3088\u3046\u3068\u3057\u3066\u5c11\u3057\u56f0\u3063\u305f\u3053\u3068\u306b\u6c17\u3065\u304f\u3002\u4f7f\u3048\u305d\u3046\u306a\u30b0\u30e9\u30d5\u89e3\u6790\u306e API \u304c <a href=\"https:\/\/turi.com\/products\/create\/docs\/generated\/graphlab.SGraph.triple_apply.html#graphlab.SGraph.triple_apply\">SGraph.triple_apply<\/a> \u3057\u304b\u306a\u3044\u3002\u3053\u308c\u306f\u3001\uff08Python\u3067\u306f\u3081\u3063\u3061\u3083\u3081\u3093\u3069\u304f\u3055\u3044\uff09\u4e26\u5217\u51e6\u7406\u304c\u3067\u304d\u308b\u306e\u3067\u3001\u89e3\u6790\u5185\u5bb9\u304c\u30cf\u30de\u308c\u3070\u3068\u3066\u3082\u6709\u7528\u3060\u308d\u3046\u3002\u3060\u3051\u3069\u3001\u5b9f\u7528\u7684\u306a\u30a2\u30eb\u30b4\u30ea\u30ba\u30e0\u304c\u5168\u7136\u5b9f\u88c5\u3055\u308c\u3066\u3044\u306a\u3044\u3002NetworkX \u306b\u306f\u30c8\u30dd\u30ed\u30b8\u30ab\u30eb\u30bd\u30fc\u30c8\u304c\u5b9f\u88c5\u3055\u308c\u3066\u3044\u308b\u304c\u3001Graphlab Create \u306b\u305d\u3093\u306a\u3082\u306e\u306f\u306a\u3044\u3002\u3053\u3093\u306a\u3082\u306e\u3067\u3059\u3089\u81ea\u5206\u3067\u5b9f\u88c5\u3057\u306a\u3051\u308c\u3070\u306a\u3089\u306a\u3044\u3002<\/p>\n<p>\u305d\u3057\u3066\u3001\u30c8\u30dd\u30ed\u30b8\u30ab\u30eb\u30bd\u30fc\u30c8\u3092\u5b9f\u88c5\u3057\u59cb\u3081\u3066\u6c17\u3065\u304f\u3053\u3068\u304c\u3001\u300c\u3042\u308b\u30ce\u30fc\u30c9\u304b\u3089\u51fa\u3066\u3044\u308b\u30a8\u30c3\u30b8\uff08out-edges\uff09\u3092\u8abf\u3079\u308b\u300d\u3068\u3044\u3046\u3088\u3046\u306a\u51e6\u7406\u304c\u3081\u3061\u3083\u304f\u3061\u3083\u9045\u3044\u3002\u30c7\u30fc\u30bf\u306e\u30d5\u30c3\u30c8\u30d7\u30ea\u30f3\u30c8\u304c\u5c0f\u3055\u3044\u3046\u3048\u306b\u5168\u30c7\u30fc\u30bf\u304c\u30e1\u30e2\u30ea\u4e0a\u306b\u8f09\u3089\u306a\u304f\u3066\u3082\u3044\u3044\u3088\u3046\u306b\u4f5c\u3063\u3066\u3044\u308b\u306e\u3060\u304b\u3089\u5f53\u7136\u3063\u3061\u3083\u5f53\u7136\u3002\u3060\u3051\u3069\u3001\u3068\u3066\u3082\u4f7f\u3048\u308b\u3088\u3046\u306a\u30b9\u30d4\u30fc\u30c9\u3067\u306f\u306a\u3044\u3002\u30c8\u30dd\u30ed\u30b8\u30ab\u30eb\u30bd\u30fc\u30c8\u3067\u304d\u308b\u306e\u304c\u3001\u79d2\u3042\u305f\u308a100\u30ce\u30fc\u30c9\u304f\u3089\u3044\u3060\u3063\u305f\u308a\u3059\u308b\u3002<\/p>\n<p>\u3057\u3070\u3089\u304f\u8a66\u884c\u932f\u8aa4\u3057\u305f\u5f8c\u3001\u7d50\u5c40\u3001\u3042\u3089\u304b\u3058\u3081\u3059\u3079\u3066\u306e\u30a8\u30c3\u30b8\u306e\u4e00\u89a7\u3092\u53d6\u5f97\u3057\u3066\u3001\u300c\u3042\u308b\u30ce\u30fc\u30c9\u304b\u3089\u51fa\u3066\u3044\u308b\u30a8\u30c3\u30b8\uff08out-edges\uff09\u3092\u8abf\u3079\u308b\u300d\u3053\u3068\u304c\u9ad8\u901f\u306b\u3067\u304d\u308b\u3088\u3046\u306b\u30ea\u30b9\u30c8\u3092\u4f7f\u3063\u305f\u30c7\u30fc\u30bf\u69cb\u9020\u3092\u4f5c\u308b\u3053\u3068\u306b\u3057\u305f\u3002\u3053\u308c\u3092\u3059\u308b\u3068\u3001\u4e00\u6c17\u306b\u79d2\u3042\u305f\u308a\uff12\u4e07\u30ce\u30fc\u30c9\u304f\u3089\u3044\u51e6\u7406\u3067\u304d\u308b\u3002\u3053\u306e\u51e6\u7406\u306e\u9593\u306f\u3001Graphlab Create \u306e\u30c7\u30fc\u30bf\u69cb\u9020\u306f\u89e6\u3063\u3066\u3044\u306a\u3044\u306e\u3067\u3001\u3053\u308c\u306f Python \u306e\u30dd\u30c6\u30f3\u30b7\u30e3\u30eb\u306a\u3093\u3060\u3051\u3069\u3002Graphlab Create \u3067\u306e\u30c8\u30dd\u30ed\u30b8\u30ab\u30eb\u30bd\u30fc\u30c8\u306f\u8ab0\u304b\u306e\u5f79\u306b\u7acb\u3064\u304b\u3082\u3057\u308c\u306a\u3044\u306e\u3067\u3001\u3069\u3053\u304b\u3067\u516c\u958b\u3057\u3088\u3046\u3068\u601d\u3046\u3002<\/p>\n<p>\u3068\u3044\u3046\u308f\u3051\u3067\u3001Graphlab Create \u306f NetworkX \u306b\u6bd4\u3079\u308b\u3068\u3068\u3066\u3082\u7701\u30e1\u30e2\u30ea\u306a\u306e\u3067\u3001NetworkX \u3092\u4f7f\u3063\u3066\u3044\u3066\u30b0\u30e9\u30d5\u306e\u30b5\u30a4\u30ba\u304c\u30e1\u30e2\u30ea\u306b\u4e57\u308a\u304d\u3089\u305a\u56f0\u3063\u3066\u3044\u308b\u4eba\u306f\u662f\u975e\u30d7\u30e9\u30c3\u30c8\u30d5\u30a9\u30fc\u30e0\u3092\u5909\u3048\u3066\u307f\u308b\u3053\u3068\u3092\u52e7\u3081\u308b\u3002\u305f\u3060\u3057\u3001Graphlab \u306f\u30cf\u30de\u308b\u89e3\u6790\u4ee5\u5916\u306f\u30b0\u30e9\u30d5\u5411\u304d\u306e\u30c7\u30fc\u30bf\u69cb\u9020\u304f\u3089\u3044\u306b\u3057\u304b\u306a\u3089\u306a\u3044\u3053\u3068\u3092\u5206\u304b\u3063\u3066\u304a\u304f\u306e\u304c\u826f\u3044\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"<p>\u9577\u3089\u304f\uff08\uff12\u5e74\u304f\u3089\u3044\uff09NetworkX \u306e\u30e6\u30fc\u30b6\u3060\u3063\u305f\u304c\u3001\u4eca\u56de Graphlab Create \u306b\u4e57\u308a\u63db\u3048\u305f\u3002\u305d\u308c\u3068\u540c\u6642\u306b\u3001pythonz + virtualenv \u304b\u3089\u3001anaconda \u306b\u4e57\u308a\u63db\u3048\u305f\u3002 \u3053\u3053\u306b\u66f8\u3044\u3066\u3044\u308b [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[5],"tags":[16,17,18,19,20],"class_list":["post-347","post","type-post","status-publish","format-standard","hentry","category-programming","tag-graph-analysis","tag-graphlab-create","tag-networkx","tag-python","tag-topological-sort"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/347","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=347"}],"version-history":[{"count":0,"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=\/wp\/v2\/posts\/347\/revisions"}],"wp:attachment":[{"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=347"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=347"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www8281uo.sakura.ne.jp\/blog\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=347"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}