{"provider_url":"https://hatena.blog","author_name":"yukishir0","version":"1.0","url":"https://hourouneko.hateblo.jp/entry/2018/02/01/000028","type":"rich","published":"2018-02-01 00:00:28","provider_name":"Hatena Blog","blog_title":"\u653e\u6d6a\u732b","title":"L0,L1,L2\u30ce\u30eb\u30e0","image_url":null,"author_url":"https://blog.hatena.ne.jp/yukishir0/","categories":["\u96d1\u8a18"],"blog_url":"https://hourouneko.hateblo.jp/","height":"190","width":"100%","html":"<iframe src=\"https://hatenablog-parts.com/embed?url=https%3A%2F%2Fhourouneko.hateblo.jp%2Fentry%2F2018%2F02%2F01%2F000028\" title=\"L0,L1,L2\u30ce\u30eb\u30e0 - \u653e\u6d6a\u732b\" class=\"embed-card embed-blogcard\" scrolling=\"no\" frameborder=\"0\" style=\"display: block; width: 100%; height: 190px; max-width: 500px; margin: 10px 0px;\"></iframe>","description":"\u30ce\u30eb\u30e0\uff1a\u539f\u70b9\u3084\u5e73\u5747\u306a\u3069\u7279\u5b9a\u306e\u70b9\u304b\u3089\u3042\u308b\u70b9\u307e\u3067\u306e\u8ddd\u96e2L2\u30ce\u30eb\u30e0\uff1a\u5404\u6b21\u5143\u306e\u5024\u30922\u4e57\u3057\u305f\u548cL1\u30ce\u30eb\u30e0\uff1a\u5404\u6b21\u5143\u306e\u5024\u306e\u7d76\u5bfe\u5024\u306e\u548cL0\u30ce\u30eb\u30e0\uff1a0\u3067\u306a\u3044\u6b21\u5143\u6570 x\u3092\u6b21\u5143\u3068\u3057\u305f\u6642\u306e\u4f8b\u25cfL2\u30ce\u30eb\u30e0L2 = |x1|^2 + |x2|^2 + ... + |xn|^2 <pre>double L2norm = 0;double sum = 0;long x; // \u6b21\u5143 \uff08\u5b9f\u969b\u306b\u306f\u305f\u3076\u3093\u30dd\u30a4\u30f3\u30bf\u3067\u53c2\u7167\u3059\u308b\u611f\u3058\u306b\u306a\u308b\uff09long n = 2; // \u6700\u5927\u6b21\u5143\u6570(\u4f8b\uff1a2\u6b21\u5143)for(x = 1; x <= n; x++){ sum =+ (x * x);}L2norm = sum;</pre> \u25cfL1\u30ce\u30eb\u30e0L1 = |\u2026"}