Logo Matlab Data Analysis

Matlab Data Analysis

Cộng đồng
wzyn20051216
matlab-data-analysis

MATLAB data analysis workflow for tables, timetables, numerical verification, ODE solving, statistics, fitting, uncertainty, error propagation, and reproducible experiments. Use whenever the user asks MATLAB to analyze data, integrate or differentiate numerically, solve or verify ODE solutions, solve or check linear systems, assess convergence and conditioning, clean tables with missing/outlier accounting, fit models, test significance, propagate uncertainty, or reproduce figures and numbers.

Tổng quan

Nhà phát hànhwzyn20051216
Kho mãmatlab-agent-skills
Tên kỹ năngmatlab-data-analysis
Sao
32
Bản fork
1
Tệp đi kèm
14
Giấy phépMIT
Liên kết
  • Hướng dẫn bằng Markdown

    Tệp SKILL.md được mô hình tải khi cần, nên chỉ tốn token khi có yêu cầu thực sự phù hợp.

  • Dùng được với mọi LLM

    Kỹ năng AI dùng hướng dẫn viết bằng Markdown thay vì mã dành riêng cho một nhà cung cấp, nên dùng được với GPT, Claude, Gemini, Grok hoặc mô hình cục bộ.

  • 14 tệp đi kèm

    Các tập lệnh, mẫu và tài liệu tham khảo mà mô hình có thể đọc khi làm việc. Các tệp chỉ cho phép đọc và không bao giờ được thực thi.

  • Mã nguồn mở

    Được wzyn20051216 công bố trên GitHub. Hãy đọc các tệp nguồn trước khi cài đặt.

Cài đặt

Cài đặt kỹ năng AI Matlab Data Analysis trong TypingMind để dùng với bất kỳ LLM nào, hoặc thêm vào một tác nhân AI khác có thể đọc SKILL.md.

1

Cài đặt trong TypingMind

TypingMind cài đặt kỹ năng trực tiếp từ thư mục GitHub — đọc SKILL.md, đóng gói các tệp tài nguyên và lưu kết quả trên máy.

  1. Mở ứng dụng và vào Plugin → Kỹ năng.
  2. Chọn "Cài đặt từ GitHub".
  3. Dán URL của thư mục kỹ năng được hiển thị bên dưới rồi xác nhận.
    https://github.com/wzyn20051216/matlab-agent-skills/tree/main/skills/matlab-data-analysis
  4. Bật kỹ năng trong từng cuộc trò chuyện mà bạn muốn sử dụng kỹ năng đó.
Plugin → Kỹ năng → Thêm kỹ năng → Từ URL GitHub, sau đó dán URL thư mục và nhấn Tiếp tục.
2

Cài đặt trong tác nhân AI khác

Bất kỳ tác nhân AI nào đọc được định dạng Agent Skills đều có thể dùng kỹ năng này — hãy sao chép thư mục vào thư mục kỹ năng của tác nhân AI đó.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/wzyn20051216/matlab-agent-skills.git /tmp/matlab-agent-skills
mkdir -p .claude/skills
cp -r /tmp/matlab-agent-skills/skills/matlab-data-analysis .claude/skills/matlab-data-analysis
Khởi động lại Claude Code sau khi sao chép để ứng dụng nhận kỹ năng mới.

Sử dụng trong TypingMind

Bật Matlab Data Analysis trong bất kỳ cuộc trò chuyện nào trên TypingMind, mô hình sẽ tự xử lý phần còn lại. Tên và mô tả của kỹ năng nằm trong prompt hệ thống. Ngay khi có yêu cầu phù hợp, mô hình tự tải toàn bộ hướng dẫn — bạn không cần gọi thủ công và kỹ năng không tốn token cho đến khi thực sự được dùng.

Mô hình tự nạp Matlab Data Analysis ngay khi có yêu cầu phù hợp.

Dùng được với mọi mô hình AI

