Repository: idaholab/SR2ML (language: python)

Issue:
Rename DataClassifier PostProcessor to DataLabeling PostProcessor 
--------
Issue Description
--------

**Is your feature request related to a problem? Please describe.**
To clarify the functionality of DataClassifier PostProcessor, it is better to change the name to DataLabeling. 

**Describe the solution you'd like**


**Describe alternatives you've considered**


**Additional context**

----------------
For Change Control Board: Issue Review
----------------
This review should occur before any development is performed as a response to this issue.
- [ ] 1. Is it tagged with a type: defect or task?
- [ ] 2. Is it tagged with a priority: critical, normal or minor?
- [ ] 3. If it will impact requirements or requirements tests, is it tagged with requirements?
- [ ] 4. If it is a defect, can it cause wrong results for users? If so an email needs to be sent to the users.
- [ ] 5. Is a rationale provided? (Such as explaining why the improvement is needed or why current code is wrong.)

-------
For Change Control Board: Issue Closure
-------
This review should occur when the issue is imminently going to be closed.
- [ ] 1. If the issue is a defect, is the defect fixed?
- [ ] 2. If the issue is a defect, is the defect tested for in the regression test system?  (If not explain why not.)
- [ ] 3. If the issue can impact users, has an email to the users group been written (the email should specify if the defect impacts stable or master)?
- [ ] 4. If the issue is a defect, does it impact the latest release branch? If yes, is there any issue tagged with release (create if needed)?
- [ ] 5. If the issue is being closed without a pull request, has an explanation of why it is being closed been provided?



Discussion / hints:

Fix patch:
diff --git a/__init__.py b/__init__.py
index ba1595a..74c3632 100644
--- a/__init__.py
+++ b/__init__.py
@@ -8,7 +8,7 @@
 from SR2ML.src import ReliabilityModel
 from SR2ML.src import MaintenanceModel
 from SR2ML.src import MCSSolver
-from SR2ML.src.PostProcessors import DataClassifier
+from SR2ML.src.PostProcessors import DataLabeling
 from SR2ML.src.PostProcessors import ETImporter
 from SR2ML.src.PostProcessors import FTImporter
 from SR2ML.src.PostProcessors import MCSimporter
diff --git a/doc/user_manual/Makefile b/doc/user_manual/Makefile
index 645f7b0..cc3fa79 100644
--- a/doc/user_manual/Makefile
+++ b/doc/user_manual/Makefile
@@ -1,5 +1,5 @@
 SRCFILE = user_manual
-MANUAL_FILES = user_manual.tex Introduction.tex include/DataClassifier.tex include/ETdataImporter.tex \
+MANUAL_FILES = user_manual.tex Introduction.tex include/DataLabeling.tex include/ETdataImporter.tex \
 							 include/ETmodel.tex include/FTdataImporter.tex include/FTmodel.tex include/MarkovModel.tex include/RBDmodel.tex
 LATEX_FLAGS=-interaction=nonstopmode
 
@@ -19,4 +19,3 @@ clean:
 #creating version file
 ../version.tex : $(MANUAL_FILES)
 	git log -1 --format="%H %an %aD"  .. > ../version.tex
-
diff --git a/doc/user_manual/include/DataClassifier.tex b/doc/user_manual/include/DataLabeling.tex
similarity index 63%
rename from doc/user_manual/include/DataClassifier.tex
rename to doc/user_manual/include/DataLabeling.tex
index 194af97..597b0ee 100644
--- a/doc/user_manual/include/DataClassifier.tex
+++ b/doc/user_manual/include/DataLabeling.tex
@@ -1,25 +1,25 @@
-\section{Data Classifier}
-\label{sec:dataClassifier}
+\section{Data Labeling}
+\label{sec:DataLabeling}
+
+The \textbf{DataLabeling} post-processor is specifically used to label the data stored in the DataObjects. It
+accepts two DataObjects, one DataObject (i.e., reference DataObject) with type \textbf{PointSet} is used to label the
+other target DataObjects (type can be either \textbf{PointSet} or \textbf{HistorySet}).
 
