* Satoshi Hara and Kohei Hayashi. Making Tree Ensembles Interpretable: A Bayesian Model Selection Approach. AISTATS'18 (to appear).
arXiv ver.: https://arxiv.org/abs/1606.09066#
* GitHub
https://github.com/sato9hara/defragTrees
* Satoshi Hara and Kohei Hayashi. Making Tree Ensembles Interpretable: A Bayesian Model Selection Approach. AISTATS'18 (to appear).
arXiv ver.: https://arxiv.org/abs/1606.09066#
* GitHub
https://github.com/sato9hara/defragTrees
ERATO感謝祭 Season IV
【参考】Satoshi Hara and Takanori Maehara. Enumerate Lasso Solutions for Feature Selection. In Proceedings of the 31st AAAI Conference on Artificial Intelligence (AAAI'17), pages 1985--1991, 2017.
AAAI2023「Are Transformers Effective for Time Series Forecasting?」と、HuggingFace「Yes, Transformers are Effective for Time Series Forecasting (+ Autoformer)」の紹介です。
ERATO感謝祭 Season IV
【参考】Satoshi Hara and Takanori Maehara. Enumerate Lasso Solutions for Feature Selection. In Proceedings of the 31st AAAI Conference on Artificial Intelligence (AAAI'17), pages 1985--1991, 2017.
AAAI2023「Are Transformers Effective for Time Series Forecasting?」と、HuggingFace「Yes, Transformers are Effective for Time Series Forecasting (+ Autoformer)」の紹介です。
脳波信号を対象としたEPIAモデル構造に関する研究 (Study on model structure of EPIA for EEG signals)Kenyu Uehara
研究ブログはこちら: https://kenyu-life.com/
Created by 上原賢祐
日本機械学会Dynamics and design conference 2018(東京農工大学)にて発表した時の資料です.
<ABSTRACT>
ヒトの思考や精神的状態など様々な要因によって変動する脳波は,非常に高次な情報を有しているが、時系列波形が複雑であるため,この高次な情報を取り出すことが困難である.そこで脳波の時系列波形の挙動を数学的にモデル化し解析窓ごとにモデルパラメータを実験的に同定するといった解析手法が有効であると考えられる.本報告では脳波解析を行うための最適なモデル構造の検討を目的として,代表的な2つの非線形振動子であるDuffing型およびVan der Pol型と,線形の粘性減衰振動子を用いた場合の結果と比較を行った.
Computational Motor Control: Reinforcement Learning (JAIST summer course) hirokazutanaka
This is lecure 6 note for JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). Lecture video: https://www.youtube.com/watch?v=GHMcx5F0_j8
Computational Motor Control: Optimal Control for Stochastic Systems (JAIST su...hirokazutanaka
This is lecure 5 note for JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). Lecture video: https://www.youtube.com/watch?v=XS7MDRMPQfU
Computational Motor Control: Optimal Estimation in Noisy World (JAIST summer ...hirokazutanaka
This is lecure 4 note for JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). Lecture video: https://www.youtube.com/watch?v=2-VRBIg5m0w
Computational Motor Control: State Space Models for Motor Adaptation (JAIST s...hirokazutanaka
This is lecure 3 note for JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). Lecture video: https://www.youtube.com/watch?v=dtpgJLRt90M
Computational Motor Control: Optimal Control for Deterministic Systems (JAIST...hirokazutanaka
This is lecure 2 note for JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). Lecture video: https://www.youtube.com/watch?v=lNH1q4y1m-U
Computational Motor Control: Kinematics & Dynamics (JAIST summer course)hirokazutanaka
Computational Motor Control: Kinematics & Dynamics (JAIST summer course)
This is lecture 1 note for JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). Lecture video: https://www.youtube.com/watch?v=8nk4DlpAaS8
Computational Motor Control: Introduction (JAIST summer course)hirokazutanaka
This is a course introduction to JAIST summer school on computational motor control (Hirokazu Tanaka & Hiroyuki Kambara). https://www.youtube.com/user/ht2022columbia
12. 時系列データの二つの表現:時間表現と周波数表現
( ) ( ) ( )
( ) ( )
0
1 2
0
1
1 2
1
sin cos sin 2 cos 2
2
sin cos
2
k k
k k
a
x t a t b t a t b t
a
a kt b kt
∞
=
∞
=
=
=+ + + + +
+ +∑ ∑
フーリエ変換
時系列データは時間表現(時間の関数)と周波数表現(正弦関数の和)の両方で表
すことができる
1−
( )x t時間表現 { } { },k ka b周波数表現
フーリエ変換
逆フーリエ変換
( ) ( )2x t x tπ+ =
ここでx(t)は周期2πの周期関数
13. 時系列データの二つの表現:時間表現と周波数表現
( ) ( ) ( )
( ) ( )
0
1 2
0
1
1 2
1
sin cos sin 2 cos 2
2
sin cos
2
k k
k k
a
x t a t b t a t b t
a
a kt b kt
∞
=
∞
=
=
=+ + + + +
+ +∑ ∑
フーリエ変換
時系列データは時間表現(時間の関数)と周波数表現(正弦関数の和)の両方で表
すことができる
( ) ( )2x t x tπ+ =
ここでx(t)は周期2πの周期関数
= +( ) ( ) ( ) ( ) ( )
1 1
2 2
0
1
1
sin sin 2 cos cos 2
2
a b
a b
a
x t t t t t
=+ +
+
15. フーリエ変換によるノイズ除去の例
CH02_SEC02_2_Denoise_production
%% create a simple signal with two frequencies
dt = .001;
t = 0:dt:1;
x = sin(2*pi*50*t) + sin(2*pi*120*t); % クリーンデータ
y = x + 2.5*randn(size(t)); % ガウスノイズを付加
%% Compute the Fast Fourier Transform FFT
N = length(t);
Y = fft(y,N); % computes the (fast) discrete Fourier transform
PSD = Y.*conj(Y)/N; % Power spectrum (how much power in each freq)
freq = 1/(dt*N)*(0:N); %create the x-axis of frequencies in Hz
L = 1:floor(N/2); % only plot the first half of freqs
%% Use the PSD to filter out noise
indices = PSD>100; % Find all freqs with large power
PSDclean = PSD.*indices; % Zero out all others
Y = indices.*Y; % zero out small Fourier coefficients in Y
yfilt = ifft(Y); % inverse FFT to get filtered time-domain signal
x: 元のデータ
y: 観測データ
Y: フーリエ級数
yfilt: フィルタデータ
ノイズ付加
フーリエ変換
逆フーリエ変換
16. フーリエ変換によるノイズ除去の例
CH02_SEC02_2_Denoise_production
%% create a simple signal with two frequencies
dt = .001;
t = 0:dt:1;
x = sin(2*pi*50*t) + sin(2*pi*120*t);
y = x + 2.5*randn(size(t));
%% Compute the Fast Fourier Transform FFT
N = length(t);
Y = fft(y,N);
PSD = Y.*conj(Y)/N;
freq = 1/(dt*N)*(0:N);
L = 1:floor(N/2);
%% Use the PSD to filter out noise
indices = PSD>100;
PSDclean = PSD.*indices;
Y = indices.*Y;
yfilt = ifft(Y);
18. 二次元フーリエ変換による画像圧縮
clear all, close all, clc
A = imread('../DATA/dog.jpg');
% A = imread('../../CH01_SVD/DATA/dog.jpg');
B = rgb2gray(A);
%% FFT Compression
Bt=fft2(B); % B is grayscale image from above
Btsort = sort(abs(Bt(:))); % Sort by magnitude
% Zero out all small coefficients and inverse transform
for keep=[.1 .05 .01 .002];
thresh = Btsort(floor((1-keep)*length(Btsort)));
ind = abs(Bt)>thresh; % Find small indices
Atlow = Bt.*ind; % Threshold small
indices
Alow=uint8(ifft2(Atlow)); % Compressed image
figure, imshow(Alow) % Plot Reconstruction
end
CH02_SEC06_2_Compress.m
26. スパース性(Sparsity)とLpノルム
( )2
1
2 2 22
1 22
1
n
n i
i
x xx x
=
= + + =+ ∑x
( )1 2, , , n
nx x x= ∈x
( )2
1
1
1
1
n pp p p pp
i
i
np
x x x x
=
= + ++ =
∑x
n次元ベクトル
ユークリッド距離
Lp ノルム(距離)
1
4
1=x 1∞
=x1
2
1=x
1
1=x 3
2
1=x
2
1=x 4
1=x
27. スパース性(Sparsity)とLpノルム:具体例の図示
( ) 2
1 2,x x= ∈x
( )1 2,x x
( )1 2,x x
1x 1x
2x2x 2 2
1 22
xx= +x
1 21
x x= +x
( )1 2max ,x x∞
=x
2 1∞
≤ ≤x x x
29. 【復習】劣決定系(under-determined system)
=Ax b
, ,m nn m×
∈ ∈ ∈A x b
A x b= A x =A =
(# 方程式) > (# 未定変数)
優決定系
(# 方程式) = (# 未定変数) (# 方程式) < (# 未定変数)
劣決定系
bx b
1−
=x A b+
=x A b
スパース解
(講義4,5でやります)逆行列擬逆行列
31. 次元縮約と圧縮センシング
0L 0
ˆ arg min subject to=
s
Ψss s y C
スパース性の背後にある考え方
- 観測データは(うまく表現を選べば)低い次元から構成されている。
- したがって、適切な表現の下で、観測データに当てはまる低次元の説明変数を
見つけるべき。
0
s L0 ノルム:ゼロでない要素の数
線形方程式 を満たす解の中で、ベクトル のゼロでない要素の数を最小にす
る解を見つけよ
=y CΨs s
33. スパース性(Sparsity)とLpノルム
( )2
1
2 2 22
1 22
1
n
n i
i
x xx x
=
= + + =+ ∑x
( )1 2, , , n
nx x x= ∈x
( )2
1
1
1
1
n pp p p pp
i
i
np
x x x x
=
= + ++ =
∑x
n次元ベクトル
ユークリッド距離
Lp ノルム(距離)
1
4
1=x 1∞
=x1
2
1=x
1
1=x 3
2
1=x
2
1=x 4
1=x
34. 劣決定系の一つの解:L1 ノルム最小解
% Solve y = Theta * s for "s"
n = 1000; % dimension of s
p = 200; % number of measurements
Theta = randn(p,n);
y = randn(p,1);
% L1 minimum norm solution s_L1
cvx_begin;
variable s_L1(n);
minimize( norm(s_L1,1) );
subject to
Theta*s_L1 == y;
cvx_end;
% L2 minimum norm solution s_L2
s_L2 = pinv(Theta)*y;
L1ノルム最小解:
L2ノルム最小解:
s_L1
s_L2
CH03_SEC03_1_Underdetermined.m
1L 1
ˆ arg min subject to= =
s
s s y CΨs
2L 2
ˆ arg min subject to= =
s
s s y CΨs
35. 劣決定系の一つの解:L1 ノルム最小解
% Solve y = Theta * s for "s"
n = 1000; % dimension of s
p = 200; % number of measurements
Theta = randn(p,n);
y = randn(p,1);
% L1 minimum norm solution s_L1
cvx_begin;
variable s_L1(n);
minimize( norm(s_L1,1) );
subject to
Theta*s_L1 == y;
cvx_end;
% L2 minimum norm solution s_L2
s_L2 = pinv(Theta)*y;
L1ノルム最小解:
- ほとんどの係数が0
- 0でない係数は大きな値をとる
L2ノルム最小解:
- ほとんどの係数は0でない
- 全体的に中庸な値を取る
s_L1
s_L2
CH03_SEC03_1_Underdetermined.m
36. 劣決定系の一つの解:L1 ノルム最小解
CH03_SEC03_2_AudioCS.m
%% Generate signal, DCT of signal
n = 4096; % points in high resolution signal
t = linspace(0, 1, n);
x = cos(2* 97 * pi * t) + cos(2* 777 * pi * t);
xt = fft(x); % Fourier transformed signal
PSD = xt.*conj(xt)/n; % Power spectral density
%% Randomly sample signal
p = 128; % num. random samples, p=n/32
perm = round(rand(p, 1) * n);
y = x(perm); % compressed measurement
%% Solve compressed sensing problem
Psi = dct(eye(n, n)); % build Psi
Theta = Psi(perm, :); % Measure rows of Psi
% s = cosamp(Theta,y',10,1.e-10,10); % CS via matching pursuit
opts.maxiter = 10;
opts.normTol = 1.e-10;
s = CoSaMP(Theta,y',5,[],opts); % CS via matching pursuit
xrecon = idct(s); % reconstruct full signal