Skip to content

Commit

Permalink
Merge branch 'devel' into fix-rom-dataobj
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanjm committed Jul 18, 2023
2 parents 3a988ac + 3a922e2 commit 2bad1e4
Show file tree
Hide file tree
Showing 96 changed files with 22,397 additions and 7,452 deletions.
10 changes: 6 additions & 4 deletions dependencies.xml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,14 @@ Note all install methods after "main" take
<numpy>1.22</numpy>
<scipy>1.7</scipy>
<scikit-learn>1.0</scikit-learn>
<pandas>1.3</pandas>
<pandas/>
<!-- Note most versions of xarray work, but some (such as 0.20) don't -->
<xarray>2023</xarray>
<netcdf4>1.5</netcdf4>
<netcdf4 source="pip">1.5</netcdf4>
<matplotlib>3.5</matplotlib>
<statsmodels>0.13</statsmodels>
<cloudpickle>2.2</cloudpickle>
<tensorflow os='mac,linux'>2.10</tensorflow>
<tensorflow source="pip" os='mac,linux'>2.10</tensorflow>
<tensorflow source="pip" os='windows'>2.10</tensorflow>
<!-- conda is really slow on windows if the version is not specified.-->
<python skip_check='True' os='windows'>3.8</python>
Expand All @@ -66,12 +66,14 @@ Note all install methods after "main" take
<dask source="pip" pip_extra="[complete]"/>
<ray source="pip" pip_extra="[default]" os='mac,linux'>2.2</ray>
<ray source="pip" pip_extra="[default]" os='windows'>1.13</ray>
<pydantic source="pip" os='mac,linux'>1</pydantic> <!-- ray 2.2 can't use pydantic 2 -->
<!-- redis is needed by ray, but on windows, this seems to need to be explicitly stated -->
<redis source="pip" os='windows'/>
<imageio>2.22</imageio>
<imageio source="pip">2.22</imageio>
<line_profiler optional='True'/>
<!-- <ete3 optional='True'/> -->
<pywavelets optional='True'>1.1</pywavelets>
<python-sensors source="pip"/>
<numdifftools source="pip">0.9</numdifftools>
<fmpy optional='True'/>
<xmlschema source="pip"/>
Expand Down
18 changes: 17 additions & 1 deletion doc/user_manual/Installation/clone.tex
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,23 @@ \subsubsection{Obtaining RAVEN Source Code}
\begin{lstlisting}[language=bash]
git clone https://github.com/idaholab/raven.git
cd raven
\end{lstlisting}

\subsubsection{Getting Plugins}

Individual plugins can be gotten with a command like (from the
\texttt{raven} directory):

\begin{lstlisting}[language=bash]
git submodule update --init plugins/TEAL/
python scripts/install_plugins.py -s plugins/TEAL
\end{lstlisting}

All the plugins can be gotten, but this may throw errors if there are non-open source ones currently:

\begin{lstlisting}[language=bash]
git submodule update --init
python scripts/install_plugins.py -a
\end{lstlisting}
This will obtain RAVEN as well as other submodules that RAVEN uses. In the future, whenever we declare a path
starting with \texttt{raven/}, we refer to the cloned directory.
Expand All @@ -50,7 +66,7 @@ \subsubsection{Installing Python Libraries}
cd scripts
bash.exe establish_conda_env.sh --install
\end{lstlisting}

\end{itemize}
Assure that there are no errors in this process, then continue to compiling RAVEN.

Expand Down
58 changes: 58 additions & 0 deletions doc/user_manual/PostProcessors/SparseSensing.tex
Original file line number Diff line number Diff line change
@@ -0,0 +1,58 @@
\subsubsection{SparseSensing}
\label{SparseSensing}
The \textbf{SparseSensing} post-processor incorporates ``PySensors'', a Scikit-learn style Python package for the sparse placement of sensors for reconstruction tasks and classification tasks which will be added here soon.

Sparse sensor placement concerns the problem of selecting a small subset of sensor or measurement locations in a way that allows one to perform some task nearly as well as if one had access to measurements at every location.

This post-processor provides objects designed for the tasks of reconstruction and classification. See

\begin{itemize}
\item Manohar, Krithika, et al. ``Data-driven sparse sensor placement for reconstruction: Demonstrating the benefits of exploiting known patterns.'' IEEE Control Systems Magazine 38.3 (2018): 63-86 for more information about the PySensors approach to reconstruction problems and,
\item Brunton, Bingni W., et al. ``Sparse sensor placement optimization for classification.'' SIAM Journal on Applied Mathematics 76.5 (2016): 2099-2122 for classification and,
\item de Silva, Brian M., et al. ``PySensors: A Python package for sparse sensor placement.'' arXiv preprint arXiv:2102.13476 (2021) contains a full literature review along with examples and additional tips for using PySensors effectively.
\end{itemize}

\ppType{SparseSensing }{SparseSensing}
\begin{itemize}
\item \xmlNode{Goal}, \xmlDesc{string, required field}, the goal of the sparse sensor optimization.
User has to provide \xmlAttr{subType} which is a \xmlDesc{string, required field} representing the goal of the sparse sensing optimization; i.e., which goal function is used in the optimization? Examples for such goal functions are:
\begin{itemize}
\item \textbf{Reconstruction} deals with predicting the values of a quantity of interest at different locations other than those where sensors are located. For example, one might predict the temperature at a point in the middle of a fuel rod based on readings taken at various other positions.

\item \textbf{Classification} is the problem of predicting which category an example belongs to, given a set of training data (e.g. determining whether digital photos are of dogs or cats).
\end{itemize}
\nb{Currently, only reconstruction is implemented.}
In order to use the \xmlNode{Goal}, the user needs to provide the following subnodes:
\begin{itemize}
\item \xmlNode{features}, \xmlDesc{comma separated strings, required field}, features/inputs of the data model, i.e., possible sensor locations/IDs
\item \xmlNode{target}, \xmlDesc{comma separated strings, required field}, target of data model, i.e., response of interest sought to be reconstructed.
\nb{Currently the algorithms can handle a single target}.
\item \xmlNode{basis} , \xmlDesc{string, optional field}, the type of basis onto which the data are projected: \xmlString{Identity}, \xmlString{SVD}, \xmlString{Random}. \default{SVD}
\item \xmlNode{nModes}, \xmlDesc{integer, required field}, the number of modes used to project the data.
\item \xmlNode{nSensors}, \xmlDesc{integer, required field}, the number of sensors used
\item \xmlNode{optimizer}, \xmlDesc{string, optional field}, the optimizer used to find the sensors: \xmlString{QR}, for the unconstrained case.
\item \xmlNode{seed}, \xmlDesc{integer, optional field}, the seed that is passed to the pysensors SSPOR fit function. If not specified if there are more sensors chosen then nModes, the sensors chosen will be different with each run.
\end{itemize}
\end{itemize}

\textbf{Example:}
\begin{lstlisting}[style=XML]
<Simulation>
...
<Models>
...
<PostProcessor name="mySPSL" subType="SparseSensing" verbosity="debug">
<Goal subType="reconstruction">
<features>X (m),Y (m),Temperature (K)</features>
<target>Temperature (K)</target>
<basis>SVD</basis> <!--default: SVD-->
<nModes>4</nModes> <!--default: opt, allows the algorithm to pick nModes-->
<nSensors>4</nSensors><!--default: opt, allows the algorithm to pick nSensors-->
<optimizer>QR</optimizer><!--default: QR-->
</Goal>
</PostProcessor>
...
</Models>
...
</Simulation>
\end{lstlisting}
Loading

0 comments on commit 2bad1e4

Please sign in to comment.