-The \textbf{DataClassifier} post-processor is specifically used to classify the data stored in the DataObjects. It
-accepts two DataObjects, one is used as the classifier which must be a \textbf{PointSet}, the other one,
-i.e. \textbf{PointSet} or \textbf{HistorySet}, is used as the input DataObject to be classified.
 %
-\ppType{DataClassifier}{DataClassifier}
+\ppType{DataLabeling}{DataLabeling}
 %
 \begin{itemize}
-  \item \xmlNode{label}, \xmlDesc{string, required field}, the name of the label that are used for the classifier. This
-    label must exist in the DataObject that is used as the classifer. This name will also be used as
-    the label name for the DataObject that is classified.
+  \item \xmlNode{label}, \xmlDesc{string, required field}, the label variable name in the reference DataObject.
+    This variable will be used to label the target DataObject.
   \item \xmlNode{variable}, \xmlDesc{required, xml node}. In this node, the following attribute should be specified:
     \begin{itemize}
       \item \xmlAttr{name}, \xmlDesc{required, string attribute}, the variable name, which should be exist in
-        the DataObject that is used as classifier.
+        the reference DataObject.
     \end{itemize}
     and the following sub-node should also be specified:
     \begin{itemize}
-      \item \xmlNode{Function}, \xmlDesc{string, required field}, this function creates the mapping from input DataObject
-        to the Classifier.
+      \item \xmlNode{Function}, \xmlDesc{string, required field}, this function creates the mapping from
+        target DataObject to the reference DataObject.
         \begin{itemize}
           \item \xmlAttr{class}, \xmlDesc{string, required field}, the class of this function (e.g. Functions)
           \item \xmlAttr{type}, \xmlDesc{string, required field}, the type of this function (e.g. external)
@@ -55,8 +55,8 @@ \section{Data Classifier}
   </Functions>
 \end{lstlisting}
 
-The inputs to these functions are the inputs of the data object that will be classified, and the outputs of these functions
-are the inputs of data object that is used as the classifier.
+The inputs to these functions are the data from the target DataObject, and the outputs of these functions
+are the data from the reference DataObject.
 
 \textbf{Example Python Function for ``func\_ACC.py''}
 \begin{lstlisting}[language=python]
@@ -72,13 +72,9 @@ \section{Data Classifier}
 
 \nb All the functions that are used to create the maps should be include the ``evaluate'' method.
 
-The \textbf{DataClassifier} post-processor is specifically used to classify the data stored in the DataObjects. It
-accepts two DataObjects, one is used as the classifier which should be always \textbf{PointSet}, the other one, i.e.
-either \textbf{PointSet} or \textbf{HistorySet} is used as the input DataObject to be classified.
-
-The \textbf{DataClassifier} is provided below:
+The example of \textbf{DataLabeling} post processor is provided below:
 \begin{lstlisting}[style=XML]
-    <PostProcessor name="ET_Classifier" subType="SR2ML.DataClassifier">
+    <PostProcessor name="ET_Classifier" subType="SR2ML.DataLabeling">
       <label>sequence</label>
       <variable name='ACC'>
         <Function class="Functions" type="External">func_ACC</Function>
@@ -89,10 +85,10 @@ \section{Data Classifier}
     </PostProcessor>
 \end{lstlisting}
 The definitions for the XML nodes can be found in the RAVEN user manual. The label ``sequence''
-and the variables ``ACC, LPI'' should be exist in the data object that is used as the classifier,
-while the functions ``func\_ACC, func\_LPI'' are used to map relationships between the input data objects.
+and the variables ``ACC, LPI'' should be exist in the reference data object,
+while the functions ``func\_ACC, func\_LPI'' are used to map relationships between the reference and target data objects.
 
-The classification can be achieved via the \xmlNode{Steps} as shown below:
+The labeling process can be achieved via the \xmlNode{Steps} as shown below:
 \begin{lstlisting}[style=XML]
 <Simulation>
  ...
@@ -108,8 +104,8 @@ \section{Data Classifier}
 </Simulation>
 \end{lstlisting}
 
-\subsection{Data Classifier Reference Tests}
+\subsection{Data Labeling Reference Tests}
 \begin{itemize}
