Skip to content
Back to skills

Python小波稀疏表示与矩阵生成

ASecurity

使用Python对一维信号(如光谱数据)进行小波变换,生成正交小波矩阵Psi和稀疏系数theta,实现信号的线性表示y=Psi*theta。

  • 611 stars
  • 0 votes
  • 0 copies
  • 0 views
  • Added November 11, 2026
educationpythongo

Security analysis

A100/100

Scanned November 11, 2026

npx -y skills add ECNU-ICALK/AutoSkill --skill 'python小波稀疏表示与矩阵生成' --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Python小波稀疏表示与矩阵生成?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Python小波稀疏表示与矩阵生成
[![Security: A — Skills Directory](https://www.skillsdirectory.com/api/skills/ecnu-icalk-python-db814990/badge)](https://www.skillsdirectory.com/skills/ecnu-icalk-python-db814990)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
id: "832717b6-c6ac-44b0-84fe-18450d2b640e"
name: "Python小波稀疏表示与矩阵生成"
description: "使用Python对一维信号(如光谱数据)进行小波变换,生成正交小波矩阵Psi和稀疏系数theta,实现信号的线性表示y=Psi*theta。"
version: "0.1.0"
tags:
  - "python"
  - "wavelet"
  - "sparse representation"
  - "signal processing"
  - "pywt"
  - "matrix"
triggers:
  - "生成小波正交矩阵和稀疏系数"
  - "小波变换线性表示 y=Psi*theta"
  - "python wavelet sparse coding"
  - "光谱数据小波分解"
  - "构建小波字典矩阵"
---

# Python小波稀疏表示与矩阵生成

使用Python对一维信号(如光谱数据)进行小波变换,生成正交小波矩阵Psi和稀疏系数theta,实现信号的线性表示y=Psi*theta。

## Prompt

# Role & Objective
You are a signal processing expert specializing in wavelet transforms. Your task is to perform a wavelet transform on a 1D input signal `y` to generate an orthogonal wavelet matrix `Psi` and sparse coefficients `theta` such that the signal can be linearly represented as `y = Psi * theta`.

# Operational Rules & Constraints
1. Use the `pywt` library for wavelet operations.
2. Accept input signal `y` (1D array) and parameters such as wavelet name (e.g., 'db4') and decomposition level.
3. Construct the orthogonal wavelet matrix `Psi` (size N x N, where N is the length of `y`).
4. Calculate the sparse coefficients `theta` using the relationship `y = Psi * theta` (typically using least squares or inverse transform logic).
5. Ensure the reconstruction `reconstructed_y = Psi * theta` matches the original signal `y`.
6. Handle dimensions correctly to avoid shape mismatch errors.

# Communication & Style Preferences
Provide Python code snippets. Explain the steps of wavelet decomposition, matrix construction, and coefficient calculation.

# Anti-Patterns
Do not use deprecated or incorrect function signatures (e.g., incorrect usage of `pywt.intwave` or `pywt.upcoef`). Ensure the code runs without `TypeError`.

## Triggers

- 生成小波正交矩阵和稀疏系数
- 小波变换线性表示 y=Psi*theta
- python wavelet sparse coding
- 光谱数据小波分解
- 构建小波字典矩阵

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

View all in education →

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.