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

スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元Shogo Muramatsu
 
わかりやすいパターン認識_2章
わかりやすいパターン認識_2章わかりやすいパターン認識_2章
わかりやすいパターン認識_2章weda654
 
スパースモデリング入門
スパースモデリング入門スパースモデリング入門
スパースモデリング入門Hideo Terada
 
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜Tomoki Yoshida
 
SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜
SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜
SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜SSII
 
Introduction to A3C model
Introduction to A3C modelIntroduction to A3C model
Introduction to A3C modelWEBFARMER. ltd.
 
MIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチMIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチHironobu Fujiyoshi
 
文献紹介:YOLO series:v1-v5, X, F, and YOWO
文献紹介:YOLO series:v1-v5, X, F, and YOWO文献紹介:YOLO series:v1-v5, X, F, and YOWO
文献紹介:YOLO series:v1-v5, X, F, and YOWOToru Tamaki
 
L0TV: a new method for image restoration in the presence of impulse noise
L0TV: a new method for image restoration in the presence of impulse noiseL0TV: a new method for image restoration in the presence of impulse noise
L0TV: a new method for image restoration in the presence of impulse noiseFujimoto Keisuke
 
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-Deep Learning JP
 
DeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワーク
DeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワークDeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワーク
DeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワークhirono kawashima
 
方策勾配型強化学習の基礎と応用
方策勾配型強化学習の基礎と応用方策勾配型強化学習の基礎と応用
方策勾配型強化学習の基礎と応用Ryo Iwaki
 