Kỹ năng AI là các hướng dẫn Markdown thuần túy, không phải mã dành riêng cho một nhà cung cấp, nên bạn có thể dùng Matlab Data Analysis với cả những mô hình khác ngoài mô hình ban đầu. Chỉ cần cài đặt một lần trong TypingMind rồi dùng với GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama hoặc mô hình cục bộ do bạn tự chạy — tất cả đều dùng khóa API của riêng bạn.

  • Chỉ tải khi cần

    Prompt hệ thống chỉ chứa tên và mô tả. Hướng dẫn được tải khi có yêu cầu phù hợp đầu tiên, nên khi kỹ năng chưa được dùng, bạn không tốn token cho phần hướng dẫn.

  • Đổi mô hình ngay trong cuộc trò chuyện

    Vì kỹ năng là hướng dẫn chứ không phải mã, việc đổi mô hình không làm kỹ năng ngừng hoạt động — mô hình tiếp theo vẫn đọc cùng tệp SKILL.md.

Hướng dẫn của kỹ năng

Đây là nội dung SKILL.md mà mô hình tải. Hãy đọc trước khi cài đặt — kỹ năng là những hướng dẫn mà mô hình của bạn sẽ làm theo.

MATLAB Data Analysis

Use this skill when the deliverable is a validated number: an integral, a solution vector, a fit, a p-value, an uncertainty, or a figure whose axis is backed by arithmetic. The plot is never the evidence.

Skill Root

The installed directory containing this SKILL.md is the resource root. Add its helper folder for the current MATLAB session only — never through savepath, startup.m, or a global path edit:

matlab
skillRoot = '<absolute path to the installed matlab-data-analysis Skill directory>';
addpath(fullfile(skillRoot, 'scripts'));

Resolve references/, tests/, and helper calls from that root, not from the caller's working directory. If a shipped helper or reference is missing, report the exact path and reinstall the Skill; do not scan the disk for a substitute.

Workflow

  1. 任务识别 — State the quantity, its units, the tolerance that makes it acceptable, and what independent source could contradict it. A claim without a tolerance has no PASS.
  2. 能力选择 — r = mas_route(prompt); confirm this skill is primary, then read the matching tool contract below instead of the whole toolbox.
  3. 环境检查 — mas_precheck before toolbox-only APIs (fitlm, Statistics Toolbox). Missing toolbox degrades the method explicitly; it never silently swaps the method.
  4. MATLAB 执行 — build a small reproducible subset first; save intermediate arrays so a failing check can be inspected rather than guessed.
  5. 独立验收 — grade with the tools below. Every accepted number needs a second route: closed form, hand algebra, a different factorization, resampling, or Monte Carlo.
  6. 错误恢复 — a fail/UNDETERMINED is fixed for the named reason (add tolerance, improve the reference, raise precision, extend the record) and re-run; it is never skipped or relabelled.
  7. 结果交付 — report value, tolerance, condition/uncertainty, and verdict. SKIP/BLOCKED stays SKIP/BLOCKED.

Verification tools

matlab
q = mas_quad_check(@(x) 4./(1+x.^2), 0, 1, struct('value',pi,'tolRel',1e-8, ...
        'method','simpson','n',32,'derivAt',0.5,'derivValue',-2.56));
q.verdict  q.valueErr  q.orders  q.refGap  q.floorI

L = mas_linsolve_check(A, x, b, struct('tolRel',1e-10));
L.verdict  L.backwardError  L.errorBound  L.cond  L.rank  L.routeDiff

c = mas_converge_check(hist, struct('tolFinal',1e-10,'order',2,'rate',0.5));
c.verdict  c.observed.order  c.observed.rate  c.observed.final

r = mas_fit_check(X, y, beta, struct('tolRel',1e-8,'r2',0.98, ...
        'se',se,'holdout',struct('X',Xh,'y',yh)));
