Documentation

Collect Model Metrics

Collect model metric data and create custom model metrics

You can use model metrics to assess that your model and code comply with size, complexity, and readability requirements. You can also use the model metric API to create your own model metrics, compute metrics, and export metric data. To get started, see Collect Model Metrics Using the Model Advisor.

Classes

slmetric.EngineCollect metric data on models or model components
slmetric.metric.ResultMetric data for specified model component and metric algorithm
slmetric.metric.ResultCollectionMetric data for specified model metric
slmetric.metric.ResultDetail Details about instances of slmetric.metric.Result objects
Advisor.component.ComponentCreate component for metric analysis
Advisor.component.TypesCreate enum class specifying component type
slmetric.metric.MetricAbstract class for creating model metrics

Functions

metricsdashboardOpen Metrics Dashboard
slmetric.metric.getAvailableMetricsObtain available metrics
slmetric.metric.createNewMetricClassCreate new metric class for a custom model metric
slmetric.metric.registerMetricRegister a custom model metric with the model metric repository
slmetric.metric.unregisterMetricUnregister a custom model metric from the model metric repository
slmetric.metric.refreshUpdate available model metrics

Topics

Collect and Explore Metric Data by Using the Metrics Dashboard

Collect and view metric data for quality assessment.

Collect Model Metrics Using the Model Advisor

Assess model size, complexity, and readability, using the Model Advisor to run model metric checks.

Collect Model Metrics Programmatically

Use the model metric API to programmatically collect metrics for a model, such as subsystem and block counts.

Model Metrics

Model metrics provided by MathWorks that return metric data on your model for size, complexity, readability, and compliance to standards and guidelines.

Model Metric Data Aggregation

Options for defining model metric data aggregation and returning aggregated model metric results.

Create a Custom Model Metric

Create a new model metric by using the slmetric.metric.createNewMetricClass function and defining the metric algorithm.

Was this topic helpful?