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

はじめてのパターン認識 第5章 k最近傍法(k_nn法)
はじめてのパターン認識 第5章 k最近傍法(k_nn法)はじめてのパターン認識 第5章 k最近傍法(k_nn法)
はじめてのパターン認識 第5章 k最近傍法(k_nn法)
Motoya Wakiyama
 

What's hot (20)

クラシックな機械学習の入門 6. 最適化と学習アルゴリズム
クラシックな機械学習の入門  6. 最適化と学習アルゴリズムクラシックな機械学習の入門  6. 最適化と学習アルゴリズム
クラシックな機械学習の入門 6. 最適化と学習アルゴリズム
 
はじめてのパターン認識 第5章 k最近傍法(k_nn法)
はじめてのパターン認識 第5章 k最近傍法(k_nn法)はじめてのパターン認識 第5章 k最近傍法(k_nn法)
はじめてのパターン認識 第5章 k最近傍法(k_nn法)
 
最適輸送の計算アルゴリズムの研究動向
最適輸送の計算アルゴリズムの研究動向最適輸送の計算アルゴリズムの研究動向
最適輸送の計算アルゴリズムの研究動向
 
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
スパースモデリング、スパースコーディングとその数理(第11回WBA若手の会)
 
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
 
[DL輪読会]Reward Augmented Maximum Likelihood for Neural Structured Prediction
[DL輪読会]Reward Augmented Maximum Likelihood for Neural Structured Prediction[DL輪読会]Reward Augmented Maximum Likelihood for Neural Structured Prediction
[DL輪読会]Reward Augmented Maximum Likelihood for Neural Structured Prediction
 
[DL輪読会]逆強化学習とGANs
[DL輪読会]逆強化学習とGANs[DL輪読会]逆強化学習とGANs
[DL輪読会]逆強化学習とGANs
 
adversarial training.pptx
adversarial training.pptxadversarial training.pptx
adversarial training.pptx
 
東京都市大学 データ解析入門 4 スパース性と圧縮センシング1
東京都市大学 データ解析入門 4 スパース性と圧縮センシング1東京都市大学 データ解析入門 4 スパース性と圧縮センシング1
東京都市大学 データ解析入門 4 スパース性と圧縮センシング1
 
SMO徹底入門 - SVMをちゃんと実装する
SMO徹底入門 - SVMをちゃんと実装するSMO徹底入門 - SVMをちゃんと実装する
SMO徹底入門 - SVMをちゃんと実装する
 
1次式とノルムで構成された最適化問題とその双対問題
1次式とノルムで構成された最適化問題とその双対問題1次式とノルムで構成された最適化問題とその双対問題
1次式とノルムで構成された最適化問題とその双対問題
 
CuPy解説
CuPy解説CuPy解説
CuPy解説
 
Prml6
Prml6Prml6
Prml6
 
クラスタリングとレコメンデーション資料
クラスタリングとレコメンデーション資料クラスタリングとレコメンデーション資料
クラスタリングとレコメンデーション資料
 
【解説】 一般逆行列
【解説】 一般逆行列【解説】 一般逆行列
【解説】 一般逆行列
 
変分ベイズ法の説明
変分ベイズ法の説明変分ベイズ法の説明
変分ベイズ法の説明
 
[DL輪読会]Wasserstein GAN/Towards Principled Methods for Training Generative Adv...
[DL輪読会]Wasserstein GAN/Towards Principled Methods for Training Generative Adv...[DL輪読会]Wasserstein GAN/Towards Principled Methods for Training Generative Adv...
[DL輪読会]Wasserstein GAN/Towards Principled Methods for Training Generative Adv...
 
最適輸送の解き方
最適輸送の解き方最適輸送の解き方
最適輸送の解き方
 
最急降下法
最急降下法最急降下法
最急降下法
 
PRML輪読#1
PRML輪読#1PRML輪読#1
PRML輪読#1
 

Viewers also liked

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
Toshihiro Kamishima
 
Online moving camera_background_subtraction
Online moving camera_background_subtractionOnline moving camera_background_subtraction
Online moving camera_background_subtraction
Daichi Suzuo
 
Reconstructing the World’s Museums
Reconstructing the World’s MuseumsReconstructing the World’s Museums
Reconstructing the World’s Museums
ketsumedo_yarou
 