r.verdict  r.r2  r.rmse  r.ci  r.betaRef  r.condX

s = mas_stat_check(x, struct('mu0',5,'alpha',0.05,'tail','two-sided'));
s = mas_stat_check(x1, x2, struct('claimDiff',0));          % Welch
s.verdict  s.p  s.ci  s.decision  s.pResample  s.methodAgreement

u = mas_uncert_check(@(p) p(1).*p(2).^2, [2;3], [0.02;0.03], ...
        struct('value',18,'sigma',0.36,'sigmaTolRel',0.05));
u.verdict  u.sigmaLin  u.sigmaMC  u.mcSE  u.sensitivity  u.jacobianMethod

p = mas_repro_check(@() myExperiment(), struct('seed',20261021,'tol',0));
p.verdict  p.sameSeed  p.seedEffect  p.digest  p.diffSameSeed

o = mas_ode_check(@(t,y) [y(2);-y(1)], [0 2*pi], [1;0], struct( ...
        'reference', @(t) [cos(t);-sin(t)], 'refTolRel', 1e-8, ...
        'invariant', @(t,y) y(1)^2+y(2)^2, 'invTolRel', 1e-8, ...
        'finalValue', [1;0], 'finalTolRel', 1e-8));
o.verdict  o.levels  o.error.maxScaled  o.invariant.maxRelDrift  o.stiffness.classified

One error, three denominators: never quote a scaled error without its rule

o.schema is mas-ode-report/2. The report splits the difference to the reference into three quantities that differ by orders of magnitude and are not interchangeable:

fieldnumerator / denominatormeaning
error.maxAbsmax abs(y_candidate - y_reference)raw error in state units
error.maxScaledmaxAbs / max(1, max abs(y_reference))fraction of the solution magnitude; this is what refTolRel grades and what an answer key means by "scaled error"
error.maxSolverScaledmaxAbs / (AbsTol + RelTol*abs(y_reference)), elementwisehow many solver tolerances the error is; a diagnosis of the solver settings, never an accuracy verdict
error.maxRelelementwise abs error / max(abs(y_reference), eps)per-component relative error; blows up at a zero crossing of an otherwise perfect oscillator

Each carries numeratorRule, denominatorRule, unit and the aggregation (error.at, error.component, error.rows, error.components), so a number cannot be separated from the definition that produced it. When no reference exists the fields are emitted as NaN rather than omitted.

A graded claim must name its convention. Comparing a solver-tolerance-scaled number against a magnitude-scaled key fails a correct answer: Phase 5.5's H54-ODE-N episode reported 2.66 (solver convention) against a key of 3.3e-10 (magnitude convention) and was graded MISS although both numbers were computed correctly.

Every tool returns verdict (PASS | FAIL | UNDETERMINED) and per-check status (pass | fail | na | undetermined). na = the contract does not apply and does not drag the verdict; undetermined = missing evidence or missing criterion and forces UNDETERMINED. No acceptance criterion, no PASS.

