performanceCompare {semiArtificial} | R Documentation |
Evaluate similarity of two data sets based on predictive performance
Description
Depending on the type of problem (classification or regression), a classification performance (accuracy, AUC, brierScore, etc) or regression performance (RMSE, MSE, MAE, RMAE, etc) on two data sets is used to compare the similarity of two data sets.
Usage
performanceCompare(data1, data2, formula, model="rf", stat=NULL, ...)
Arguments
data1 |
A |
data2 |
A |
formula |
A |
model |
A predictive model used for performance comparison. The default value "rf" stands for random forest,
but any classification or regression model supported by function |
stat |
A statistics used as performance indicator. The default value is NULL and means that for classification "accuracy" is used,
and for regression "RMSE"" (relative mean squared error) is used. Other values supported and output by |
... |
Additional parameters passed to |
Details
The function compares data stored in data1
with data2
by comparing models constructed on data1
and evaluated on both data1
and data2
with models built on data2
and evaluated on
both data1
and data2
. The difference between these performances are indicative on similarity of
the data sets if used in machine learning and data mining. The performance indicator used is determined
by parameter stat
.
Value
The method returns a list of performance indicators computed on both data sets:
diff.m1 |
The difference between performance of model built on |
diff.m2 |
The difference between performance of model built on |
perf.m1d1 |
The performance of model built on |
perf.m1d2 |
The performance of model built on |
perf.m2d1 |
The performance of model built on |
perf.m2d2 |
The performance of model built on |
Author(s)
Marko Robnik-Sikonja
See Also
Examples
# use iris data set
# create RBF generator
irisGenerator<- rbfDataGen(Species~.,iris)
# use the generator to create new data
irisNew <- newdata(irisGenerator, size=200)
# compare statistics of original and new data
performanceCompare(iris, irisNew, Species~.)