Machine learning en Simulink
Aplique funcionalidades de machine learning en modelos de Simulink® usando bloques de la biblioteca de bloques Statistics and Machine Learning, incluida en Statistics and Machine Learning Toolbox™. Esta toolbox proporciona bloques para realizar los siguientes flujos de trabajo:
Importar un objeto de modelo de regresión o clasificación entrenado a Simulink usando un bloque de predicción de regresión o de predicción de clasificación.
Entrenar un modelo de machine learning en la app Classification Learner o Regression Learner y exportar el modelo a Simulink.
Utilizar bloques de aprendizaje incremental en Simulink para actualizar continuamente y monitorizar la desviación en modelos de machine learning en tiempo real.
Encontrar los vecinos más cercanos en los datos a puntos de consulta y realizar análisis de clusters en Simulink usando el bloque KNN Search.
Coejecutar modelos entrenados de machine learning de Python® entrenados en Simulink utilizando bloques de coejecución de Python.
Bloques
Temas
Clasificación
- Predict Class Labels Using ClassificationSVM Predict Block
This example shows how to use the ClassificationSVM Predict block for label prediction in Simulink®. - Predict Class Labels Using ClassificationTree Predict Block
Train a classification decision tree model using the Classification Learner app, and then use the ClassificationTree Predict block for label prediction. - Predict Class Labels Using ClassificationLinear Predict Block
This example shows how to use the ClassificationLinear Predict block for label prediction in Simulink®. (Desde R2023a) - Predict Class Labels Using ClassificationECOC Predict Block
Train an ECOC classification model, and then use the ClassificationECOC Predict block for label prediction. (Desde R2023a) - Predict Class Labels Using ClassificationEnsemble Predict Block
Train a classification ensemble model with optimal hyperparameters, and then use the ClassificationEnsemble Predict block for label prediction. - Predict Class Labels Using ClassificationNaiveBayes Predict Block
Train a naive Bayes classification model, and then use the ClassificationNaiveBayes Predict block for label prediction. (Desde R2024a) - Predict Class Labels Using ClassificationNeuralNetwork Predict Block
Train a neural network classification model, and then use the ClassificationNeuralNetwork Predict block for label prediction. - Predict Class Labels Using ClassificationKNN Predict Block
Train a nearest neighbor classification model, and then use the ClassificationKNN Predict block for label prediction. - Predict Class Labels Using ClassificationDiscriminant Predict Block
Train a discriminant analysis classification model, and then use the ClassificationDiscriminant Predict block for label prediction. (Desde R2023b) - Predict Class Labels Using ClassificationKernel Predict Block
Train a Gaussian kernel classification model, and then use the ClassificationKernel Predict block for label prediction. (Desde R2024b)
Regresión
- Predict Responses Using RegressionSVM Predict Block
Train a support vector machine (SVM) regression model using the Regression Learner app, and then use the RegressionSVM Predict block for response prediction. - Predict Responses Using RegressionTree Predict Block
This example shows how to use the RegressionTree Predict block for response prediction in Simulink®. - Predict Responses Using RegressionLinear Predict Block
This example shows how to use the RegressionLinear Predict block for response prediction in Simulink®. (Desde R2023a) - Predict Responses Using RegressionEnsemble Predict Block
Train a regression ensemble model with optimal hyperparameters, and then use the RegressionEnsemble Predict block for response prediction. - Predict Responses Using RegressionNeuralNetwork Predict Block
Train a neural network regression model, and then use the RegressionNeuralNetwork Predict block for response prediction. - Predict Responses Using RegressionGP Predict Block
Train a Gaussian process (GP) regression model, and then use the RegressionGP Predict block for response prediction. - Predict Responses Using RegressionKernel Predict Block
This example shows how to use the RegressionKernel Predict block for response prediction in Simulink®. (Desde R2024b)
Aprendizaje incremental
- Perform Incremental Learning Using IncrementalClassificationLinear Fit and Predict Blocks
Perform incremental learning with the IncrementalClassificationLinear Fit block and predict labels with the IncrementalClassificationLinear Predict block. (Desde R2023b) - Perform Incremental Learning Using IncrementalRegressionLinear Fit and Predict Blocks
Perform incremental learning with the IncrementalRegressionLinear Fit block and predict responses with the IncrementalRegressionLinear Predict block. (Desde R2023b) - Perform Incremental Learning Using IncrementalClassificationECOC Fit and Predict Blocks
Perform incremental learning with the IncrementalClassificationECOC Fit block and predict labels with the IncrementalClassificationECOC Predict block. (Desde R2024a) - Perform Incremental Learning Using IncrementalClassificationKernel Fit and Predict Blocks
Perform incremental learning with the IncrementalClassificationKernel Fit block and predict labels with the IncrementalClassificationKernel Predict block. (Desde R2024b) - Perform Incremental Learning Using IncrementalRegressionKernel Fit and Predict Blocks
Perform incremental learning with the IncrementalRegressionKernel Fit block and predict responses with the IncrementalRegressionKernel Predict block. (Desde R2024b) - Perform Incremental Learning and Track Performance Metrics Using Update Metrics Block
Perform incremental learning and track performance metrics with the Update Metrics block. (Desde R2023b) - Monitor Drift Using Detect Drift Block
This example shows how to use the Detect Drift block for monitoring drift in a data stream in Simulink®. (Desde R2024b) - In-Place Model Update of Offline Linear Model Using IncrementalClassificationLinear Predict Block
Perform in-place model update without regenerating deployed code. (Desde R2025a)
Plantillas de aprendizaje incremental
- Configure Simulink Template for Conditionally Enabled Incremental Linear Classification
Configure the Simulink Enabled Execution Incremental Learning template to perform incremental linear classification. (Desde R2024a) - Configure Simulink Template for Conditionally Enabled Incremental Linear Regression
Configure the Simulink Enabled Execution Incremental Learning template to perform incremental linear regression. (Desde R2024a) - Configure Simulink Template for Rate-Based Incremental Linear Classification
Configure the Simulink Rate-Based Incremental Learning template to perform incremental linear classification. (Desde R2024a) - Configure Simulink Template for Rate-Based Incremental Linear Regression
Configure the Simulink Rate-Based Incremental Learning template to perform incremental linear regression. (Desde R2024a) - Configure Simulink Template for Drift-Aware Incremental Learning
Configure the Drift-Aware Training for Incremental Learning template to perform drift-aware learning. (Desde R2025a)
Análisis de clusters y detección de anomalías
- Find Nearest Neighbors Using KNN Search Block
Train a nearest neighbor searcher model, and then use the KNN Search block for label prediction. (Desde R2023b)
Coejecución de Python
- Predict Cluster Assignments Using Python Scikit-learn Model Predict Block
This example shows how to use the Scikit-learn Model Predict block for prediction in Simulink®. - Predict Responses Using Custom Python Model in Simulink
This example shows how to use the Custom Python Model Predict block for prediction in Simulink®.
Exportar modelos de apps Learner a Simulink
- Export Classification Model to Make Predictions in Simulink
Train a model in Classification Learner, and then export the model to Simulink. - Export Regression Model to Make Predictions in Simulink
Train a model in Regression Learner, and then export the model to Simulink.
Generación de código
- System Objects for Classification and Code Generation
Generate code from a System object™ for making predictions using a trained classification model, and use the System object in a Simulink model. - Predict Class Labels Using MATLAB Function Block
Generate code from a Simulink model that classifies data using an SVM model. - Predict Class Labels Using Stateflow
Generate code from a Stateflow® model that classifies data using a discriminant analysis classifier.
Información relacionada
- Deep learning con Simulink (Deep Learning Toolbox)