Boundary rules these tools encode

  • A claimed integral tolerance below the double-precision floor of the quadrature is undetermined, not a lucky PASS; two reference routes must agree before the reference is used at all.
  • Measured order comes from halving n, not from the method's name: Simpson on a kink measures order 0 and FAILS, while a smooth integrand may measure above nominal because the leading error term cancels — the check is one-sided on purpose.
  • Backward error (||b-Ax||/(||A|| ||x||+||b||)) and forward error (kappa*eta) are different claims. hilb(12) has a residual at the roundoff floor and no certifiable digits; the tool says UNDETERMINED.
  • Once an iteration reaches 100*eps*max(1,e1), order estimates are noise. Fewer than three clean estimates give UNDETERMINED, not a fabricated order.
  • A row that qualifies for two cleaning rules is counted once, by the first rule; the ledger must satisfy nRowsIn == nRowsOut + nDropped, or the audit is wrong even when the totals look plausible.
  • n <= p means no residual degrees of freedom: sigma, standard errors and CIs are undetermined, not zero. Rank deficiency means the parameters are not identifiable.
  • At kappa^2*eps >= 1 the QR and normal-equation coefficient routes can differ by more than 100 %, so their agreement proves nothing — UNDETERMINED, not a clamped PASS.
  • A t-test and its resampling counterpart must agree on the decision before significance is claimed; a skewed sample where they disagree is UNDETERMINED by design.
  • Complex-step differentiation is verified against central differences; analytical functions use complex step, abs-like functions fall back and say so. Linear propagation that disagrees with Monte Carlo beyond sigmaTolRel FAILS.
  • Same-seed runs must agree bitwise; an asserted seed dependence that does not appear is a FAIL, and the caller's RNG stream must be restored.
  • ode45 exit flag 0 is one level (solverExit), never a PASS. A solution is graded on separate levels — convergence under refinement, error to an independent reference, conserved quantity, stated final state/event — and a run with no acceptance criterion is UNDETERMINED even when the solver is happy.
  • Stiffness comes from the Jacobian eigenvalue ratio (step ratio only corroborates), not from the solver's name. A coarse explicit step over a fast decay exits successfully with finite, wrong numbers; errorTol catches it at 1e-4.
  • An analytic reference is cross-checked against a tight ode15s solve before it is used; if the two disagree the tool refuses to grade instead of picking a number.
  • Non-numeric table columns are preserved and reported, never silently converted.

Full formulas, worked numbers and negative controls: references/data-verification-contract.md.

Cleaning that accounts for every row — mas_table_audit

matlab
r = mas_table_audit(T, struct('missing','drop','duplicates','drop', ...
    'outliers', struct('method','iqr','factor',1.5,'action','remove')));
r.balanced    % nRowsIn == nRowsOut + nDropped, each row judged exactly once
r.audit       % per rule: before, after, dropped, filled
r.dropped     % removed rows WITH the rule that removed each one

Rule order is part of the contract (missing -> duplicates -> outliers) and is printed, because changing it changes the counts. Fill must drop nothing and report nFilled; an empty table is balanced at zero and a non-table is an error. Tests: tests/test_table_audit.m (11/11).

Legacy toolbox APIs

  • Tables: readtable, readtimetable, groupsummary, rowfun, varfun, synchronize, retime.
  • Fits: fitlm, fitnlm, fitrgp, fitcsvm only after mas_precheck.
  • Constrained fitting: optimproblem / solver APIs when regression is not enough.
  • Export figures with explicit size, resolution and format.

Reproducible experiments

Record the seed, the split policy, the data provenance (file hash or URL), the MATLAB version, and the tolerance used for acceptance. mas_repro_check produces the digest and the same-seed/other-seed differences; cite them in the delivery instead of saying "results are reproducible".

Validation outside the tools

matlab
assert(height(T) > 0)
assert(all(isfinite(metrics.rmse)))
assert(abs(integralValue - pi) < 1e-8)

These are smoke checks. They complement the contract tools; they do not replace them.

Tests: tests/test_data_contract.m (118/118), tests/test_ode_contract.m (56/56) and tests/test_table_audit.m (11/11). Every expected value comes from hand algebra, a closed form, a second numerical route, or MATLAB's independent implementation — never from the code under test.

Tệp đi kèm

Khi kỹ năng đã được tải, mô hình có thể đọc các tệp này nếu cần. Các tệp này chỉ dùng để đọc và không bao giờ được thực thi.

Câu hỏi thường gặp

Kỹ năng AI Matlab Data Analysis làm được gì?

MATLAB data analysis workflow for tables, timetables, numerical verification, ODE solving, statistics, fitting, uncertainty, error propagation, and reproducible experiments. Use whenever the user asks MATLAB to analyze data, integrate or differentiate numerically, solve or verify ODE solutions, solve or check linear systems, assess convergence and conditioning, clean tables with missing/outlier accounting, fit models, test significance, propagate uncertainty, or reproduce figures and numbers.

