compare
Compare test data to historical data ensemble for similarity models
Description
compare(___,
specifies plotting options using one or more name-value pair arguments.Name,Value
)
Examples
Load training data.
load('pairwiseTrainTables.mat')
The training data is a cell array of tables. Each table is a degradation feature profile for a component.
Create and train a pairwise similarity model.
mdl = pairwiseSimilarityModel; fit(mdl,pairwiseTrainTables,"Time","Condition")
Load testing data.
load('pairwiseTestData.mat')
Compare the degradation profile of the test data to the profiles of the historical data ensemble.
compare(mdl,pairwiseTestData)
Load training data.
load('pairwiseTrainTables.mat')
The training data is a cell array of tables. Each table is a degradation feature profile for a component.
Create and train a pairwise similarity model.
mdl = pairwiseSimilarityModel; fit(mdl,pairwiseTrainTables,"Time","Condition")
Load testing data.
load('pairwiseTestData.mat')
Compare the degradation profile of the test data to the profiles of the 10
most similar members of the historical data ensemble.
compare(mdl,pairwiseTestData,'NumNearestNeighbors',10)
Input Arguments
Similarity RUL model, specified as a
hashSimilarityModel
object, a
pairwiseSimilarityModel
object, or a
residualSimilarityModel
object. The model must be
fitted using fit
before calling compare
.
Degradation feature profiles for estimating the RUL of similarity models, measured over the life span of a component up to the current life time, specified as one of the following:
N-by-(Mi+1) arrays, where N is the number of feature measurements (at different usage times) and Mi is the number of features. The first column contains the usage times and the remaining columns contain the corresponding measurements for degradation features. The order of the features must match the order specified in the
DataVariables
property ofmdl
.table
ortimetable
object — The table must contain variables with names that match the strings in theDataVariables
andLifeTimeVariable
properties ofmdl
.
Name-Value Arguments
Specify optional pairs of arguments as
Name1=Value1,...,NameN=ValueN
, where Name
is
the argument name and Value
is the corresponding value.
Name-value arguments must appear after other arguments, but the order of the
pairs does not matter.
Before R2021a, use commas to separate each name and value, and enclose
Name
in quotes.
Example: 'NumNearestNeighbors','10'
plots ten similar data
sets
Number of nearest neighbors, specified as the comma-separated pair
'NumNearestNeighbors'
and either
Inf
or a finite positive integer. Use this option
to select the number of most similar data sets to plot by overriding the
NumNearestNeighbors
property. If
NumNearestNeighbors
is Inf
,
then compare
plots the degradation data for all the
ensemble data sets.
Degradation data bounds, specified as the comma-separated pair
'Threshold'
and a two-column array with
N rows, where N is the number
of data variables used by mdl
. The first column of
Threshold
contains the lower bounds for the
variables, and the second column contains the upper bounds. The bounds
are rendered as yellow-colored patches.
To disable the bounds for a given variable, specify the lower and
upper bounds as -Inf
and Inf
,
respectively.
Figure or axes on which to draw plot, specified as a figure handle or a plot handle. Use this argument especially when you are plotting multiple variables and want to control where the function plots them.
You cannot specify Parent
as an axes handle when
there are multiple variables that need multiple axes.
Version History
Introduced in R2018a
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Sélectionner un site web
Choisissez un site web pour accéder au contenu traduit dans votre langue (lorsqu'il est disponible) et voir les événements et les offres locales. D’après votre position, nous vous recommandons de sélectionner la région suivante : .
Vous pouvez également sélectionner un site web dans la liste suivante :
Comment optimiser les performances du site
Pour optimiser les performances du site, sélectionnez la région Chine (en chinois ou en anglais). Les sites de MathWorks pour les autres pays ne sont pas optimisés pour les visites provenant de votre région.
Amériques
- América Latina (Español)
- Canada (English)
- United States (English)
Europe
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)