-	\item test\_dataClassifier\_postprocessor.xml
-  \item test\_dataClassifier\_postprocessor\_HS.xml.
+	\item test\_DataLabeling\_postprocessor.xml
+  \item test\_DataLabeling\_postprocessor\_HS.xml.
 \end{itemize}
diff --git a/doc/user_manual/user_manual.tex b/doc/user_manual/user_manual.tex
index 04c22f2..3c35fa7 100644
--- a/doc/user_manual/user_manual.tex
+++ b/doc/user_manual/user_manual.tex
@@ -309,7 +309,7 @@
     \input{include/ReliabilityModels.tex}
     \input{include/MaintenanceModels.tex}
     %%%%%%%%%%%%% PostProcessors %%%%%%%%%%%%%%%%
-    \input{include/DataClassifier.tex}
+    \input{include/DataLabeling.tex}
     \input{include/ETdataImporter.tex}
     \input{include/FTdataImporter.tex}
     \input{include/MCSImporter.tex}
diff --git a/src/PostProcessors/DataClassifier.py b/src/PostProcessors/DataLabeling.py
similarity index 98%
rename from src/PostProcessors/DataClassifier.py
rename to src/PostProcessors/DataLabeling.py
index bc95e5f..563ed30 100644
--- a/src/PostProcessors/DataClassifier.py
+++ b/src/PostProcessors/DataLabeling.py
@@ -22,7 +22,7 @@
 from utils import InputData, InputTypes, utils
 from PluginBaseClasses.PostProcessorPluginBase import PostProcessorPluginBase
 
-class DataClassifier(PostProcessorPluginBase):
+class DataLabeling(PostProcessorPluginBase):
   """
     This Post-Processor performs data classification based on given classifier.
     In order to use this interface post-processor, the users need to provide
@@ -60,7 +60,7 @@ def __init__(self):
       @ Out, None
     """
     super().__init__()
-    self.printTag   = 'POSTPROCESSOR DataClassifier'
+    self.printTag   = 'POSTPROCESSOR DataLabeling'
     self.mapping    = {}  # dictionary for mapping input space between different DataObjects {'variableName':'externalFunctionName'}
     self.funcDict   = {}  # Contains the function to be used {'variableName':externalFunctionInstance}
     self.label      = None # ID of the variable which containf the label values