Rで解く最適化問題 線型計画問題編
Rで解く最適化問題   線型計画問題編 Rで解く最適化問題   線型計画問題編
Rで解く最適化問題 線型計画問題編
Hidekazu Tanaka
 

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-455
Rungroj Ssan
 
Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892Tugasmatematikakelompok 150715235527-lva1-app6892
Tugasmatematikakelompok 150715235527-lva1-app6892
drayertaurus
 
8.7 numerical integration
8.7 numerical integration8.7 numerical integration
8.7 numerical integration
dicosmo178
 

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

Recommendation Independence
Recommendation IndependenceRecommendation Independence
Recommendation Independence
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 Task
Toshihiro Kamishima
 
The Independence of Fairness-aware Classifiers
The Independence of Fairness-aware ClassifiersThe Independence of Fairness-aware Classifiers
The Independence of Fairness-aware Classifiers
Toshihiro Kamishima
 
Efficiency Improvement of Neutrality-Enhanced Recommendation
Efficiency Improvement of Neutrality-Enhanced RecommendationEfficiency Improvement of Neutrality-Enhanced Recommendation
Efficiency Improvement of Neutrality-Enhanced Recommendation
Toshihiro Kamishima
 
Consideration on Fairness-aware Data Mining
Consideration on Fairness-aware Data MiningConsideration on Fairness-aware Data Mining
Consideration on Fairness-aware Data Mining
Toshihiro 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 Regularizer
Toshihiro Kamishima
 
Enhancement of the Neutrality in Recommendation
Enhancement of the Neutrality in RecommendationEnhancement of the Neutrality in Recommendation
Enhancement of the Neutrality in Recommendation
Toshihiro Kamishima
 
Fairness-aware Learning through Regularization Approach
Fairness-aware Learning through Regularization ApproachFairness-aware Learning through Regularization Approach
Fairness-aware Learning through Regularization Approach
Toshihiro 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

怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
vexqp
 
一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样
一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样
一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样
wsppdmt
 
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit RiyadhCytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Abortion pills in Riyadh +966572737505 get cytotec
 
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling ManjurJual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
ptikerjasaptiker
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
Health
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Bertram Ludäscher
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
ranjankumarbehera14
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
nirzagarg
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
ZurliaSoop
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
gajnagarg
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
gajnagarg
 

Recently uploaded (20)

The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptxThe-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
The-boAt-Story-Navigating-the-Waves-of-Innovation.pptx
 
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
怎样办理圣地亚哥州立大学毕业证(SDSU毕业证书)成绩单学校原版复制
 
一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样
一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样
一比一原版(UCD毕业证书)加州大学戴维斯分校毕业证成绩单原件一模一样
 
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit RiyadhCytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
Cytotec in Jeddah+966572737505) get unwanted pregnancy kit Riyadh
 
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
5CL-ADBA,5cladba, Chinese supplier, safety is guaranteed
 
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling ManjurJual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
Jual Cytotec Asli Obat Aborsi No. 1 Paling Manjur
 
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...
 
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
+97470301568>>weed for sale in qatar ,weed for sale in dubai,weed for sale in...
 
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24  Building Real-Time Pipelines With FLaNKDATA SUMMIT 24  Building Real-Time Pipelines With FLaNK
DATA SUMMIT 24 Building Real-Time Pipelines With FLaNK
 
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...Reconciling Conflicting Data Curation Actions:  Transparency Through Argument...
Reconciling Conflicting Data Curation Actions: Transparency Through Argument...
 
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
 
Dubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls DubaiDubai Call Girls Peeing O525547819 Call Girls Dubai
Dubai Call Girls Peeing O525547819 Call Girls Dubai
 
Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1Lecture_2_Deep_Learning_Overview-newone1
Lecture_2_Deep_Learning_Overview-newone1
 
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Purnia [ 7014168258 ] Call Me For Genuine Models We...
 
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
Jual Obat Aborsi Surabaya ( Asli No.1 ) 085657271886 Obat Penggugur Kandungan...
 
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
Top profile Call Girls In dimapur [ 7014168258 ] Call Me For Genuine Models W...
 
Data Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdfData Analyst Tasks to do the internship.pdf
Data Analyst Tasks to do the internship.pdf
 
Harnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptxHarnessing the Power of GenAI for BI and Reporting.pptx
Harnessing the Power of GenAI for BI and Reporting.pptx
 
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
Top profile Call Girls In Chandrapur [ 7014168258 ] Call Me For Genuine Model...
 
Switzerland Constitution 2002.pdf.........
Switzerland Constitution 2002.pdf.........Switzerland Constitution 2002.pdf.........
Switzerland Constitution 2002.pdf.........
 

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 • •