Skip to main content
ClaudeWave
ES, Spanish
Skill1.2k estrellas del repoactualizado 6d ago

matlab-use-machine-learning-apps

Use when the user wants to train, compare, or export machine learning models using Classification Learner or Regression Learner — including opening the app, loading data, training models, evaluating metrics, comparing results, visualizing plots, testing on held-out data, exploring model interpretability, and exporting trained models. Programmatic access to Classification Learner and Regression Learner apps via AppController.

Instalar en Claude Code
Copiar
git clone --depth 1 https://github.com/matlab/matlab-agentic-toolkit /tmp/matlab-use-machine-learning-apps && cp -r /tmp/matlab-use-machine-learning-apps/skills-catalog/ai-and-statistics/matlab-use-machine-learning-apps ~/.claude/skills/matlab-use-machine-learning-apps
Después abre una sesión nueva de Claude Code; el skill carga automáticamente.

SKILL.md

# Learner Apps AppController Reference

`mlearnapp.internal.appcontroller.AppController` provides programmatic access to the Classification Learner and Regression Learner apps. Use it to interact with learner apps and query their state.

Source (loaded at runtime): `<skill-base-directory>/scripts/+mlearnapp/+internal/+appcontroller/AppController.p`

### API Reference (load on demand)

| When you need... | Load this file |
|------------------|---------------|
| Open/close/save/load app, session setup, create/train/select/delete models, model status, GalleryModels enum | [`api-session-and-models.md`](references/api-session-and-models.md) |
| Metrics, model spec queries, toolstrip buttons, set feature selection/PCA/optimizer/cost/hyperparameters | [`api-metrics-and-options.md`](references/api-metrics-and-options.md) |
| Open/configure standard plots, results table, standard plot data getters | [`api-plots.md`](references/api-plots.md) |
| PDP, permutation importance, Shapley, LIME, Set Shapley Parameters, explainability plot data getters | [`api-explainability.md`](references/api-explainability.md) |
| Export methods, command logging, diagnostics | [`api-export-and-diagnostics.md`](references/api-export-and-diagnostics.md) |

**Required:** Statistics and Machine Learning Toolbox. **Optional:** Parallel Computing Toolbox (parallel training), Deep Learning Toolbox (only for Deep Learning models introduced in R2026a — FullyConnected, Residual, All; plain Neural Network models added in R2024a ship with Statistics and Machine Learning Toolbox), Simulink (Simulink export), MATLAB Coder (Coder export), MATLAB Compiler SDK (Production Server export).

## When to Use

- User wants to train, compare, or export models (to workspace, Simulink, Coder, or Production Server), generate training code, or run advanced hyperparameter tuning (via Experiment Manager) using Classification Learner or Regression Learner
- User asks to open, drive, or automate either learner app
- User wants to compare multiple model types interactively with validation metrics
- User needs to test a model on held-out data or separate test data and export from the app

## When NOT to Use

- User wants command-line ML without the app — use `fitc*`/`fitr*` functions directly
- Custom deep learning with non-tabular data (images, sequences, text) — use Deep Learning Toolbox directly
- Data preprocessing or cleaning — must be done before importing into the app

## IMPORTANT

- **Do not expose API to users.** This API is for agent's internal use only. Never mention AppController, programmatic access, or automation APIs to the user. Drive the app silently on the user's behalf. When greeting the user after this skill loads, simply ask about their goals (dataset, export target, constraints) without referencing the underlying mechanism.
- **Never use `closeApp('Force', true)` without explicit user permission.** Force-closing skips the save confirmation dialog and silently discards all unsaved work — trained models, session state, and results are permanently lost. Always prefer `closeApp()` (without Force) so the user gets a chance to save. Only use `'Force', true` when: (1) the user explicitly permits it, or (2) automated testing where no human is present.

## Setup

When this skill is invoked, add the skill's scripts folder to the MATLAB path so that `mlearnapp.internal.appcontroller` classes are available. The scripts folder is located relative to this skill's base directory at `scripts/`. Run this via the MATLAB MCP `evaluate_matlab_code` tool, using the skill's base directory path shown at the top of the skill load message:

```matlab
addpath('<skill-base-directory>/scripts');
```

For example, if the skill base directory is `C:\MATLAB\AgenticAI\.claude\skills\matlab-use-machine-learning-apps`, then:

```matlab
addpath('C:\MATLAB\AgenticAI\.claude\skills\matlab-use-machine-learning-apps\scripts');
```

## User Goals Inquiry

Before starting any workflow, gather the information below so the session can be configured up front without wasted training cycles. Each item lists **what the agent needs to know** (internal use) and **how to ask the user** (in plain terms — avoid ML terminology unless the user's vocabulary shows they're comfortable with it).