Vì sao nên dùng Matlab Data Analysis trên TypingMind?

Vì bạn chỉ cần cài một lần rồi dùng với bất kỳ mô hình nào. Matlab Data Analysis là nội dung Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên cùng một kỹ năng có thể chạy trên GPT-5, Claude, Gemini, Grok hoặc mô hình trên thiết bị — và bạn có thể đổi mô hình ngay trong cuộc trò chuyện mà kỹ năng vẫn hoạt động. TypingMind dùng khóa API riêng của bạn, nên bạn thanh toán trực tiếp cho nhà cung cấp thay vì trả phí thuê bao theo suất người dùng, đồng thời kỹ năng và các cuộc trò chuyện vẫn nằm trong bộ lưu trữ của bạn.

Làm thế nào để cài Matlab Data Analysis trong TypingMind?

Mở Plugin → Kỹ năng → Cài đặt từ GitHub trong TypingMind rồi dán https://github.com/wzyn20051216/matlab-agent-skills/tree/main/skills/matlab-data-analysis. TypingMind đọc tệp SKILL.md, đóng gói các tệp đi kèm rồi cài đặt cả gói dưới dạng một kỹ năng mà bạn có thể bật cho từng cuộc trò chuyện.

Những mô hình AI nào có thể dùng Matlab Data Analysis?

Bất kỳ mô hình nào bạn kết nối trong TypingMind. Kỹ năng AI là các hướng dẫn bằng Markdown chứ không phải mã dành riêng cho từng nhà cung cấp, nên GPT, Claude, Gemini, Grok và các mô hình chạy trên thiết bị đều có thể tải kỹ năng này khi có yêu cầu phù hợp.

Có thể dùng Matlab Data Analysis với bao nhiêu mô hình AI?

Bao nhiêu cũng được. Miễn là mô hình hỗ trợ kỹ năng, bạn có thể dùng Matlab Data Analysis với mô hình đó — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama và nhiều mô hình khác — tất cả đều trên TypingMind với khóa API riêng của bạn.

Kỹ năng AI Matlab Data Analysis có miễn phí không?

Có. Kỹ năng này được wzyn20051216 phát hành trên GitHub theo giấy phép MIT. Bạn chỉ trả tiền cho nhà cung cấp AI của mình theo số token đã dùng.

Kỹ năng AI là gì?

Kỹ năng AI là một gói hướng dẫn có thể tái sử dụng, chỉ cho mô hình AI cách thực hiện một tác vụ cụ thể. Kỹ năng tuân theo định dạng mở Agent Skills: một tệp SKILL.md chứa tên và mô tả, cùng các tập lệnh, mẫu hoặc tệp tham khảo mà mô hình có thể cần. Mô hình chỉ đọc hướng dẫn khi yêu cầu của bạn phù hợp với kỹ năng, nên kỹ năng đã cài đặt không phát sinh chi phí cho đến khi được sử dụng.

Kỹ năng AI khác gì với plugin hoặc máy chủ MCP?

Plugin hoặc máy chủ MCP cung cấp các công cụ mới mà mô hình có thể gọi. Khi mô hình gọi một công cụ, mã của công cụ đó chạy ở đâu đó và trả về kết quả. Còn kỹ năng AI cung cấp kiến thức và quy trình: cách tiếp cận tác vụ, các bước cần thực hiện và những tiêu chí mà kết quả cần đáp ứng. Kỹ năng chỉ là nội dung Markdown, nên không cần máy chủ, khóa API hay môi trường thực thi và hoạt động với mọi mô hình.

Xem tất cả

Tạo ngay không gian làm việc AI riêng

Đăng ký bản tin của chúng tôi để nhận thông báo về tính năng mới và các đợt tặng quà sắp tới 👇