[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning
[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning
[DL輪読会]Randomized Prior Functions for Deep Reinforcement LearningDeep Learning JP
 
Recent Advances on Transfer Learning and Related Topics Ver.2
Recent Advances on Transfer Learning and Related Topics Ver.2Recent Advances on Transfer Learning and Related Topics Ver.2
Recent Advances on Transfer Learning and Related Topics Ver.2Kota Matsui
 
[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介
[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介
[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介Deep Learning JP
 
統計的学習の基礎6章前半 #カステラ本
統計的学習の基礎6章前半 #カステラ本統計的学習の基礎6章前半 #カステラ本
統計的学習の基礎6章前半 #カステラ本Akifumi Eguchi
 
2018年01月27日 TensorBoardによる学習の可視化
2018年01月27日 TensorBoardによる学習の可視化2018年01月27日 TensorBoardによる学習の可視化
2018年01月27日 TensorBoardによる学習の可視化aitc_jp
 
強化学習 DQNからPPOまで
強化学習 DQNからPPOまで強化学習 DQNからPPOまで
強化学習 DQNからPPOまでharmonylab
 

What's hot (20)

スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元スパースモデリングによる多次元信号・画像復元
スパースモデリングによる多次元信号・画像復元
 
わかりやすいパターン認識_2章
わかりやすいパターン認識_2章わかりやすいパターン認識_2章
わかりやすいパターン認識_2章
 
スパースモデリング入門
スパースモデリング入門スパースモデリング入門
スパースモデリング入門
 
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
凸最適化 〜 双対定理とソルバーCVXPYの紹介 〜
 
SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜
SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜
SSII2021 [TS2] 深層強化学習 〜 強化学習の基礎から応用まで 〜
 
Introduction to A3C model
Introduction to A3C modelIntroduction to A3C model
Introduction to A3C model
 
coordinate descent 法について
coordinate descent 法についてcoordinate descent 法について
coordinate descent 法について
 
MIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチMIRU2013チュートリアル:SIFTとそれ以降のアプローチ
MIRU2013チュートリアル:SIFTとそれ以降のアプローチ
 
汎化性能測定
汎化性能測定汎化性能測定
汎化性能測定
 
文献紹介:YOLO series:v1-v5, X, F, and YOWO
文献紹介:YOLO series:v1-v5, X, F, and YOWO文献紹介:YOLO series:v1-v5, X, F, and YOWO
文献紹介:YOLO series:v1-v5, X, F, and YOWO
 
L0TV: a new method for image restoration in the presence of impulse noise
L0TV: a new method for image restoration in the presence of impulse noiseL0TV: a new method for image restoration in the presence of impulse noise
L0TV: a new method for image restoration in the presence of impulse noise
 
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
[DL輪読会]`強化学習のための状態表現学習 -より良い「世界モデル」の獲得に向けて-
 
DeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワーク
DeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワークDeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワーク
DeepLearning 10章 回帰結合型ニューラルネットワークと再帰型ネットワーク
 
方策勾配型強化学習の基礎と応用
方策勾配型強化学習の基礎と応用方策勾配型強化学習の基礎と応用
方策勾配型強化学習の基礎と応用
 
[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning
[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning
[DL輪読会]Randomized Prior Functions for Deep Reinforcement Learning
 
Recent Advances on Transfer Learning and Related Topics Ver.2
Recent Advances on Transfer Learning and Related Topics Ver.2Recent Advances on Transfer Learning and Related Topics Ver.2
Recent Advances on Transfer Learning and Related Topics Ver.2
 
[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介
[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介
[DL輪読会]Convolutional Conditional Neural Processesと Neural Processes Familyの紹介
 
統計的学習の基礎6章前半 #カステラ本
統計的学習の基礎6章前半 #カステラ本統計的学習の基礎6章前半 #カステラ本
統計的学習の基礎6章前半 #カステラ本
 
2018年01月27日 TensorBoardによる学習の可視化
2018年01月27日 TensorBoardによる学習の可視化2018年01月27日 TensorBoardによる学習の可視化
2018年01月27日 TensorBoardによる学習の可視化
 
強化学習 DQNからPPOまで
強化学習 DQNからPPOまで強化学習 DQNからPPOまで
強化学習 DQNからPPOまで
 

Viewers also liked

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
 
Fired Heater and Combustion eBook
Fired Heater and Combustion eBookFired Heater and Combustion eBook
Fired Heater and Combustion eBookFlow-Tech, Inc.
 

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符号および非対称通信路の符号化について
 
ボリュームデータスパース表現のための三次元非分離冗長重複変換
ボリュームデータスパース表現のための三次元非分離冗長重複変換ボリュームデータスパース表現のための三次元非分離冗長重複変換
ボリュームデータスパース表現のための三次元非分離冗長重複変換
 
Fired Heater and Combustion eBook
Fired Heater and Combustion eBookFired Heater and Combustion eBook
Fired Heater and Combustion eBook
 

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

Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% SecurePooja Nehwal
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxolyaivanovalion
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxolyaivanovalion
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfadriantubila
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxolyaivanovalion
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionfulawalesam
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxolyaivanovalion
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxolyaivanovalion
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFxolyaivanovalion
 
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
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...SUHANI PANDEY
 
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
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceDelhi Call girls
 
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 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
 

Recently uploaded (20)

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
 
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% SecureCall me @ 9892124323  Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
Call me @ 9892124323 Cheap Rate Call Girls in Vashi with Real Photo 100% Secure
 
Zuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptxZuja dropshipping via API with DroFx.pptx
Zuja dropshipping via API with DroFx.pptx
 
CebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptxCebaBaby dropshipping via API with DroFX.pptx
CebaBaby dropshipping via API with DroFX.pptx
 
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdfAccredited-Transport-Cooperatives-Jan-2021-Web.pdf
Accredited-Transport-Cooperatives-Jan-2021-Web.pdf
 
Ravak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptxRavak dropshipping via API with DroFx.pptx
Ravak dropshipping via API with DroFx.pptx
 
Week-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interactionWeek-01-2.ppt BBB human Computer interaction
Week-01-2.ppt BBB human Computer interaction
 
Midocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFxMidocean dropshipping via API with DroFx
Midocean dropshipping via API with DroFx
 
Edukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFxEdukaciniai dropshipping via API with DroFx
Edukaciniai dropshipping via API with DroFx
 
Halmar dropshipping via API with DroFx
Halmar  dropshipping  via API with DroFxHalmar  dropshipping  via API with DroFx
Halmar dropshipping via API with DroFx
 
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
(NEHA) Call Girls Katra Call Now 8617697112 Katra Escorts 24x7
 
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
 
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
VIP Model Call Girls Hinjewadi ( Pune ) Call ON 8005736733 Starting From 5K t...
 
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
 
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Junnasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort ServiceBDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
BDSM⚡Call Girls in Mandawali Delhi >༒8448380779 Escort Service
 
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
 
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
 
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...
 
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get CytotecAbortion pills in Doha Qatar (+966572737505 ! Get Cytotec
Abortion pills in Doha Qatar (+966572737505 ! Get Cytotec
 

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