18 using TraceLab.Components.DevelopmentKit.Metrics.Traceability;
19 using TraceLab.Components.Types;
21 using TraceLabSDK.Types;
23 namespace TraceLab.Components.Library.Metrics.Traceability
25 [Component(Name =
"Principal Component Analysis (double)",
26 Description =
"Performs PCA on two TLSimilarityMatrix.",
27 Author =
"SEMERU; Evan Moritz",
29 ConfigurationType = typeof(
RConfig))]
30 [IOSpec(IOSpecType.Input,
"Matrix1", typeof(TLSimilarityMatrix))]
31 [IOSpec(IOSpecType.Input,
"Matrix2", typeof(TLSimilarityMatrix))]
32 [IOSpec(IOSpecType.Output,
"Matrix1Contribution", typeof(
double))]
33 [IOSpec(IOSpecType.Output,
"Matrix2Contribution", typeof(
double))]
34 [Tag(
"RPlugin.Metrics.Traceability")]
35 [Tag(
"Metrics.Traceability")]
43 Configuration = _config;
48 TLSimilarityMatrix matrix1 = (TLSimilarityMatrix)Workspace.Load(
"Matrix1");
49 TLSimilarityMatrix matrix2 = (TLSimilarityMatrix)Workspace.Load(
"Matrix2");
51 double[] results = (
double[])engine.
Execute(
new PCAScript(matrix1, matrix2));
52 Workspace.Store(
"Matrix1Contribution", results[0]);
53 Workspace.Store(
"Matrix2Contribution", results[1]);