SlideShare a Scribd company logo
1 of 25
Download to read offline
1
•
•
•
•
•
2
3
4
x
A
y
M
N
N×M
5
A
M N
6
N M
K
K K M
7
0 1 0 0 0 01
8
9
y=A x x
ˆx = arg min
x
kxk0 subject to y = Ax
ˆx = arg min
x
kxk1 subject to y = Ax
x t
O(K log(M/K)) < N x
ˆx = arg min
x
X
ti subject to t  x  t, y = Ax
10
•
•
•
•
•
•
•
•
•
11
•
•
•
•
※
•
•
12
•
•
•
•
# objective to minimize: f x^T -> min
f = np.zeros((n_inputs * 2), dtype=np.float)
f[n_inputs:2 * n_inputs] = 1.0
P
i ti
ˆx = arg min
x
X
ti subject to t  x  t, y = Ax
13
•
•
# constraint: a x^T == b
a_eq = np.zeros((n_outputs, 2 * n_inputs), dtype=np.float)
a_eq[:, 0:n_inputs] = trans
b_eq = x1
y = Ax
t  x  t
• xi ti  0, xi ti  0, for i = 0, . . . , M
# constraint: -t <= x <= t
a = np.zeros((2 * n_inputs, 2 * n_inputs), dtype=np.float)
for i in xrange(n_inputs):
a[i, i] = -1.0
a[i, n_inputs + i] = -1.0
a[n_inputs + i, i] = 1.0
a[n_inputs + i, n_inputs + i] = -1.0
b = np.zeros(n_inputs * 2)
14
# solve linear programming
prob = openopt.LP(f=f, Aeq=a_eq, beq=b_eq, A=a, b=b)
result = prob.minimize('pclp')
•
•
•
15
16
17
•
•
•
•
•
•
•
•
18
•
•
• v = fd.oovar('speed')
import FuncDesigner as fd
a = fd.oovar()
•
x = fd.oovar(size=100)
•
•
a, b, c = fd.oovars('a', 'b', 'c')
※
19
※
※
•
f = a * b + x / y
•
f = fd.sin(x)
g += c
g = fd.log(y)
•
f = fd.dot(a, b) g = fd.sum(x)
•
•
f = 0
for i in xrange(3):
f = f + a[i]
20
•
•
※ In [10]: a = fd.oovar()
In [12]: f = fd.sin(a)
In [13]: f(1)
AttributeError
In [20]: a, b = fd.oovars(2)
In [21]: f = a + b
In [22]: p = { a:1, b:10 }
In [23]: f(p)
Out[23]: array(11.0)
• In [30]: a, b = fd.oovars(2)
In [31]: f = a + b
In [32]: p = { a:1.0, b:np.array([10.,
20., 30.]) }
In [33]: f(p)
Out[33]: array([ 11., 21., 31.])
21
•
•
In [10]: x = fd.oovar()
In [11]: f = fd.sin(x)
In [12]: f({x:np.pi})
Out[12]: array(1.2246467991473532e-16) # 0
In [13]: f.D({x:np.pi})
Out[13]: {unnamed_oofun_11: -1.0} # sin'(π) = cos(π) = -1.0
•
In [20]: x = fd.oovar()
In [21]: f = 2 * x ** 2
In [22]: p = {x:np.array([1., 2., 3.])}
In [23]: f(p)
Out[23]: array([ 2., 8., 18.])
In [24]: f.D(p)
Out[24]:
{unnamed_oofun_13: array([[ 4., 0., 0.],
[ 0., 8., 0.],
[ 0., 0., 12.]])}
22
•
# define variable
t = fd.oovar('t', size=n_inputs)
x = fd.oovar('x', size=n_inputs)
# objective to minimize: f x^T -> min
objective = fd.sum(t)
•
•
•
# init constraints
constraints = []
•
# equality constraint: a_eq x^T = b_eq
constraints.append(fd.dot(trans, x) == x1)
23
•
# inequality constraint: -t < x < t
constraints.append(-t <= x)
constraints.append(x <= t)
•
# start_point
start_point = {x:np.zeros(n_inputs), t:np.zeros(n_inputs)}
•
# solve linear programming
prob = LP(objective, start_point, constraints=constraints)
result = prob.minimize('pclp')
•
hat_x = result.xf[x]
24
•
•
•
• easy_install -U openopt
• easy_install -U FuncDesigner
•
•
•
•
•
•
•
•
25

