0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

【数学溢れ話】【Token】Lp空間(pノルム)

Posted at

Lp空間の概説

詳しくは以下を。
Wikipedia「Lp空環」

実装例

image.png

cx<-seq(0,1,length=61)
f0<-function(x,p){(1-(x^p))^(1/p)}
cy10<-f0(cx,1/10)
cy15<-f0(cx,1/1.782273)
cy20<-f0(cx,1)
cy30<-f0(cx,2)
cy40<-f0(cx,99)
plot(cx,cy10,type="l",asp=1,xlim=c(0,1),ylim=c(0,1),main="p-Norm",xlab="",ylab="",col=rgb(1,0,1))
par(new=T)
plot(cx,cy15,type="l",asp=1,xlim=c(0,1),ylim=c(0,1),main="p-Norm",xlab="",ylab="",col=rgb(1,1,0))
par(new=T)
plot(cx,cy20,type="l",asp=1,xlim=c(0,1),ylim=c(0,1),main="",xlab="",ylab="",col=rgb(0,1,0))
par(new=T)
plot(cx,cy30,type="l",asp=1,xlim=c(0,1),ylim=c(0,1),main="",xlab="",ylab="",col=rgb(1,0,0))
par(new=T)
plot(cx,cy40,type="l",asp=1,xlim=c(0,1),ylim=c(0,1),main="",xlab="",ylab="",col=rgb(0,0,1))
# 凡例を書き添える 。
legend("bottomleft", legend=c("p=0.1","p=1/1.78…","p=1","p=2","p=99"), lty =c(1,1,1,1,1),col=c(rgb(1,0,1),rgb(1,1,0),rgb(0,1,0),rgb(1,0,0),rgb(0,0,1)),cex=0.8) 

ここに突如登場する数1/1.782273(=0.561081276)は何かというとpノウムで「L2空間の真逆の円弧が軌跡として現れるp値」の近似値です。力任せで発見した後で数値検索をかけたら、Python製凸最適化モデリングツールCVXPYなどが採用している模様…
CVXPY matrix style modeling limits
Python による数理最適化モデリングツール CVXPY の初歩

実用例

詳しくは以下を。
【機械学習】LPノルムってなんだっけ?
線形回帰の過学習を抑えよう ~Ridge回帰とLasso回帰

そんな感じで以下続報…

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?