@@ -71,7 +71,7 @@ def __init__(self):
 
   def initialize(self, runInfo, inputs, initDict=None):
     """
-      Method to initialize the DataClassifier post-processor.
+      Method to initialize the DataLabeling post-processor.
       @ In, runInfo, dict, dictionary of run info (e.g. working dir, etc)
       @ In, inputs, list, list of inputs
       @ In, initDict, dict, optional, dictionary with initialization options


Test patch:
diff --git a/tests/PostProcessors/DataClassifier/dataClassifier/THmodel.py b/tests/PostProcessors/DataLabeling/dataClassifier/THmodel.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifier/THmodel.py
rename to tests/PostProcessors/DataLabeling/dataClassifier/THmodel.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifier/eventTree.xml b/tests/PostProcessors/DataLabeling/dataClassifier/eventTree.xml
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifier/eventTree.xml
rename to tests/PostProcessors/DataLabeling/dataClassifier/eventTree.xml
diff --git a/tests/PostProcessors/DataClassifier/dataClassifier/func_ACC.py b/tests/PostProcessors/DataLabeling/dataClassifier/func_ACC.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifier/func_ACC.py
rename to tests/PostProcessors/DataLabeling/dataClassifier/func_ACC.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifier/func_LPI.py b/tests/PostProcessors/DataLabeling/dataClassifier/func_LPI.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifier/func_LPI.py
rename to tests/PostProcessors/DataLabeling/dataClassifier/func_LPI.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifier/func_LPR.py b/tests/PostProcessors/DataLabeling/dataClassifier/func_LPR.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifier/func_LPR.py
rename to tests/PostProcessors/DataLabeling/dataClassifier/func_LPR.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifierHS/THmodelTD.py b/tests/PostProcessors/DataLabeling/dataClassifierHS/THmodelTD.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifierHS/THmodelTD.py
rename to tests/PostProcessors/DataLabeling/dataClassifierHS/THmodelTD.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifierHS/eventTree.xml b/tests/PostProcessors/DataLabeling/dataClassifierHS/eventTree.xml
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifierHS/eventTree.xml
rename to tests/PostProcessors/DataLabeling/dataClassifierHS/eventTree.xml
diff --git a/tests/PostProcessors/DataClassifier/dataClassifierHS/func_ACC.py b/tests/PostProcessors/DataLabeling/dataClassifierHS/func_ACC.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifierHS/func_ACC.py
rename to tests/PostProcessors/DataLabeling/dataClassifierHS/func_ACC.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifierHS/func_LPI.py b/tests/PostProcessors/DataLabeling/dataClassifierHS/func_LPI.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifierHS/func_LPI.py
rename to tests/PostProcessors/DataLabeling/dataClassifierHS/func_LPI.py
diff --git a/tests/PostProcessors/DataClassifier/dataClassifierHS/func_LPR.py b/tests/PostProcessors/DataLabeling/dataClassifierHS/func_LPR.py
similarity index 100%
rename from tests/PostProcessors/DataClassifier/dataClassifierHS/func_LPR.py
rename to tests/PostProcessors/DataLabeling/dataClassifierHS/func_LPR.py
diff --git a/tests/PostProcessors/DataClassifier/gold/dataClassifier/Print_ET_PS.csv b/tests/PostProcessors/DataLabeling/gold/dataClassifier/Print_ET_PS.csv
similarity index 100%
rename from tests/PostProcessors/DataClassifier/gold/dataClassifier/Print_ET_PS.csv
rename to tests/PostProcessors/DataLabeling/gold/dataClassifier/Print_ET_PS.csv
diff --git a/tests/PostProcessors/DataClassifier/gold/dataClassifier/Print_sim_PS.csv b/tests/PostProcessors/DataLabeling/gold/dataClassifier/Print_sim_PS.csv
similarity index 100%
rename from tests/PostProcessors/DataClassifier/gold/dataClassifier/Print_sim_PS.csv
rename to tests/PostProcessors/DataLabeling/gold/dataClassifier/Print_sim_PS.csv
diff --git a/tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_0.csv b/tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_0.csv
similarity index 100%
rename from tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_0.csv
rename to tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_0.csv
diff --git a/tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_3.csv b/tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_3.csv
similarity index 100%
rename from tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_3.csv
rename to tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_3.csv
diff --git a/tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_7.csv b/tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_7.csv
similarity index 100%
rename from tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_7.csv
rename to tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_7.csv
diff --git a/tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_9.csv b/tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_9.csv
similarity index 100%
rename from tests/PostProcessors/DataClassifier/gold/dataClassifierHS/Print_sim_PS_9.csv
rename to tests/PostProcessors/DataLabeling/gold/dataClassifierHS/Print_sim_PS_9.csv
diff --git a/tests/PostProcessors/DataClassifier/test_dataClassifier_postprocessor.xml b/tests/PostProcessors/DataLabeling/test_dataClassifier_postprocessor.xml
similarity index 91%
rename from tests/PostProcessors/DataClassifier/test_dataClassifier_postprocessor.xml
rename to tests/PostProcessors/DataLabeling/test_dataClassifier_postprocessor.xml
index 400d220..3b6dba6 100644
--- a/tests/PostProcessors/DataClassifier/test_dataClassifier_postprocessor.xml
+++ b/tests/PostProcessors/DataLabeling/test_dataClassifier_postprocessor.xml
@@ -1,21 +1,24 @@
 <Simulation verbosity="debug">
   <TestInfo>
-    <name>framework/PostProcessors/DataClassifier/Clustering/</name>
+    <name>framework/PostProcessors/DataLabeling/Clustering/</name>
     <author>wangc</author>
     <created>2018-10-18</created>
-    <classesTested>DataClassifier</classesTested>
+    <classesTested>DataLabeling</classesTested>
     <description>
-      Test DataClassifier PostProcessor with PointSet input
+      Test DataLabeling PostProcessor with PointSet input
     </description>
     <revisions>
       <revision author="wangc" date="2019-04-26">
-        Move the test from PRAPlugin to RAVEN tests/framework/PostProcessors/DataClassifier, this is because
-        the DataClassifier PostProcessor is currently in RAVEN main repository.
+        Move the test from PRAPlugin to RAVEN tests/framework/PostProcessors/DataLabeling, this is because
+        the DataLabeling PostProcessor is currently in RAVEN main repository.
       </revision>
       <revision author="wangc" date="2019-05-02">
         As reported in issue #805, RAVEN will not allow input DataObject of PostProcessor to be output DataObject,
         the output data object will be renamed, and the variable name of labels will be explicitly defined.
       </revision>
+      <revision author="wangc" date="2021-05-20">
+        Change DataClassifier to DataLabeling
+      </revision>
     </revisions>
   </TestInfo>
 
@@ -80,7 +83,7 @@
       <fileFormat>OpenPSA</fileFormat>
       <expand>True</expand>
     </PostProcessor>
-    <PostProcessor name="ET_Classifier" subType="SR2ML.DataClassifier">
+    <PostProcessor name="ET_Classifier" subType="SR2ML.DataLabeling">
       <label>sequence</label>
       <variable name='ACC'>
         <Function class="Functions" type="External">func_ACC</Function>
diff --git a/tests/PostProcessors/DataClassifier/test_dataClassifier_postprocessor_HS.xml b/tests/PostProcessors/DataLabeling/test_dataClassifier_postprocessor_HS.xml
similarity index 91%
rename from tests/PostProcessors/DataClassifier/test_dataClassifier_postprocessor_HS.xml
rename to tests/PostProcessors/DataLabeling/test_dataClassifier_postprocessor_HS.xml
index 5482b90..cfc529f 100644
--- a/tests/PostProcessors/DataClassifier/test_dataClassifier_postprocessor_HS.xml
+++ b/tests/PostProcessors/DataLabeling/test_dataClassifier_postprocessor_HS.xml
@@ -1,21 +1,24 @@
 <Simulation verbosity="debug">
   <TestInfo>
-    <name>framework/PostProcessors/DataClassifier/Clustering/</name>
+    <name>framework/PostProcessors/DataLabeling/Clustering/</name>
     <author>wangc</author>
     <created>2018-10-18</created>
-    <classesTested>DataClassifier</classesTested>
+    <classesTested>DataLabeling</classesTested>
     <description>
-      Test DataClassifier PostProcessor with HistorySet input
+      Test DataLabeling PostProcessor with HistorySet input
     </description>
     <revisions>
       <revision author="wangc" date="2019-04-26">
-        Move the test from PRAPlugin to RAVEN tests/framework/PostProcessors/DataClassifier, this is because
-        the DataClassifier PostProcessor is currently in RAVEN main repository.
+        Move the test from PRAPlugin to RAVEN tests/framework/PostProcessors/DataLabeling, this is because
+        the DataLabeling PostProcessor is currently in RAVEN main repository.
       </revision>
       <revision author="wangc" date="2019-05-02">
         As reported in issue #805, RAVEN will not allow input DataObject of PostProcessor to be output DataObject,
         the output data object will be renamed, and the variable name of labels will be explicitly defined.
       </revision>
+      <revision author="wangc" date="2021-05-20">
+        Change DataClassifier to DataLabeling
+      </revision>
     </revisions>
   </TestInfo>
 
@@ -81,7 +84,7 @@
       <fileFormat>OpenPSA</fileFormat>
       <expand>True</expand>
     </PostProcessor>
-    <PostProcessor name="ET_Classifier" subType="SR2ML.DataClassifier">
+    <PostProcessor name="ET_Classifier" subType="SR2ML.DataLabeling">
       <label>sequence</label>
       <variable name='ACC'>
         <Function class="Functions" type="External">func_ACC</Function>
diff --git a/tests/PostProcessors/DataClassifier/tests b/tests/PostProcessors/DataLabeling/tests
similarity index 100%
rename from tests/PostProcessors/DataClassifier/tests
rename to tests/PostProcessors/DataLabeling/tests