なぜ学習ロードマップが必要か
デジタル信号処理(DSP)と機械学習(ML)は別々に学ぶと、それぞれが膨大な手法群を持つためどこから手をつけるかで挫折しがちである。実務では「センサデータ → 前処理(フィルタ)→ 特徴量 → ML モデル」と一連で扱うことが多く、両者を串刺しで学ぶ動線が要る。
本ブログでは過去 5 サイクルで以下の集約ハブを段階的に整備してきた:
- https://yuhi-sa.github.io/posts/20260521_bode_plot/1/ — Bode 線図ハブ(周波数応答の基礎)
- https://yuhi-sa.github.io/posts/20260522_monte_carlo_optimization/1/ — モンテカルロ最適化ハブ(最適化の確率的手法)
- https://yuhi-sa.github.io/posts/20260522_filter_design_guide/1/ — フィルタ設計指針ハブ(IIR/FIR/Notch/Bandpass)
- https://yuhi-sa.github.io/posts/20260524_time_frequency_guide/1/ — 時間周波数解析ハブ(STFT/Wavelet/Hilbert)
- https://yuhi-sa.github.io/posts/20260525_ml_timeseries_guide/1/ — 機械学習時系列ハブ(k-means/GMM/LSTM/Kalman/IsolationForest)
5 ハブが揃った今、本記事はこれらを束ねるメタ動線として、レベル別・目的別の学習順序を示すロードマップを提供する。
1. 5大ハブの俯瞰
| ハブ | 扱う領域 | 前提知識 | 主要 API |
|---|---|---|---|
| Bode 線図 | 周波数応答・ゲイン位相・伝達関数 | 複素数、ラプラス変換初歩 | scipy.signal.bode, scipy.signal.TransferFunction, numpy.angle |
| モンテカルロ最適化 | 確率的最適化・CEM/SA/GA/MPPI | 確率の基礎、numpy 配列演算 | numpy.random, scipy.optimize, 自作 sampler |
| フィルタ設計 | IIR/FIR、Butterworth/Chebyshev/Bessel、Notch/Bandpass | 周波数領域の感覚 | scipy.signal.butter, scipy.signal.firwin, scipy.signal.iirnotch, scipy.signal.freqz, scipy.signal.lfilter |
| 時間周波数解析 | STFT/Wavelet/Hilbert/モード分解 | フィルタ設計 + Fourier | scipy.signal.stft, pywt.cwt, scipy.signal.hilbert, PyEMD.EMD, vmdpy.VMD |
| ML 時系列 | k-means/GMM/RF/GBDT/LSTM/Kalman/IsolationForest | numpy, 確率初歩 | sklearn.cluster.KMeans, sklearn.ensemble.RandomForestClassifier, keras.layers.LSTM, sklearn.ensemble.IsolationForest |
2. 学習動線図
[基礎数学]
│ 複素数・線形代数・確率
↓
[Fourier 解析] ── FFT 入門 ─┐
│ │
↓ ↓
[Bode 線図ハブ] [フィルタ設計ハブ]
│ │
└──────────┬───────────────┘
↓
[時間周波数解析ハブ]
│
↓
[ML 時系列ハブ] ← [モンテカルロ最適化ハブ]
│ (ハイパーパラメータ最適化で連携)
↓
[実務応用]
3. レベル別おすすめ進路
Level 1: 完全初心者(数学・プログラミングともに薄い)
目標: Python と numpy・matplotlib に慣れる。信号処理の用語を覚える。
- https://yuhi-sa.github.io/posts/20260223_matplotlib_tips/1/ — matplotlib の使い方
- https://yuhi-sa.github.io/posts/20210514_py_print/1/ — Python
printの使い方 - https://yuhi-sa.github.io/posts/20260225_fft/1/ — FFT 入門(
numpy.fft.fft) - https://yuhi-sa.github.io/posts/20260225_moving_average/1/ — 移動平均(SMA/WMA/EMA)
- https://yuhi-sa.github.io/posts/20220206_ema/1/ — 指数移動平均(EMA)の周波数特性
所要時間目安: 2〜4 週間。
Level 2: 数学基礎あり(線形代数・微積分の基本)
目標: 周波数応答とフィルタ設計の直観を得る。
- https://yuhi-sa.github.io/posts/20260521_bode_plot/1/ — Bode 線図ハブ
- https://yuhi-sa.github.io/posts/20260223_lowpass_filter/1/ — ローパスフィルタ
- https://yuhi-sa.github.io/posts/20260226_butterworth/1/ — Butterworth フィルタ
- https://yuhi-sa.github.io/posts/20260314_chebyshev_filter/1/ — Chebyshev フィルタ
- https://yuhi-sa.github.io/posts/20260316_bessel_filter/1/ — Bessel フィルタ
- https://yuhi-sa.github.io/posts/20260226_fir_iir/1/ — FIR と IIR の比較
- https://yuhi-sa.github.io/posts/20260522_filter_design_guide/1/ — フィルタ設計指針ハブ
所要時間目安: 4〜8 週間。
Level 3: Python 経験あり(numpy・matplotlib に慣れている)
目標: 時間周波数解析と非定常信号の扱いを習得する。
- https://yuhi-sa.github.io/posts/20260429_stft/1/ — STFT
- https://yuhi-sa.github.io/posts/20260226_wavelet/1/ — Wavelet 変換
- https://yuhi-sa.github.io/posts/20260522_wavelet_packet/1/ — Wavelet Packet 分解
- https://yuhi-sa.github.io/posts/20260318_hilbert_transform/1/ — Hilbert 変換
- https://yuhi-sa.github.io/posts/20260528_mode_decomposition/1/ — EMD/VMD/SSA モード分解
- https://yuhi-sa.github.io/posts/20260524_time_frequency_guide/1/ — 時間周波数解析ハブ
所要時間目安: 8〜12 週間。
Level 4: 実務応用志向(DSP の素地ができている)
目標: 機械学習と確率的最適化を信号処理に連携させる。
- https://yuhi-sa.github.io/posts/20260228_timeseries_anomaly/1/ — 時系列異常検知
- https://yuhi-sa.github.io/posts/20260226_kmeans_gmm/1/ — k-means / GMM
- https://yuhi-sa.github.io/posts/20260226_ensemble_learning/1/ — アンサンブル学習
- https://yuhi-sa.github.io/posts/20260317_lstm_timeseries/1/ — LSTM 時系列
- https://yuhi-sa.github.io/posts/20260525_ml_timeseries_guide/1/ — ML 時系列ハブ
- https://yuhi-sa.github.io/posts/20260223_bayesian_optimization/1/ — ベイズ最適化
- https://yuhi-sa.github.io/posts/20210329_cem/1/ — Cross Entropy Method
- https://yuhi-sa.github.io/posts/20260226_genetic_algorithm/1/ — 遺伝的アルゴリズム
- https://yuhi-sa.github.io/posts/20260215_mppi/1/ — MPPI
- https://yuhi-sa.github.io/posts/20260522_monte_carlo_optimization/1/ — モンテカルロ最適化ハブ
所要時間目安: 12〜20 週間。
4. 分野別の深掘り順序
A. 周波数応答(Bode)→ フィルタ設計
scipy.signal.TransferFunction → scipy.signal.bode → scipy.signal.butter → scipy.signal.cheby1/2 → scipy.signal.bessel → scipy.signal.iirnotch。学習所要 4〜6 週間。
B. Fourier → 時間周波数
numpy.fft.fft → scipy.signal.windows → scipy.signal.welch → scipy.signal.stft → pywt.cwt → scipy.signal.hilbert → PyEMD.EMD / vmdpy.VMD。学習所要 6〜10 週間。
C. 状態推定
https://yuhi-sa.github.io/posts/20260224_kalman_filter/1/ → https://yuhi-sa.github.io/posts/20260224_ekf/1/ → https://yuhi-sa.github.io/posts/20260226_ukf/1/ → https://yuhi-sa.github.io/posts/20260223_particle_filter/1/ → https://yuhi-sa.github.io/posts/20260223_rts_smoother/1/。学習所要 6〜8 週間。
D. ML 時系列予測
sklearn.cluster.KMeans → sklearn.mixture.GaussianMixture → sklearn.ensemble.RandomForestClassifier → sklearn.ensemble.GradientBoostingClassifier → keras.layers.LSTM → sklearn.ensemble.IsolationForest。学習所要 8〜12 週間。
E. 確率的最適化
numpy.random ベース実装 → scipy.optimize.minimize → CEM → SA → GA → MPPI → ベイズ最適化(scikit-optimize)。学習所要 6〜10 週間。
5. 横断的トピック:信号処理と機械学習の融合
- 特徴量設計: STFT 平均パワー、Wavelet エネルギー、HHT 瞬時周波数を特徴ベクトルにして RandomForest 分類
- 異常検知: Notch + STFT で前処理 → IsolationForest で異常スコア
- 時系列予測: SSA でトレンド分離 → LSTM で短期予測
- ハイパーパラメータ最適化: フィルタ設計の遮断周波数 / LSTM の隠れ層次元をベイズ最適化で探索
具体実装は各ハブの「実用例」セクション、および https://yuhi-sa.github.io/posts/20260525_ml_timeseries_guide/1/ の統合評価コードを参照。
6. 学習チェックリスト(40 項目)
数学基礎
- 複素指数関数 \(e^{j\omega t}\) の物理的意味が言える
- ラプラス変換と Fourier 変換の関係を説明できる
- 線形時不変システムの伝達関数を求められる
- Parseval の等式が書ける
- ナイキストの定理を説明できる
Bode / フィルタ設計
- 1 次ローパスのカットオフ周波数を \(-3\) dB から定義できる
- Butterworth と Chebyshev の通過域・阻止域特性を比較できる
- Bessel が群遅延平坦である理由を言える
scipy.signal.butterの出力をscipy.signal.lfilterに渡せる- IIR と FIR の安定性・線形位相特性を比較できる
- Notch フィルタの \(Q\) 値と帯域幅の関係を言える
- 双線形変換 z 変換の役割が説明できる
Fourier / 時間周波数
numpy.fft.fftの出力長と周波数軸を計算できる- 窓関数(Hann/Hamming/Blackman)のスペクトル漏れ抑制を比較できる
- PSD の単位(V²/Hz)を言える
- STFT のフレーム長 / ホップ長を信号特性から選べる
- CWT と DWT の違いを言える
- Wavelet Packet が CWT より高解像度な理由を言える
- Hilbert 変換と解析信号の関係を式で書ける
- EMD と VMD のモード混合の違いを言える
- SSA の窓長 \(L\) を周期から決められる
ML 時系列
- k-means の K を Elbow / Silhouette で決められる
- GMM の EM 更新式を書ける
- RandomForest と GBDT の違いを言える
- LSTM のゲート 3 種(input/forget/output)を説明できる
- IsolationForest の異常スコアの計算方法が言える
- 時系列の train/val/test 分割で leakage を避ける方法を知る
- Kalman フィルタの予測・更新式を書ける
- EKF と UKF のヤコビアン不要性の違いを言える
確率的最適化
- CEM の精英率(elite rate)の影響を言える
- SA の温度スケジュールを設計できる
- GA の交叉・突然変異の典型実装を書ける
- MPPI が CEM の重み付きサンプリングと類比できる
- ベイズ最適化の獲得関数(EI/PI/UCB)を比較できる
統合スキル
- センサデータ → フィルタ → 特徴量 → 分類のパイプラインを書ける
- STFT で前処理した特徴量を IsolationForest に渡せる
- SSA でトレンド除去後 LSTM 予測ができる
- ハイパーパラメータ最適化をベイズ最適化で実装できる
- matplotlib で複数サブプロットの可視化ができる
- 結果を再現可能にするため
numpy.random.seedを設定できる
7. よくある詰まりポイント Q&A
Q1. FFT の結果の周波数軸がわからない
np.fft.fftfreq(N, d=1/fs) または np.fft.rfftfreq(N, d=1/fs) で軸を生成する。サンプリング周波数 fs を必ず渡す。
Q2. フィルタが暴れる
scipy.signal.butter の正規化周波数は Nyquist=fs/2 で割った値。Wn=cutoff/(fs/2) を渡すか、scipy.signal.butter(..., fs=fs) の fs キーワードを使う。
Q3. LSTM の学習が進まない
入力スケーリング不足が最頻原因。sklearn.preprocessing.StandardScaler で平均 0 ・分散 1 にしてから学習。
Q4. STFT の窓長が選べない
周期最低 5〜10 周期入る長さに。nperseg = int(5 / target_freq * fs) を目安に試行錯誤。
Q5. EMD と VMD のどちらを使うか
モード数事前に決められる/安定性重視なら VMD、適応的に探索したいなら EMD(または EEMD)。詳細は https://yuhi-sa.github.io/posts/20260528_mode_decomposition/1/。
Q6. 異常検知で偽陽性が多い
特徴量に Hilbert 包絡線・Wavelet エネルギー・STFT バンド平均など信号の局所性を反映させる。IsolationForest の contamination パラメータの調整も有効。
Q7. ベイズ最適化の試行回数が足りない
低コスト目的関数では Grid Search が、高コストでは BO が有利。試行 50 回で頭打ちなら獲得関数を EI → UCB に切替。
8. 関連記事・参考資料
5 大ハブ:
- https://yuhi-sa.github.io/posts/20260521_bode_plot/1/ — Bode 線図ハブ
- https://yuhi-sa.github.io/posts/20260522_monte_carlo_optimization/1/ — モンテカルロ最適化ハブ
- https://yuhi-sa.github.io/posts/20260522_filter_design_guide/1/ — フィルタ設計指針ハブ
- https://yuhi-sa.github.io/posts/20260524_time_frequency_guide/1/ — 時間周波数解析ハブ
- https://yuhi-sa.github.io/posts/20260525_ml_timeseries_guide/1/ — 機械学習時系列ハブ
主要構成記事:
- https://yuhi-sa.github.io/posts/20260225_fft/1/ / https://yuhi-sa.github.io/posts/20260228_fft_window_psd/1/ / https://yuhi-sa.github.io/posts/20260429_stft/1/
- https://yuhi-sa.github.io/posts/20260226_wavelet/1/ / https://yuhi-sa.github.io/posts/20260522_wavelet_packet/1/ / https://yuhi-sa.github.io/posts/20260318_hilbert_transform/1/ / https://yuhi-sa.github.io/posts/20260528_mode_decomposition/1/
- https://yuhi-sa.github.io/posts/20260226_butterworth/1/ / https://yuhi-sa.github.io/posts/20260314_chebyshev_filter/1/ / https://yuhi-sa.github.io/posts/20260316_bessel_filter/1/ / https://yuhi-sa.github.io/posts/20260226_fir_iir/1/
- https://yuhi-sa.github.io/posts/20260228_notch_filter/1/ / https://yuhi-sa.github.io/posts/20260312_bandpass_filter/1/ / https://yuhi-sa.github.io/posts/20260313_highpass_filter/1/ / https://yuhi-sa.github.io/posts/20260223_lowpass_filter/1/
- https://yuhi-sa.github.io/posts/20260224_kalman_filter/1/ / https://yuhi-sa.github.io/posts/20260224_ekf/1/ / https://yuhi-sa.github.io/posts/20260226_ukf/1/ / https://yuhi-sa.github.io/posts/20260223_particle_filter/1/ / https://yuhi-sa.github.io/posts/20260223_rts_smoother/1/
- https://yuhi-sa.github.io/posts/20260226_kmeans_gmm/1/ / https://yuhi-sa.github.io/posts/20260226_ensemble_learning/1/ / https://yuhi-sa.github.io/posts/20260317_lstm_timeseries/1/ / https://yuhi-sa.github.io/posts/20260228_timeseries_anomaly/1/
- https://yuhi-sa.github.io/posts/20260223_bayesian_optimization/1/ / https://yuhi-sa.github.io/posts/20210329_cem/1/ / https://yuhi-sa.github.io/posts/20260226_simulated_annealing/1/ / https://yuhi-sa.github.io/posts/20260226_genetic_algorithm/1/ / https://yuhi-sa.github.io/posts/20260215_mppi/1/