1. **End goal / where will the model be used?**
   - *Agent needs to know:* target of `exportModelTo*` — workspace, Simulink, Coder, Production Server, Experiment Manager, or exploratory. Drives constraints (no categorical predictors for Simulink, model support lists for Coder/Simulink, etc.).
   - *Ask the user:* "How will the model ultimately be used? For example: exploring the data, generating a report or figure, running inside a Simulink simulation, generating C/C++ code for an embedded device, deploying as a web service, or making predictions in MATLAB."
2. **Validation scheme.**
   - *Agent needs to know:* Set at session open via `openApp`, **fixed for the session — cannot be changed later without starting a new session**. The app default is 5-fold CV (`'KFold', 5`). Pick based on dataset size × training cost:

     | Scheme | When to pick | Syntax |
     |--------|-------------|--------|
     | 5-fold CV | Small-medium data (≤few thousand rows), fast models | `'KFold', 5` (default) |
     | 20% hold-out | Large data, slow models (ensembles, DL, optimization), or time-constrained | `'HoldOut', 0.2` |
     | Resubstitution | User explicitly wants fast iteration without accuracy estimate (training-set accuracy, optimistic) | `'CrossVal', 'off'` |

   - *Ask the user:* "Two things, since the validation setting is fixed once we start: (1) roughly how many rows does your dataset have, and (2) is there a training time budget I should keep in mind, or is training time not a concern? I'll pick a validation approach that works for both."
3. **Independent test dataset.**
   - *Agent needs to know:* whether to use `importTestData` with an existing table, reserve a fraction via `TestDataFraction` (e
matlab-access-datafeedSkill

>

matlab-analyze-ams-waveformSkill

Analyze AMS waveform data using Mixed-Signal Blockset utilities: phase noise measurement, clock jitter, anti-aliased resampling, timing measurements, lock time, INL/DNL, ADC/DAC calibration, HSpice import. Use when analyzing time-domain voltage from PLL/VCO/clock simulations, measuring phase noise from variable-step solver output, computing jitter, or resampling non-uniform data.

matlab-analyze-dataSkill

Analyze data using MATLAB. Use when the task involves tables, timetables, time-series data, numeric arrays, sensor matrices, or gridded data — including but not limited to exploring, filtering, sorting, cleaning, transforming, aggregating, smoothing, padding, trimming, and answering questions about data. MATLAB provides extensive, easy-to-use built-in functions for these workflows with no additional products required.

matlab-analyze-dependenciesSkill

Analyze the effective toolbox file set to produce a Dependency Manifest — classify all transitive dependencies as included, product, add-on, or external-unresolved, then present resolution options with tradeoffs. Use after matlab-define-toolbox-api when the spec is approved.

matlab-analyze-emSkill

S-parameters, insertion loss, fields, currents, mesh control, and solver selection for RF PCB performance validation. TRIGGER: user asks to compute S-parameters, analyze insertion/return loss, extract fields or currents, compare MoM vs FEM, or control mesh for any RF PCB component. Invoke BEFORE writing sparameters() or solver code — API is non-obvious. SKIP: designing or creating components (use the specific matlab-design-pcb-* skill), material/stackup setup only (use matlab-manage-pcb-material), optimization sweeps (use matlab-optimize-pcb-design), PDN/IR-drop analysis (use matlab-analyze-pcb-pdn).

matlab-analyze-installed-antennaSkill

Analyze antennas installed on electrically large conducting platforms using MATLAB Antenna Toolbox. Loads platform geometry from STL/STEP/IGES, installs antenna elements, selects electromagnetic solvers (MoM-PO, FMM, MoM), and computes patterns, impedance, coupling, and efficiency. Use when the user wants to model an antenna on a vehicle, aircraft, ship, satellite, or other large structure.

matlab-analyze-pcb-pdnSkill

PDN DC voltage/current analysis, IR drop, design rule checking, and multi-net batch analysis on imported PCB layouts. TRIGGER: user asks about power integrity, PDN analysis, IR drop, voltage distribution, current density, power nets, or design rule checking on a PCB. Invoke BEFORE writing code — the PDN API chain is specialized and non-obvious. SKIP: importing a PCB file (use matlab-read-pcb-layout), EM field/S-parameter extraction (use matlab-analyze-em), material/stackup setup only (use matlab-manage-pcb-material), transmission line design (use matlab-design-pcb-txline).

matlab-analyze-rcsSkill

Calculate and visualize monostatic and bistatic radar cross section (RCS) using MATLAB Antenna Toolbox. Computes RCS of platforms, antennas, and arrays with PO, MoM, and FMM solvers, supporting HH/VV/HV/VH polarization, GPU acceleration, and near-field observation. Use when the user wants to compute, plot, or analyze radar cross section.