More Related Content

What's hot

[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...
[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...
[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...Deep Learning JP
 
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)narumikanno0918
 
[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders
[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders
[DL輪読会]Monaural Audio Source Separationusing Variational AutoencodersDeep Learning JP
 
パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成Prunus 1350
 
[DL輪読会]Diffusion-based Voice Conversion with Fast Maximum Likelihood Samplin...
[DL輪読会]Diffusion-based Voice Conversion with Fast  Maximum Likelihood Samplin...[DL輪読会]Diffusion-based Voice Conversion with Fast  Maximum Likelihood Samplin...
[DL輪読会]Diffusion-based Voice Conversion with Fast Maximum Likelihood Samplin...Deep Learning JP
 
今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシン今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシンShinya Shimizu
 
SIGNATE 国立国会図書館の画像データレイアウト認識 1st place solution
SIGNATE 国立国会図書館の画像データレイアウト認識 1st place solutionSIGNATE 国立国会図書館の画像データレイアウト認識 1st place solution
SIGNATE 国立国会図書館の画像データレイアウト認識 1st place solutionKoji Asami
 
[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係についてDeep Learning JP
 
勾配降下法の 最適化アルゴリズム
勾配降下法の最適化アルゴリズム勾配降下法の最適化アルゴリズム
勾配降下法の 最適化アルゴリズムnishio
 
グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知Yuya Takashina
 
Variational AutoEncoder
Variational AutoEncoderVariational AutoEncoder
Variational AutoEncoderKazuki Nitta
 
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-Deep Learning JP
 
[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling
[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling
[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence ModelingDeep Learning JP
 
ICML 2020 最適輸送まとめ
ICML 2020 最適輸送まとめICML 2020 最適輸送まとめ
ICML 2020 最適輸送まとめohken
 
Active Learning 入門
Active Learning 入門Active Learning 入門
Active Learning 入門Shuyo Nakatani
 
協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)
協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)
協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)西岡 賢一郎
 
勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)
勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)
勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)RyuichiKanoh
 
Deep Learningと画像認識   ~歴史・理論・実践~
Deep Learningと画像認識 ~歴史・理論・実践~Deep Learningと画像認識 ~歴史・理論・実践~
Deep Learningと画像認識   ~歴史・理論・実践~nlab_utokyo
 
【DL輪読会】Reward Design with Language Models
【DL輪読会】Reward Design with Language Models【DL輪読会】Reward Design with Language Models
【DL輪読会】Reward Design with Language ModelsDeep Learning JP
 

What's hot (20)

[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...
[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...
[DL輪読会]近年のオフライン強化学習のまとめ —Offline Reinforcement Learning: Tutorial, Review, an...
 
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
 
[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders
[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders
[DL輪読会]Monaural Audio Source Separationusing Variational Autoencoders
 
パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成パターン認識と機械学習 §6.2 カーネル関数の構成
パターン認識と機械学習 §6.2 カーネル関数の構成
 
[DL輪読会]Diffusion-based Voice Conversion with Fast Maximum Likelihood Samplin...
[DL輪読会]Diffusion-based Voice Conversion with Fast  Maximum Likelihood Samplin...[DL輪読会]Diffusion-based Voice Conversion with Fast  Maximum Likelihood Samplin...
[DL輪読会]Diffusion-based Voice Conversion with Fast Maximum Likelihood Samplin...
 
今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシン今さら聞けないカーネル法とサポートベクターマシン
今さら聞けないカーネル法とサポートベクターマシン
 
SIGNATE 国立国会図書館の画像データレイアウト認識 1st place solution
SIGNATE 国立国会図書館の画像データレイアウト認識 1st place solutionSIGNATE 国立国会図書館の画像データレイアウト認識 1st place solution
SIGNATE 国立国会図書館の画像データレイアウト認識 1st place solution
 
[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について[DL輪読会]GQNと関連研究,世界モデルとの関係について
[DL輪読会]GQNと関連研究,世界モデルとの関係について
 
勾配降下法の 最適化アルゴリズム
勾配降下法の最適化アルゴリズム勾配降下法の最適化アルゴリズム
勾配降下法の 最適化アルゴリズム
 
グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知グラフィカル Lasso を用いた異常検知
グラフィカル Lasso を用いた異常検知
 
Variational AutoEncoder
Variational AutoEncoderVariational AutoEncoder
Variational AutoEncoder
 
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
 
線形計画法入門
線形計画法入門線形計画法入門
線形計画法入門
 
[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling
[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling
[DL輪読会]Decision Transformer: Reinforcement Learning via Sequence Modeling
 
ICML 2020 最適輸送まとめ
ICML 2020 最適輸送まとめICML 2020 最適輸送まとめ
ICML 2020 最適輸送まとめ
 
Active Learning 入門
Active Learning 入門Active Learning 入門
Active Learning 入門
 
協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)
協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)
協力ゲーム理論でXAI (説明可能なAI) を目指すSHAP (Shapley Additive exPlanation)
 
勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)
勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)
勾配ブースティングの基礎と最新の動向 (MIRU2020 Tutorial)
 
Deep Learningと画像認識   ~歴史・理論・実践~
Deep Learningと画像認識 ~歴史・理論・実践~Deep Learningと画像認識 ~歴史・理論・実践~
Deep Learningと画像認識   ~歴史・理論・実践~
 
【DL輪読会】Reward Design with Language Models
【DL輪読会】Reward Design with Language Models【DL輪読会】Reward Design with Language Models
【DL輪読会】Reward Design with Language Models
 

Viewers also liked

スパースモデリング入門
スパースモデリング入門スパースモデリング入門
スパースモデリング入門Hideo Terada
 
Pythonによる機械学習実験の管理
Pythonによる機械学習実験の管理Pythonによる機械学習実験の管理
Pythonによる機械学習実験の管理Toshihiro Kamishima
 
Model-based Approaches for Independence-Enhanced Recommendation
Model-based Approaches for Independence-Enhanced RecommendationModel-based Approaches for Independence-Enhanced Recommendation
Model-based Approaches for Independence-Enhanced RecommendationToshihiro Kamishima
 
科学技術計算関連Pythonパッケージの概要
科学技術計算関連Pythonパッケージの概要科学技術計算関連Pythonパッケージの概要
科学技術計算関連Pythonパッケージの概要Toshihiro Kamishima
 
信号処理・画像処理における凸最適化
信号処理・画像処理における凸最適化信号処理・画像処理における凸最適化
信号処理・画像処理における凸最適化Shunsuke Ono
 
PyMCがあれば,ベイズ推定でもう泣いたりなんかしない
PyMCがあれば,ベイズ推定でもう泣いたりなんかしないPyMCがあれば,ベイズ推定でもう泣いたりなんかしない
PyMCがあれば,ベイズ推定でもう泣いたりなんかしないToshihiro Kamishima
 
Cvim saisentan-21-tomoaki
Cvim saisentan-21-tomoakiCvim saisentan-21-tomoaki
Cvim saisentan-21-tomoakitomoaki0705
 
Online moving camera_background_subtraction
Online moving camera_background_subtractionOnline moving camera_background_subtraction
Online moving camera_background_subtractionDaichi Suzuo
 
Reconstructing the World’s Museums
Reconstructing the World’s MuseumsReconstructing the World’s Museums
Reconstructing the World’s Museumsketsumedo_yarou
 
NN, CNN, and Image Analysis
NN, CNN, and Image AnalysisNN, CNN, and Image Analysis
NN, CNN, and Image AnalysisYuki Shimada
 
MIRU2016 チュートリアル
MIRU2016 チュートリアルMIRU2016 チュートリアル
MIRU2016 チュートリアルShunsuke Ono
 
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節Hakky St
 
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章Hakky St
 
Rで解く最適化問題 線型計画問題編
Rで解く最適化問題   線型計画問題編 Rで解く最適化問題   線型計画問題編
Rで解く最適化問題 線型計画問題編 Hidekazu Tanaka
 
Polar符号および非対称通信路の符号化について
Polar符号および非対称通信路の符号化についてPolar符号および非対称通信路の符号化について
Polar符号および非対称通信路の符号化についてj_honda
 
ボリュームデータスパース表現のための三次元非分離冗長重複変換
ボリュームデータスパース表現のための三次元非分離冗長重複変換ボリュームデータスパース表現のための三次元非分離冗長重複変換
ボリュームデータスパース表現のための三次元非分離冗長重複変換Shogo Muramatsu
 

Viewers also liked (20)

スパースモデリング入門
スパースモデリング入門スパースモデリング入門
スパースモデリング入門
 
Pythonによる機械学習実験の管理
Pythonによる機械学習実験の管理Pythonによる機械学習実験の管理
Pythonによる機械学習実験の管理
 
Model-based Approaches for Independence-Enhanced Recommendation
Model-based Approaches for Independence-Enhanced RecommendationModel-based Approaches for Independence-Enhanced Recommendation
Model-based Approaches for Independence-Enhanced Recommendation
 
科学技術計算関連Pythonパッケージの概要
科学技術計算関連Pythonパッケージの概要科学技術計算関連Pythonパッケージの概要
科学技術計算関連Pythonパッケージの概要
 
信号処理・画像処理における凸最適化
信号処理・画像処理における凸最適化信号処理・画像処理における凸最適化
信号処理・画像処理における凸最適化
 
PyMCがあれば,ベイズ推定でもう泣いたりなんかしない
PyMCがあれば,ベイズ推定でもう泣いたりなんかしないPyMCがあれば,ベイズ推定でもう泣いたりなんかしない
PyMCがあれば,ベイズ推定でもう泣いたりなんかしない
 
Cvim saisentan-21-tomoaki
Cvim saisentan-21-tomoakiCvim saisentan-21-tomoaki
Cvim saisentan-21-tomoaki
 
Online moving camera_background_subtraction
Online moving camera_background_subtractionOnline moving camera_background_subtraction
Online moving camera_background_subtraction
 
Sparselet eccv2012
Sparselet eccv2012Sparselet eccv2012
Sparselet eccv2012
 
Reconstructing the World’s Museums
Reconstructing the World’s MuseumsReconstructing the World’s Museums
Reconstructing the World’s Museums
 
Clustering1
Clustering1Clustering1
Clustering1
 
Clustering2
Clustering2Clustering2
Clustering2
 
昇圧回路
昇圧回路昇圧回路
昇圧回路
 
NN, CNN, and Image Analysis
NN, CNN, and Image AnalysisNN, CNN, and Image Analysis
NN, CNN, and Image Analysis
 
MIRU2016 チュートリアル
MIRU2016 チュートリアルMIRU2016 チュートリアル
MIRU2016 チュートリアル
 
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 3.3節と3.4節
 
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章
スパース性に基づく機械学習(機械学習プロフェッショナルシリーズ) 1章
 
Rで解く最適化問題 線型計画問題編
Rで解く最適化問題   線型計画問題編 Rで解く最適化問題   線型計画問題編
Rで解く最適化問題 線型計画問題編
 
Polar符号および非対称通信路の符号化について
Polar符号および非対称通信路の符号化についてPolar符号および非対称通信路の符号化について
Polar符号および非対称通信路の符号化について
 
ボリュームデータスパース表現のための三次元非分離冗長重複変換
ボリュームデータスパース表現のための三次元非分離冗長重複変換ボリュームデータスパース表現のための三次元非分離冗長重複変換
ボリュームデータスパース表現のための三次元非分離冗長重複変換
 

Similar to OpenOpt の線形計画で圧縮センシング

Math quota-cmu-g-455
Math quota-cmu-g-455Math quota-cmu-g-455
Math quota-cmu-g-455Rungroj Ssan
 
Cálculo ii howard anton - capítulo 16 [tópicos do cálculo vetorial]
Cálculo ii   howard anton - capítulo 16 [tópicos do cálculo vetorial]Cálculo ii   howard anton - capítulo 16 [tópicos do cálculo vetorial]
Cálculo ii howard anton - capítulo 16 [tópicos do cálculo vetorial]Henrique Covatti
 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuityPume Ananda
 
関数プログラミングことはじめ revival
関数プログラミングことはじめ revival関数プログラミングことはじめ revival
関数プログラミングことはじめ revivalNaoki Kitora
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompokgundul28
 
Solutions manual for calculus an applied approach brief international metric ...
Solutions manual for calculus an applied approach brief international metric ...Solutions manual for calculus an applied approach brief international metric ...
Solutions manual for calculus an applied approach brief international metric ...Larson612
 
Scala kansai summit-2016
Scala kansai summit-2016Scala kansai summit-2016
Scala kansai summit-2016Naoki Kitora
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompokachmadtrybuana
 
Mathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in MatlabMathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in MatlabCOMSATS Abbottabad
 
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...Mario Pavone
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892drayertaurus
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic functionHafidz Mukhtar
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integrationdicosmo178
 

Similar to OpenOpt の線形計画で圧縮センシング (19)

Math quota-cmu-g-455
Math quota-cmu-g-455Math quota-cmu-g-455
Math quota-cmu-g-455
 
Cálculo ii howard anton - capítulo 16 [tópicos do cálculo vetorial]
Cálculo ii   howard anton - capítulo 16 [tópicos do cálculo vetorial]Cálculo ii   howard anton - capítulo 16 [tópicos do cálculo vetorial]
Cálculo ii howard anton - capítulo 16 [tópicos do cálculo vetorial]
 
Prelude to halide_public
Prelude to halide_publicPrelude to halide_public
Prelude to halide_public
 
functions limits and continuity
functions limits and continuityfunctions limits and continuity
functions limits and continuity
 
Functions limits and continuity
Functions limits and continuityFunctions limits and continuity
Functions limits and continuity
 
maths basics
maths basicsmaths basics
maths basics
 
Dif int
Dif intDif int
Dif int
 
関数プログラミングことはじめ revival
関数プログラミングことはじめ revival関数プログラミングことはじめ revival
関数プログラミングことはじめ revival
 
Tugasmatematikakelompok
TugasmatematikakelompokTugasmatematikakelompok
Tugasmatematikakelompok
 
Solutions manual for calculus an applied approach brief international metric ...
Solutions manual for calculus an applied approach brief international metric ...Solutions manual for calculus an applied approach brief international metric ...
Solutions manual for calculus an applied approach brief international metric ...
 
Maths 301 key_sem_1_2007_2008
Maths 301 key_sem_1_2007_2008Maths 301 key_sem_1_2007_2008
Maths 301 key_sem_1_2007_2008
 
Scala kansai summit-2016
Scala kansai summit-2016Scala kansai summit-2016
Scala kansai summit-2016
 
Tugas matematika kelompok
Tugas matematika kelompokTugas matematika kelompok
Tugas matematika kelompok
 
Mathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in MatlabMathematical Modelling of Electro-Mechanical System in Matlab
Mathematical Modelling of Electro-Mechanical System in Matlab
 
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
Clonal Selection: an Immunological Algorithm for Global Optimization over Con...
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892
 
Modul 3 quadratic function
Modul 3 quadratic functionModul 3 quadratic function
Modul 3 quadratic function
 
Interpolation
InterpolationInterpolation
Interpolation
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
 

More from Toshihiro Kamishima

RecSys2018論文読み会 資料
RecSys2018論文読み会 資料RecSys2018論文読み会 資料
RecSys2018論文読み会 資料Toshihiro Kamishima
 
機械学習研究でのPythonの利用
機械学習研究でのPythonの利用機械学習研究でのPythonの利用
機械学習研究でのPythonの利用Toshihiro Kamishima
 
Considerations on Recommendation Independence for a Find-Good-Items Task
Considerations on Recommendation Independence for a Find-Good-Items TaskConsiderations on Recommendation Independence for a Find-Good-Items Task
Considerations on Recommendation Independence for a Find-Good-Items TaskToshihiro Kamishima
 
Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...
Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...
Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...Toshihiro Kamishima
 
Correcting Popularity Bias by Enhancing Recommendation Neutrality
Correcting Popularity Bias by Enhancing Recommendation NeutralityCorrecting Popularity Bias by Enhancing Recommendation Neutrality
Correcting Popularity Bias by Enhancing Recommendation NeutralityToshihiro Kamishima
 
The Independence of Fairness-aware Classifiers
The Independence of Fairness-aware ClassifiersThe Independence of Fairness-aware Classifiers
The Independence of Fairness-aware ClassifiersToshihiro Kamishima
 
Efficiency Improvement of Neutrality-Enhanced Recommendation
Efficiency Improvement of Neutrality-Enhanced RecommendationEfficiency Improvement of Neutrality-Enhanced Recommendation
Efficiency Improvement of Neutrality-Enhanced RecommendationToshihiro Kamishima
 
Absolute and Relative Clustering
Absolute and Relative ClusteringAbsolute and Relative Clustering
Absolute and Relative ClusteringToshihiro Kamishima
 
Consideration on Fairness-aware Data Mining
Consideration on Fairness-aware Data MiningConsideration on Fairness-aware Data Mining
Consideration on Fairness-aware Data MiningToshihiro Kamishima
 
Fairness-aware Classifier with Prejudice Remover Regularizer
Fairness-aware Classifier with Prejudice Remover RegularizerFairness-aware Classifier with Prejudice Remover Regularizer
Fairness-aware Classifier with Prejudice Remover RegularizerToshihiro Kamishima
 
Enhancement of the Neutrality in Recommendation
Enhancement of the Neutrality in RecommendationEnhancement of the Neutrality in Recommendation
Enhancement of the Neutrality in RecommendationToshihiro Kamishima
 
Fairness-aware Learning through Regularization Approach
Fairness-aware Learning through Regularization ApproachFairness-aware Learning through Regularization Approach
Fairness-aware Learning through Regularization ApproachToshihiro Kamishima
 

More from Toshihiro Kamishima (17)

RecSys2018論文読み会 資料
RecSys2018論文読み会 資料RecSys2018論文読み会 資料
RecSys2018論文読み会 資料
 
WSDM2018読み会 資料
WSDM2018読み会 資料WSDM2018読み会 資料
WSDM2018読み会 資料
 
Recommendation Independence
Recommendation IndependenceRecommendation Independence
Recommendation Independence
 
機械学習研究でのPythonの利用
機械学習研究でのPythonの利用機械学習研究でのPythonの利用
機械学習研究でのPythonの利用
 
Considerations on Recommendation Independence for a Find-Good-Items Task
Considerations on Recommendation Independence for a Find-Good-Items TaskConsiderations on Recommendation Independence for a Find-Good-Items Task
Considerations on Recommendation Independence for a Find-Good-Items Task
 
KDD2016勉強会 資料
KDD2016勉強会 資料KDD2016勉強会 資料
KDD2016勉強会 資料
 
WSDM2016勉強会 資料
WSDM2016勉強会 資料WSDM2016勉強会 資料
WSDM2016勉強会 資料
 
ICML2015読み会 資料
ICML2015読み会 資料ICML2015読み会 資料
ICML2015読み会 資料
 
Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...
Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...
Future Directions of Fairness-Aware Data Mining: Recommendation, Causality, a...
 
Correcting Popularity Bias by Enhancing Recommendation Neutrality
Correcting Popularity Bias by Enhancing Recommendation NeutralityCorrecting Popularity Bias by Enhancing Recommendation Neutrality
Correcting Popularity Bias by Enhancing Recommendation Neutrality
 
The Independence of Fairness-aware Classifiers
The Independence of Fairness-aware ClassifiersThe Independence of Fairness-aware Classifiers
The Independence of Fairness-aware Classifiers
 
Efficiency Improvement of Neutrality-Enhanced Recommendation
Efficiency Improvement of Neutrality-Enhanced RecommendationEfficiency Improvement of Neutrality-Enhanced Recommendation
Efficiency Improvement of Neutrality-Enhanced Recommendation
 
Absolute and Relative Clustering
Absolute and Relative ClusteringAbsolute and Relative Clustering
Absolute and Relative Clustering
 
Consideration on Fairness-aware Data Mining
Consideration on Fairness-aware Data MiningConsideration on Fairness-aware Data Mining
Consideration on Fairness-aware Data Mining
 
Fairness-aware Classifier with Prejudice Remover Regularizer
Fairness-aware Classifier with Prejudice Remover RegularizerFairness-aware Classifier with Prejudice Remover Regularizer
Fairness-aware Classifier with Prejudice Remover Regularizer
 
Enhancement of the Neutrality in Recommendation
Enhancement of the Neutrality in RecommendationEnhancement of the Neutrality in Recommendation
Enhancement of the Neutrality in Recommendation
 
Fairness-aware Learning through Regularization Approach
Fairness-aware Learning through Regularization ApproachFairness-aware Learning through Regularization Approach
Fairness-aware Learning through Regularization Approach
 

Recently uploaded

Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxfirstjob4
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...amitlee9823
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfLars Albertsson
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfRachmat Ramadhan H
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptxAnupama Kate
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...amitlee9823
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Valters Lauzums
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Researchmichael115558
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...amitlee9823
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxolyaivanovalion
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...amitlee9823
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAroojKhan71
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysismanisha194592
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusTimothy Spann
 

Recently uploaded (20)

Introduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptxIntroduction-to-Machine-Learning (1).pptx
Introduction-to-Machine-Learning (1).pptx
 
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in  KishangarhDelhi 99530 vip 56974 Genuine Escort Service Call Girls in  Kishangarh
Delhi 99530 vip 56974 Genuine Escort Service Call Girls in Kishangarh
 
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
Call Girls Bannerghatta Road Just Call 👗 7737669865 👗 Top Class Call Girl Ser...
 
Schema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdfSchema on read is obsolete. Welcome metaprogramming..pdf
Schema on read is obsolete. Welcome metaprogramming..pdf
 
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdfMarket Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
Market Analysis in the 5 Largest Economic Countries in Southeast Asia.pdf
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx100-Concepts-of-AI by Anupama Kate .pptx
100-Concepts-of-AI by Anupama Kate .pptx
 
Sampling (random) method and Non random.ppt
Sampling (random) method and Non random.pptSampling (random) method and Non random.ppt
Sampling (random) method and Non random.ppt
 
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
Call Girls Hsr Layout Just Call 👗 7737669865 👗 Top Class Call Girl Service Ba...
 
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
Digital Advertising Lecture for Advanced Digital & Social Media Strategy at U...
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Discover Why Less is More in B2B Research
Discover Why Less is More in B2B ResearchDiscover Why Less is More in B2B Research
Discover Why Less is More in B2B Research
 
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
Call Girls Indiranagar Just Call 👗 7737669865 👗 Top Class Call Girl Service B...
 
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts ServiceCall Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
Call Girls In Shalimar Bagh ( Delhi) 9953330565 Escorts Service
 
BabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptxBabyOno dropshipping via API with DroFx.pptx
BabyOno dropshipping via API with DroFx.pptx
 
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Saket (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
Chintamani Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore ...
 
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al BarshaAl Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
Al Barsha Escorts $#$ O565212860 $#$ Escort Service In Al Barsha
 
April 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's AnalysisApril 2024 - Crypto Market Report's Analysis
April 2024 - Crypto Market Report's Analysis
 
Generative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and MilvusGenerative AI on Enterprise Cloud with NiFi and Milvus
Generative AI on Enterprise Cloud with NiFi and Milvus
 

OpenOpt の線形計画で圧縮センシング

  • 1. 1
  • 3. 3
  • 7. 7 0 1 0 0 0 01
  • 8. 8
  • 9. 9 y=A x x ˆx = arg min x kxk0 subject to y = Ax ˆx = arg min x kxk1 subject to y = Ax x t O(K log(M/K)) < N x ˆx = arg min x X ti subject to t  x  t, y = Ax
  • 12. 12 • • • • # objective to minimize: f x^T -> min f = np.zeros((n_inputs * 2), dtype=np.float) f[n_inputs:2 * n_inputs] = 1.0 P i ti ˆx = arg min x X ti subject to t  x  t, y = Ax
  • 13. 13 • • # constraint: a x^T == b a_eq = np.zeros((n_outputs, 2 * n_inputs), dtype=np.float) a_eq[:, 0:n_inputs] = trans b_eq = x1 y = Ax t  x  t • xi ti  0, xi ti  0, for i = 0, . . . , M # constraint: -t <= x <= t a = np.zeros((2 * n_inputs, 2 * n_inputs), dtype=np.float) for i in xrange(n_inputs): a[i, i] = -1.0 a[i, n_inputs + i] = -1.0 a[n_inputs + i, i] = 1.0 a[n_inputs + i, n_inputs + i] = -1.0 b = np.zeros(n_inputs * 2)
  • 14. 14 # solve linear programming prob = openopt.LP(f=f, Aeq=a_eq, beq=b_eq, A=a, b=b) result = prob.minimize('pclp') • • •
  • 15. 15
  • 16. 16
  • 18. 18 • • • v = fd.oovar('speed') import FuncDesigner as fd a = fd.oovar() • x = fd.oovar(size=100) • • a, b, c = fd.oovars('a', 'b', 'c') ※
  • 19. 19 ※ ※ • f = a * b + x / y • f = fd.sin(x) g += c g = fd.log(y) • f = fd.dot(a, b) g = fd.sum(x) • • f = 0 for i in xrange(3): f = f + a[i]
  • 20. 20 • • ※ In [10]: a = fd.oovar() In [12]: f = fd.sin(a) In [13]: f(1) AttributeError In [20]: a, b = fd.oovars(2) In [21]: f = a + b In [22]: p = { a:1, b:10 } In [23]: f(p) Out[23]: array(11.0) • In [30]: a, b = fd.oovars(2) In [31]: f = a + b In [32]: p = { a:1.0, b:np.array([10., 20., 30.]) } In [33]: f(p) Out[33]: array([ 11., 21., 31.])
  • 21. 21 • • In [10]: x = fd.oovar() In [11]: f = fd.sin(x) In [12]: f({x:np.pi}) Out[12]: array(1.2246467991473532e-16) # 0 In [13]: f.D({x:np.pi}) Out[13]: {unnamed_oofun_11: -1.0} # sin'(π) = cos(π) = -1.0 • In [20]: x = fd.oovar() In [21]: f = 2 * x ** 2 In [22]: p = {x:np.array([1., 2., 3.])} In [23]: f(p) Out[23]: array([ 2., 8., 18.]) In [24]: f.D(p) Out[24]: {unnamed_oofun_13: array([[ 4., 0., 0.], [ 0., 8., 0.], [ 0., 0., 12.]])}
  • 22. 22 • # define variable t = fd.oovar('t', size=n_inputs) x = fd.oovar('x', size=n_inputs) # objective to minimize: f x^T -> min objective = fd.sum(t) • • • # init constraints constraints = [] • # equality constraint: a_eq x^T = b_eq constraints.append(fd.dot(trans, x) == x1)
  • 23. 23 • # inequality constraint: -t < x < t constraints.append(-t <= x) constraints.append(x <= t) • # start_point start_point = {x:np.zeros(n_inputs), t:np.zeros(n_inputs)} • # solve linear programming prob = LP(objective, start_point, constraints=constraints) result = prob.minimize('pclp') • hat_x = result.xf[x]
  • 24. 24 • • • • easy_install -U openopt • easy_install -U FuncDesigner • •