text:
\section{Introduction}\label{sec:introduction}

Graph convolutional neural networks (GCNNs) have shown particular promise in predicting properties of small molecules.
These properties can be biological activity against protein targets~\cite{yang_comprehensive_2020, sakai_prediction_2021, nguyen_meta-learning_2020}, more general pharmacokinetics and physicochemical properties~\cite{montanari_modeling_2019, peng_enhanced_2020, feinberg_improvement_2020} or toxicity~\cite{ma_deep_2020}.
Using accurate \textit{in silico} predictions of such properties to prioritize the synthesis of compounds can lead to tremendous time and cost savings during drug discovery projects.

However, the opaque nature of artificial neural networks has long been a stumbling block for wider adoption.
In particular, the difficulty in extracting a straightforward rationalization for a molecular prediction in terms of atomic or fragment contributions limits the adoption of machine learning models among medicinal chemists.

What makes a good rationalization?
In the case of explaining molecular properties, the answer is often site attribution.
A chemist, when presented with an image of a molecule, may infer properties like solubility and melting point from a few specific atoms and fragments rather than the molecule as a whole.
Explaining the predictions in terms of atomic contributions helps build trust in deep learning for molecular properties.

\section{Our Contribution}\label{sec:our-contribution}

In a GCNN, particular combinations of dimensions of the learned representations can be visually mapped onto the molecule after any convolution.
Existing attribution methods for GCNNs make use of that fact.
If these dimensions are correlated or if a particular prediction makes use of very many dimensions, the resulting explanations may be confusing and overwhelming for the end user.
To mitigate these problems, we introduce two new methods to improve the interpretability of GCNN predictions: Batch Representation Orthonormalization (BRO) and Gini regularization.
Both are available in the Pytorch Geometric library~\cite{fey_fast_2019}: \url{https://pytorch-geometric.readthedocs.io/en/latest/modules/nn.html#functional}.
An overview of our approach is shown in Figure~\ref{fig:overview}.

\begin{figure*}[t]
    \vskip 0.2in
    \begin{center}
        \centerline{\includegraphics[trim=0 100 0 100, clip, width=\textwidth]{figures/overview.pdf}}
        \caption{
        \textbf{Batch Representation Orthnormalization and Gini Regularization}
        From left to right: the input molecule passes through a number of graph convolutional operators, generating new graph embeddings.
        $n$ embeddings of arbitrary dimension (in this figure: 128) are generated, where $n$ is the number of nodes or atoms in the graph.
        During training, a regularization loss will be computed on the final embedding, $\mathbf{H}$, according to the BRO regularizer in Equation~\ref{eq:BRO}.
        The contrast between the cosine similarities among all pairs of node representations $h_j$ for a model trained without (Baseline) and with the BRO regularizer is shown: note that in the BRO case, many more overlaps are pushed to zero.
        The node representations are then aggregated by a global average pooling layer.
        A final linear layer transforms these aggregations into predictions.
        The multi-task model depicted in the figure has 10 outputs.
        The effects of constraining the weights of this layer according to the Gini regularizer (Equation~\ref{eq:gini}) is shown on the right.
        }
        \label{fig:overview}
    \end{center}
    \vskip -0.2in
\end{figure*}

\subsection{Batch Representation Orthonormalization (BRO)}

Our work is loosely inspired by linear combination of atomic orbitals (LCAO) theory~\cite{albright_orbital_2013}.
In LCAO theory, a complete set of molecular orbitals $\psi$ is built from the superposition of an orthonormal basis set of atomic electronic wavefunctions: $\psi_j = \sum_i^N c_{ij}\phi_i$ where $\phi_i$ are the electronic atomic basis functions.
The molecular orbitals must also be mutually orthonormal--that is, the coefficients $c_{ij}$ must be normalized so that $\psi_j^* \psi_j = 1$ and $\psi_j^*\psi_{j'} = 0$.

Pictorially, one can think of LCAO as building up the molecular orbitals by sequentially making bonding and anti-bonding combinations of symmetry-related atoms until the full molecular orbital set is constructed.
GCNNs can also be conceptualized as building up a full molecular picture from atomic sites.
Instead of combining symmetry-related sites, GCNNs combine the information from increasingly distant atomic neighbors on the molecule.
This correspondence is not only superficial: the final molecular orbitals obtained by this symmetry mixing procedure can be described by the eigenvectors of the adjacency matrix.
The contrast of these two principles is depicted in Figure~\ref{fig:LCAOvsGNN}.

\begin{figure}[t]
    \vskip 0.2in
    \begin{center}
        \centerline{\includegraphics[trim=40 80 320 80, clip, width=\columnwidth]{figures/LCAO.pdf}}
        \caption{
        On the left we illustrate the LCAO principle for a hypothetical four-hydrogen molecule ($\sigma$-bonding only).
        The colors represent the sign of the atomic orbital: neighboring atomic sites with different signs are said to be anti-bonding, with correspondingly higher energy.
        Step 0 shows the topology of the molecule.
        Step 1 shows combining atomic orbitals which are symmetry-related in bonding and anti-bonding combinations.
        Step 2 shows a combination of the intermediate orbitals from Step 1 into the final molecular orbitals.
        The atomic contributions in the final molecular orbitals are sized according to the eigenvectors of the adjacency matrix, and they are ranked according to eigenvalue: most bonding (bottom) to most anti-bonding (top).
        The right side of the image shows an analogous process for GCNNs, receiving information from increasingly distant (represented by a lighter shade) neighbors for each convolutional step.
        This happens simultaneously for each node.
        }
        \label{fig:LCAOvsGNN}
    \end{center}
    \vskip -0.2in
\end{figure}

In the LCAO picture, orthonormality is guaranteed by construction.
The representations $\mathbf{H}$ created by a graph convolution ($h_{ij}$ for the $i$th atom and $j$th molecular embedding; $h_j$ is a vector that can be mapped directly onto the molecule) have no such guarantee.
In this work, we introduce an orthonormality constraint in the training process to partially recover this property.
For a molecule with representation $\mathbf{H}$, the molecular regularization loss is defined by:

\begin{equation}
    \label{eq:BRO}
    \mathcal{L}_{\textrm{BRO}}^\mathrm{mol} = \frac{\lambda}{2
    } \ || \mathbf{HH}^T - \mathbf{I}||_2
\end{equation}

Where $||\cdot||_2$ indicates the vector 2-norm and $\mathbf{I}$ is the identity matrix.
$\lambda$ is a hyperparameter.
Since the forward pass of a GCNN will typically use mini-batching, the regularization loss must be aggregated over all graphs in the batch.
Computing so many normalizations is computationally taxing, so in this work we limit BRO application to the outputs of the final graph convolution.
We observe that training typically takes four times as long.
The effects of this constraint on the node embeddings for a single molecule are shown in the center of Figure~\ref{fig:overview}.

\subsection{Gini Regularization}

Multitask neural networks (MTNNs) and multitask graph convolutional neural networks (MT-GCNNs) are of special interest for modeling molecular properties.
Often, a user is interested in multiple properties of a molecule.
Since many physicochemical properties are related, it makes intuitive sense that internal representations could be reused for different tasks.

A typical MT-GCNN architecture will follow the graph convolutional layers with a global graph aggregation layer, which aggregates the node-level outputs into graph-level outputs for graph property prediction.
A sequential, fully-connected neural network then makes graph level predictions based on the graph-level outputs from the global aggregation layer.
The simplest example of this architecture, which we will use in this paper, is a global average pooling (GAP) layer followed by a single fully-connected layer.

We wish to constrain the weights of the final fully-connected layer to be sparse.
We reason that this should have the two-fold effect of reducing the number of node representations $h_j$ that are relevant to a specific prediction and revealing which representations are shared among tasks.
The usual $\ell_1$ or $\ell_2$ regularization is not appropriate here, as penalizing the magnitude of the weights directly damages the performance of regression metrics.

Instead, we use a regularizer inspired by the Gini coefficient~\cite{gini_variabilita_1912}.\footnote{We first documented this approach in our workshop paper ~\citealt{henderson_gini_2020}.}
The Gini coefficient was invented in the context of economics as a straightforward way to compare income or wealth inequality across different countries~\cite{dorfman_formula_1979}.
A high Gini coefficient implies a inequal wealth distribution, while a low one indicates a more equitable distribution.

For our model, we want the representations to have high inequality: each prediction should be dominated by as few representations as possible.
We select each row $w_i$ of the weights of the final fully-connected layer which is responsible for predicting task $i$ from the $n$ outputs of the GAP layer and compute:

\begin{equation}
    \mathcal{L}_\textrm{Gini}^i = \sum_j^n \sum_{j'}^n \frac{
    | w_{ij} - w_{ij'} |
    } {
    2 (n^2 - n) \bar{w_i}
    }
    \label{eq:gini}
\end{equation}

where $j$ ranges over all weights in the row.
$\bar{w_i}$ is the mean weight value for the row.
The Gini coefficient $\mathcal{L}^i_\textrm{Gini}$ ranges from zero to one: zero if all $w$ are equal and one if one $w_i$ is non-zero and the rest zero.
Since weights of a linear transform are not necessarily restricted to be non-negative, we will always use $|w|$ rather than $w$ for computing the Gini regularization during training.

We take the mean $g = \frac{1}{n}\sum_i^n \mathcal{L}_\textrm{Gini}^i$ over all tasks.
The training loss becomes $L / g^m$ where $L$ is the multi-task regression loss, and $m$ is a hyperparameter to tune the effect of the Gini regularization.
The effects of the Gini regularization on a trained model are shown on the right side of Figure~\ref{fig:overview}.

\section{Related Work}\label{sec:related-work}

Our work is inspired by convolutional neural network (CNN) approaches.
In particular, the work of~\citealt{zhang_interpretable_2018} seeks to align individual convolutional filters to particular concepts, constraining categorical and spatial entropy.
Like our approach, this method requires no annotations.
Forcing orthonormality in the learned representations is conceptually similar to disentanglement or finding a more interpretable ``basis set'': this approach is explored for CNNs in~\citealt{zhou_interpreting_2019}.

Orthogonality or orthormality is often used as a constraint in training neural networks, however this is usually applied to the weights of learnable parameters~\cite{huang_orthogonal_2018}.
Recurrent neural networks in particular stand to benefit from orthonormalization as a means to address exploding or vanishing gradients~\cite{arjovsky_unitary_2016, jing_tunable_2017, vorontsov_orthogonality_2017}.
The exact form of the BRO layer was derived from ~\citealt{xie_all_2017}, although here again applied to learnable parameters rather than learned representations.

In the context of GCNNs, methods such as Graph Information Bottleneck~\cite{wu_graph_2020}, Deep Graph Infomax~\cite{velickovic_deep_2018}, and Infograph~\cite{sun_infograph_2019} seek to constrain representations according to information-theoretic principles.

Many attribution methods for neural networks have been proposed~\cite{zhou_learning_2016, selvaraju_grad-cam_2017, shrikumar_learning_2017, smilkov_smoothgrad_2017, sundararajan_axiomatic_2017} and later adapted to GCNNs ~\cite{xie_interpreting_2019, ying_gnnexplainer_2019, pope_explainability_2019, baldassarre_explainability_2019}.
In this work we focus on Class Activation Maps (CAM)~\cite{zhou_learning_2016}.
CAM is a simple yet powerful method connecting network outputs and the learned node representations.
In GCNNs where the node feature aggregation is done by a GAP layer, CAM corresponds to the scalar product of individual node features by the weights of the output layer:

\begin{equation}
    \textrm{Attribution}(\textrm{atom}_i) = w_j^\mathsf{T}  \cdot h_{i}
    \label{eq:cam}
\end{equation}

where $h_i$ corresponds to the learned feature vector for atom $i$ and $w_j$ corresponds to the row of the output weight matrix of the network corresponding to the $j$th task.
If in the single-task case, $w_j = \mathbf{W}$.
We expect our contributions to specifically help with CAM-like attribution methods: the Gini constraint reduces the number of non-zero elements in $\mathbf{W}$ and the BRO orthonormalization ensures that the different dimensions of the learned atom representations $\mathbf{H}$ are independent from each other.

\section{Experiments and Results}\label{sec:experiments-and-results}

We wish to show the effect of BRO and Gini regularization on model prediction explainability.
To illustrate this, we show the effect of our regularizers on attribution maps on benchmark datasets for which an exact attribution score can be calculated.

Next, we train new models on proprietary assay data to predict physicochemical endpoints.
We generate attribution maps from models trained with and without our constraints and survey experts on which attribution they prefer.

In all experiments, no hyperparmeter tuning was performed: the BRO and Gini regularizers are added to the baseline models with the their respective hyperparameters fixed ($\lambda=0.001$ for BRO regularization and $m=5.0$ for Gini regularization).
We chose values for parameters $\lambda$ and $m$ qualitatively: we sought the largest values for each that did not degrade evaluation metrics too much (see Section~\ref{subsec:model-performance}).

\subsection{Attribution Benchmarks}\label{subsec:attribution-benchmarks}

Recently,~\citealt{sanchez-lengeling_evaluating_2020} proposed three artificial tasks to evaluate attribution methods on molecular GCNNs.
These simple tasks have an associated ground truth explanation that can be used to score any attribution method's output.
For instance, if we trained a model to predict whether a molecule contains a benzene ring or not, a perfect attribution would highlight only the atoms in the benzene ring and no others.
We followed their protocol and metrics to benchmark the effect of our proposed regularizers on the attribution performance.

We focus on CAM and CAM-derived attribution methods, including GradCAM~\cite{selvaraju_grad-cam_2017} either on all convolutional layers or only the last one.
This is because the authors found CAM to systematically outperform other attribution methods.
Since our regularization method has not been implemented yet on edge features, we focus on the benchmark graph architectures that use node features exclusively (graph convolutional network (GCN) and graph attention network (GAT) in~\citealt{sanchez-lengeling_evaluating_2020}).
We also introduce a variation on CAM that we call TopRep.
TopRep applies the CAM Equation~\ref{eq:cam} using only the weight of the output layer that has the highest magnitude: that is, $w_j$ of Equation~\ref{eq:cam} retains the entry with the largest absolute value, and all others are set to zero.

\subsubsection{Dataset and Network Architecture}

\citealt{sanchez-lengeling_evaluating_2020} present three attribution tasks: ``Benzene'', ``Amine-Ether-Benzene'' and ``CrippenLogP.''
The Benzene task is as described above.
The Amine-Ether-Benzene task tests if each of the Amine, Ether, and Benzene fragments are present in the molecule (logical AND).
Both of these attribution tasks are scored using AUROC~\cite{bradley_use_1997}.
The underlying classification task is also scored with AUROC.
The CrippenLogP task is a regression task, with both attribution and regression scored with Pearson correlation.
We discuss this task in detail at the end of this section.

For the GCN and GAT models, we use the hyperparemeters given in Sanchez-Lengeling and modify their code only insofar as necessary to add the BRO and Gini regularizers.
Eighty trials of each combination are run.
Our modifications to the benchmarking code are available at \url{https://github.com/bayer-science-for-a-better-life/graph-attribution}.

\subsubsection{Results}

Figure~\ref{fig:attribution_boxplots} show the detailed distributions of attribution scores for the Benzene, Amine-Ether-Benzene, and CrippenLogP tasks ($n=80$ for every model/task combination).
For many combinations, BRO or Gini regularization markedly improve the attribution AUROC score.
Often, the combination of BRO and Gini yields better results than either regularizer alone.
This effect can be most strongly seen in the Benzene GAT combination (bottom row).
This bolsters our reasoning that it takes both sparsity \textit{and} orthogonal respresentations to generate a good attribution.
While there are some task/model combinations for which none of our constraints improve attribution, no combination's attribution AUROC score suffers significantly from the Gini+BRO regularizers.

TopRep also gives competitive results, even for the baseline configuration.
This is surprising in the baseline case, because TopRep is implicitly throwing out a lot of information if the output weight matrix has not been made sparse through, for example, Gini regularization.

Table~\ref{tab:CAM_benchmark} summarizes our results on all three benchmark tasks, including CrippenLogP.

\begin{figure}
    \centering
    \begin{subfigure}{\linewidth}
        \centering
        \includegraphics[trim=40 85 340 83, clip, width=1.0\linewidth]{figures/boxplot_benzene.pdf}
    \end{subfigure}
    \begin{subfigure}{\linewidth}
        \centering
        \includegraphics[trim=40 85 340 113, clip, width=1.0\linewidth]{figures/boxplot_logic10.pdf}
    \end{subfigure}
    \begin{subfigure}{\linewidth}
        \centering
        \includegraphics[trim=40 90 340 113, clip, width=1.0\linewidth]{figures/boxplot_crippen.pdf}
    \end{subfigure}
    \caption{
    Boxplots of attribution AUROC scores for all tasks.
    Both GCN and GAT models were considered.

    }
    \label{fig:attribution_boxplots}
\end{figure}

\begin{table}[h]
    \scriptsize
    \centering
    \caption{Performance of the attribution methods on the three benchmark tasks (mean for 80 trials per combination).
    For classification tasks, we report the attribution AUROC score and for regression the Pearson correlation.
    Best value in each column in bold.
    }
    \label{tab:CAM_benchmark}
    \resizebox{\columnwidth}{!}{
    \begin{tabular}{llrrrrrr}
        \toprule
        &       & \multicolumn{2}{c}{Benzene} & \multicolumn{2}{c}{AmEthBenz} & \multicolumn{2}{c}{CrippenLogP} \\
        \multicolumn{1}{l}{Attr.} & Const. & GCN   & GAT   & GCN   & GAT   & GCN   & GAT \\
        \midrule
        Random & None  & 0.614  & 0.613  & \cellcolor[rgb]{ .914,  .949,  .886} 0.500 & {\cellcolor[rgb]{ .898,  .941,  .867}} 0.495 & {\cellcolor[rgb]{ 1,  .996,  .992}} -0.086 & -0.093 \\
        & BRO   & 0.613  & 0.613  & \cellcolor[rgb]{ .894,  .937,  .863} 0.507 & \cellcolor[rgb]{ .878,  .933,  .843} 0.503 & -0.092 & -0.093 \\
        & Gini  & \cellcolor[rgb]{ .996,  1,  1} 0.614 & 0.613  & \cellcolor[rgb]{ .922,  .957,  .898} 0.498 & \cellcolor[rgb]{ .886,  .937,  .855} 0.500 & -0.091 & \cellcolor[rgb]{ 1,  .996,  .992} -0.088 \\
        & both  & 0.612  & 0.615  & \cellcolor[rgb]{ .918,  .953,  .89} 0.499 & \cellcolor[rgb]{ .886,  .937,  .855} 0.500 & -0.091 & \cellcolor[rgb]{ 1,  1,  .996} -0.091 \\
        \midrule
        Grad & None  & \cellcolor[rgb]{ .875,  .906,  .961} 0.678 & \cellcolor[rgb]{ .89,  .918,  .969} 0.670 & \cellcolor[rgb]{ .988,  .996,  .984} 0.475 & \cellcolor[rgb]{ .941,  .965,  .922} 0.476 & \cellcolor[rgb]{ .961,  .698,  .518} 0.130 & \cellcolor[rgb]{ .969,  .757,  .612} 0.071 \\
        CAM & BRO   & \cellcolor[rgb]{ .882,  .914,  .965} 0.673 & \cellcolor[rgb]{ .91,  .933,  .973} 0.659 & 0.471  & \cellcolor[rgb]{ .886,  .937,  .855} 0.500 & \cellcolor[rgb]{ .957,  .682,  .494} 0.141 & \cellcolor[rgb]{ .973,  .792,  .667} 0.048 \\
        (last) & Gini  & \cellcolor[rgb]{ .796,  .847,  .937} 0.718 & \cellcolor[rgb]{ .835,  .878,  .949} 0.697 & \cellcolor[rgb]{ .851,  .918,  .812} 0.520 & \cellcolor[rgb]{ .808,  .89,  .753} 0.536 & \cellcolor[rgb]{ .949,  .635,  .42} 0.176 & \cellcolor[rgb]{ .973,  .796,  .675} 0.045 \\
        & both  & \cellcolor[rgb]{ .8,  .851,  .937} 0.715 & \cellcolor[rgb]{ .8,  .851,  .937} 0.716 & \cellcolor[rgb]{ .8,  .886,  .741} 0.537 & \cellcolor[rgb]{ .882,  .933,  .847} 0.503 & \cellcolor[rgb]{ .949,  .627,  .404} 0.182 & \cellcolor[rgb]{ .973,  .8,  .682} 0.041 \\
        \midrule
        Grad & None  & \cellcolor[rgb]{ .847,  .886,  .953} 0.692 & \cellcolor[rgb]{ .973,  .98,  .992} 0.628 & \cellcolor[rgb]{ .949,  .973,  .933} 0.488 & 0.448  & \cellcolor[rgb]{ .949,  .627,  .408} 0.181 & \cellcolor[rgb]{ .976,  .827,  .729} 0.023 \\
        CAM & BRO   & \cellcolor[rgb]{ .851,  .886,  .953} 0.691 & \cellcolor[rgb]{ .965,  .973,  .988} 0.632 & \cellcolor[rgb]{ .969,  .984,  .961} 0.482 & \cellcolor[rgb]{ .937,  .965,  .918} 0.477 & \cellcolor[rgb]{ .949,  .608,  .376} 0.194 & \cellcolor[rgb]{ .98,  .859,  .773} 0.003 \\
        (all) & Gini  & \cellcolor[rgb]{ .769,  .824,  .929} 0.733 & \cellcolor[rgb]{ .855,  .894,  .957} 0.687 & \cellcolor[rgb]{ .843,  .91,  .796} 0.523 & \cellcolor[rgb]{ .878,  .929,  .843} 0.505 & \cellcolor[rgb]{ .949,  .612,  .384} 0.192 & \cellcolor[rgb]{ .984,  .867,  .784} -0.002 \\
        & both  & \cellcolor[rgb]{ .769,  .827,  .929} 0.732 & \cellcolor[rgb]{ .835,  .875,  .949} 0.698 & \cellcolor[rgb]{ .824,  .898,  .769} 0.530 & \cellcolor[rgb]{ .945,  .969,  .925} 0.474 & \cellcolor[rgb]{ .945,  .6,  .365} 0.201 & \cellcolor[rgb]{ .988,  .894,  .835} -0.022 \\
        \midrule
        CAM   & None  & \cellcolor[rgb]{ .275,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{0.989} & \cellcolor[rgb]{ .278,  .459,  .773} \textcolor[rgb]{ 1,  1,  1}{0.984} & \cellcolor[rgb]{ .537,  .737,  .404} \textcolor[rgb]{ 1,  1,  1}{0.621} & \cellcolor[rgb]{ .467,  .694,  .314} \textcolor[rgb]{ 1,  1,  1}{0.691} & \cellcolor[rgb]{ .933,  .506,  .216} \textcolor[rgb]{ 1,  1,  1}{0.268} & \cellcolor[rgb]{ .937,  .533,  .259} \textcolor[rgb]{ 1,  1,  1}{0.221} \\
        & BRO   & \cellcolor[rgb]{ .275,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{0.989} & \cellcolor[rgb]{ .29,  .467,  .776} \textcolor[rgb]{ 1,  1,  1}{0.977} & \cellcolor[rgb]{ .545,  .741,  .412} \textcolor[rgb]{ 1,  1,  1}{0.619} & \cellcolor[rgb]{ .447,  .682,  .29} \textcolor[rgb]{ 1,  1,  1}{0.701} & \cellcolor[rgb]{ .933,  .498,  .204} \textcolor[rgb]{ 1,  1,  1}{0.274} & \cellcolor[rgb]{ .937,  .537,  .263} \textcolor[rgb]{ 1,  1,  1}{0.219} \\
        & Gini  & \cellcolor[rgb]{ .271,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{0.990} & \cellcolor[rgb]{ .267,  .447,  .769} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.989}} & \cellcolor[rgb]{ .439,  .678,  .278} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.653}} & \cellcolor[rgb]{ .439,  .678,  .278} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.703}} & \cellcolor[rgb]{ .933,  .494,  .196} \textcolor[rgb]{ 1,  1,  1}{0.278} & \cellcolor[rgb]{ .941,  .553,  .29} \textcolor[rgb]{ 1,  1,  1}{0.208} \\
        & both  & \cellcolor[rgb]{ .271,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{0.990} & \cellcolor[rgb]{ .275,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.989}} & \cellcolor[rgb]{ .463,  .69,  .306} \textcolor[rgb]{ 1,  1,  1}{0.646} & \cellcolor[rgb]{ .451,  .686,  .294} \textcolor[rgb]{ 1,  1,  1}{0.699} & \cellcolor[rgb]{ .929,  .49,  .192} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.279}} & \cellcolor[rgb]{ .929,  .49,  .192} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.248}} \\
        \midrule
        TopRep & None  & \cellcolor[rgb]{ .267,  .447,  .769} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.991}} & \cellcolor[rgb]{ .286,  .463,  .776} \textcolor[rgb]{ 1,  1,  1}{0.979} & \cellcolor[rgb]{ .737,  .851,  .663} 0.556 & \cellcolor[rgb]{ .678,  .816,  .584} 0.595 & \cellcolor[rgb]{ .945,  .592,  .353} 0.205 & \cellcolor[rgb]{ .953,  .635,  .42} 0.153 \\
        & BRO   & \cellcolor[rgb]{ .286,  .463,  .776} \textcolor[rgb]{ 1,  1,  1}{0.982} & \cellcolor[rgb]{ .314,  .482,  .784} \textcolor[rgb]{ 1,  1,  1}{0.967} & \cellcolor[rgb]{ .957,  .976,  .945} 0.486 & \cellcolor[rgb]{ .627,  .788,  .518} 0.619 & \cellcolor[rgb]{ .945,  .58,  .337} 0.214 & \cellcolor[rgb]{ .957,  .667,  .471} 0.131 \\
        & Gini  & \cellcolor[rgb]{ .282,  .459,  .776} \textcolor[rgb]{ 1,  1,  1}{0.984} & \cellcolor[rgb]{ .271,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{0.988} & \cellcolor[rgb]{ .882,  .933,  .847} 0.510 & \cellcolor[rgb]{ .761,  .863,  .69} 0.558 & \cellcolor[rgb]{ .945,  .588,  .349} 0.208 & \cellcolor[rgb]{ .953,  .643,  .431} 0.148 \\
        & both  & \cellcolor[rgb]{ .271,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{\textbf{0.991}} & \cellcolor[rgb]{ .271,  .451,  .773} \textcolor[rgb]{ 1,  1,  1}{0.987} & \cellcolor[rgb]{ .741,  .855,  .667} 0.555 & \cellcolor[rgb]{ .682,  .82,  .592} 0.593 & \cellcolor[rgb]{ .945,  .596,  .357} 0.204 & \cellcolor[rgb]{ .949,  .631,  .416} 0.155 \\
        \bottomrule
    \end{tabular}%
    }
    \label{tab:addlabel}%
\end{table}%

We notice that the CAM-related attribution methods work poorly for the regression task CrippenLogP.
This was already observed in~\citealt{sanchez-lengeling_evaluating_2020}, where only the integrated gradients approach~\cite{sundararajan_axiomatic_2017} seemed to perform slightly better than other attribution methods.

We interpret this finding in the construction of the benchmark task itself.
The authors used a dataset with experimentally determined solubility~\cite{delaney_esol_2004} and consider as ground truth explanation the atom contribution for the water-octanol partition coefficient as calculated by the Crippen LogP empirical model~\cite{wildman_prediction_1999}.
Although logP and solubility are correlated, we assume that logP is not always a good explanation for a more complex endpoint like solubility, and therefore it should not be surprising if the built model's explanations do not align very well with the logP atom contributions.
A better task might be to build a model for logP and use the Crippen LogP attributions as ground truth explanations.
This experiment was not performed here to stay in the framework of the benchmark.

\subsection{Physicochemical endpoints}\label{subsec:physicochemical-tasks}

The results on the constructed benchmark dataset in the previous section encouraged us to evaluate our methods against expert opinion: a much costlier undertaking.

It is impossible to reliably and quickly calculate properties like solubility or binding affinity $ab\ initio$ from the chemical structure of a compound, let alone attribute the prediction to specific sites or functional groups.
When screening drug candidates, a medicinal chemist may synthesize many similar molecules with the desired activity while simultaneously trying to minimize or maximize some other property.

Thus, being able to guess which modifications may alter these properties is extremely helpful.
Here, we seek to mimic the chemists' intuition, and see if the BRO and Gini constraints may produce models that generate attributions that more closely match their instincts.

\subsubsection{Dataset}

The data used for building the multitask GCNN model is a dataset of measured physicochemical properties for small molecules from 10 different assays.
Extensive discussion of the preparation and characteristics of the dataset can be found in our previous work~\citealt{montanari_modeling_2019}.
There are a total of 537,443 compounds with assays covering properties such as solubility, lipophilicity (logD at two different pHs), melting point, human serum albumin binding and membrane affinity; 79\% of the compounds are measured for only one endpoint, 11\% for two, 9\% for 3, and 1\% four or more.

All ten endpoints along with their frequencies and the correlation between pairs is shown in Figure~\ref{fig:gini_correlations}.
We also show the cosine similarities of the rows of the trained output weights corresponding to each endpoint.
The similarities of both the baseline and Gini-constrained model mimic the underlying correlation between the measurements, but the Gini-constrained version is sparser.
This may imply it has learned a more specific relationship between the endpoints than merely the data distribution.

Seven cross-validation folds were generated using $k$-means clustering on the ECFC6 fingerprints~\cite{rogers_extended-connectivity_2010}.

\begin{figure}
    \vskip 0.2in
    \begin{center}
        \centerline{\includegraphics[trim=40 80 250 80, clip, width=\columnwidth]{figures/correlations.pdf}}
        \caption{
        The first row shows the Pearson correlation between each pair of endpoints, along with a table giving a description and count of each.
        The second row shows the cosine similarity of the rows of an output weight matrix for an unconstrained and Gini-constrained model.
        }
        \label{fig:gini_correlations}
    \end{center}
    \vskip -0.2in
\end{figure}

\subsubsection{Network Architecture}

The model, initially built in Tensorflow with the DeepChem library ~\cite{ramsundar_deep_2019} was converted to Pytorch Geometric for easier access and customization~\cite{fey_fast_2019}.
We tried as much as possible to follow the DeepChem graph convolution mechanism which is an implementation of the~\citealt{duvenaud_convolutional_2015} algorithm.

Input node features are computed with DeepChem and consist of 75 atomic properties: number of radical electrons, whether the atom is aromatic, and one-hot encoding on each of the atom type, degree, formal charge, and hybridization.
Two convolutional layers are then applied, then a GAP layer going from individual node features to a global graph encoding.
A hyperbolic tangent function is applied to the graph encoding before the final linear layer.

Our models were trained using the ADAM optimizer~\cite{kingma_adam_2017} for forty epochs with exponential learning rate decay with a base of 0.97 decaying every 1000 steps.
No hyperparemeter search is performed: models with either or both of BRO and Gini regularization use the same hyperparameters as the baseline models.
Model code is available in the Supplementary Material.

\subsubsection{Survey of Medicinal Chemists}

To test our methods in a realistic setting, we prepared a survey to gather opinions from human experts.
We collected public compounds with reported measured solubility~\cite{sorkun_aqsoldb_2019}, logD~\cite{alelyunas_high_2010, low_optimised_2016} or melting point~\cite{williams_melting_2015}.
These compounds were chosen for their problematic properties: they were either very insoluble, having a high logD, or a low melting point.

We then used the multitask GCN built on physicochemical data (in both the constrained and non constrained version) to predict the solubility, logD or melting point of those molecules.
Because the data is collected from public sources, potentially many different assays were used to measure the different endpoints of interest.
Therefore, an exact match of the predictive model (built on proprietary established assay data) with the publicly reported values is not expected.
Since we focused on problematic molecules, we compared predictions and reported experimental values qualitatively only.
For example, insoluble molecules with a predicted solubility over 30 mg/L were discarded.
In general, molecules with grossly inaccurate predictions by the models were excluded from the survey.
In total, 10 molecules were kept for solubility, 8 for logD and 6 for melting point.
Attribution methods were then applied on each predicted molecule: either CAM (our baseline, using the unconstrained model), CAM$_{\mathrm{BRO+Gini}}$ (CAM applied to the Gini-sparsified and BRO-disentangled model), TopRep$_{\mathrm{BRO+Gini}}$ (CAM using only the top weight from the constrained model output), or a random attribution map (any node representation generated by the constrained model, selected randomly).

The users always had the possibility to skip a question or select a negative answer (``No answer convinces me'').
The attribution maps were plotted on the molecule structure using the RDKit's SimilarityMap functionality~\cite{landrum_rdkit_2006}.
An example question as shown to the medicinal chemists is shown in Figure~\ref{fig:medchemq}.
15 medicinal chemists answered the 24 questions and the results are shown in Figure~\ref{fig:survey}.
The participants were all employed at Bayer on two different sites in Germany, and were at different stages of their career.
They had no previous explicit experience with such specific molecules or tasks although the molecules are known drugs and the tasks are tasks they reason about on a daily basis.

\begin{figure}[ht]
    \vskip 0.2in
    \begin{center}
        \centerline{\includegraphics[trim=340 170 340 200, clip, width=\columnwidth]{figures/medchemq.pdf}}
        \caption{
        An example question from the survey of medicinal chemists: ``Which atoms drive the low solubility of the molecule? (Green: lower solubility / Magenta: Higher solubility.''
        This shows one of the query molecules for solubility taken from~\cite{sorkun_aqsoldb_2019}  with various site attributions for solubility (LOO task).
        Answers were randomly ordered for each question, blind to both us and the medicinal chemists.
        In this case we have a) CAM$_{\mathrm{BRO+Gini}}$ b) random c) CAM (baseline) d) TopRep$_{\mathrm{BRO+Gini}}$.
        }
        \label{fig:medchemq}
    \end{center}
    \vskip -0.2in
\end{figure}

\begin{figure}
    \vskip 0.2in
    \begin{center}
        \centerline{\includegraphics[trim=40 80 320 80, clip, width=\columnwidth]{figures/survey_results.pdf}}
        \caption{
        Results of survey of medicinal chemists.
        Not all participants answered all questions.
        The plot shows the distribution of responses for each option for each endpoint.
        For example: for logD questions, a median of 7 respondents (ranging from 0 to 10) picked CAM$_{\mathrm{BRO+Gini}}$, with 50\% of the logD questions receiving between 4 to 8 votes for CAM$_{\mathrm{BRO+Gini}}$.
        }
        \label{fig:survey}
    \end{center}
    \vskip -0.2in
\end{figure}

CAM$_{\mathrm{BRO+Gini}}$ and TopRep$_{\mathrm{BRO+Gini}}$ are the most voted attribution methods among the 24 questions, with CAM$_{\mathrm{BRO+Gini}}$ being favored for logD and TopRep$_{\mathrm{BRO+Gini}}$ for solubility and melting point.
Across all endpoints, they are both picked more often than would be expected at random (binomial test, p-value=0.01 and p-value $<$ 0.001 respectively).
Surprisingly, Baseline CAM cannot be distinguished from the Random attribution result (binomial test, p-value=0.07).

This real-life experiment shows that, with a predictive model that is in practice useful for medicinal chemists, the regularization constraints (Gini and BRO) lead to significantly preferred attribution maps.
We also note that the logD endpoint is the easiest for chemists to rationalize and led to the most imbalanced votes in favor of CAM$_{\mathrm{BRO+Gini}}$ (coefficient of variation $\sigma/\mu=0.95$).
Solubility and melting point are less straightforward, and, accordingly, chemists tend to disagree more in their voting ($\sigma/\mu=0.86$ and 0.59 respectively).

All survey questions with attribution maps, including aggregated responses and answer key, are available in the Supplementary Material.

\subsection{Model Performance}\label{subsec:model-performance}

The Gini and BRO regularizations have a slight negative impact on the classification or regression metrics of the models.
The impact on the AUROC scores for the ``Benzene'' and ``Amine-Ether-Benzene'' classification tasks and the Pearson correlation for the ``CrippenLogP'' regression task described in Section~\ref{subsec:attribution-benchmarks} are illustrated in Figure~\ref{fig:auroc}.

As with the Attribution AUROC, it is nearly impossible to improve the classification AUROC of the Benzene task: all models are extremely close to perfect classification.
Even in this regime, it is clear that the BRO layer negatively effects performance.
In the Amine-Ether-Benzene task, the differences are not significant.
This may be because both BRO and Gini regularization were designed with multitask models in mind, and the Amine-Ether-Benzene is really a multitask problem in disguise.
Finally, adding the BRO and Gini constraints to the CrippenLogP task does not drastically alter model performance, despite doing little to improve interpretability.

\begin{figure}
    \vskip 0.2in
    \begin{center}
        \centerline{\includegraphics[trim=35 225 390 80, clip, width=\columnwidth]{figures/auroc.pdf}}
        \caption{
        Effect of regularization techniques on the evaluation metric for the Benzene, Amine-Ether-Benzene, and CrippenLogP tasks.
        }
        \label{fig:auroc}
    \end{center}
    \vskip -0.2in
\end{figure}

The various endpoints of the multitask models trained on physicochemical data described in Section~\ref{subsec:physicochemical-tasks} are affected unevenly.
The cross-validation $R^2$ scores are shown in Table~\ref{tab:admet_r2}.
The solubility endpoints LOP and LOX are strongly affected.
These are the two least represented assays in the dataset, with 2,334 and 7,392 out of 537,443 compounds, respectively.

\begin{table}[htb]
  \centering
  \small
  \caption{Effect of BRO and Gini regularizers on predictive performance for all physicochemical endpoints.
  Mean of scaffold-split cross-validation $R^2$ score and standard deviation in parenthesis.}
  \label{tab:admet_r2}
    \resizebox{\columnwidth}{!}{
    \begin{tabular}{lrrrr}
    \toprule
          & Baseline & BRO   & Gini  & BRO + Gini \\
    \midrule
    LOD   & \cellcolor[rgb]{ .647,  .647,  .647} 0.85 (0.03) & \cellcolor[rgb]{ .682,  .686,  .255} 0.82 (0.03) & \cellcolor[rgb]{ .212,  .686,  .733} \textcolor[rgb]{ 1,  1,  1}{0.83 (0.03)} & \cellcolor[rgb]{ .29,  .6,  .29} \textcolor[rgb]{ 1,  1,  1}{0.81 (0.04)} \\
    LOA   & \cellcolor[rgb]{ .667,  .667,  .667} 0.82 (0.04) & \cellcolor[rgb]{ .694,  .698,  .282} 0.80 (0.04) & \cellcolor[rgb]{ .227,  .69,  .737} \textcolor[rgb]{ 1,  1,  1}{0.82 (0.04)} & \cellcolor[rgb]{ .318,  .616,  .318} \textcolor[rgb]{ 1,  1,  1}{0.79 (0.04)} \\
    LOM   & \cellcolor[rgb]{ .835,  .835,  .835} 0.56 (0.13) & \cellcolor[rgb]{ .863,  .863,  .671} 0.53 (0.13) & \cellcolor[rgb]{ .659,  .863,  .886} 0.53 (0.12) & \cellcolor[rgb]{ .71,  .835,  .71} 0.51 (0.13) \\
    LOH   & \cellcolor[rgb]{ .875,  .875,  .875} 0.50 (0.07) & \cellcolor[rgb]{ .89,  .894,  .741} 0.48 (0.09) & \cellcolor[rgb]{ .749,  .902,  .918} 0.47 (0.09) & \cellcolor[rgb]{ .808,  .89,  .808} 0.44 (0.10) \\
    LMP   & \cellcolor[rgb]{ .914,  .914,  .914} 0.44 (0.08) & \cellcolor[rgb]{ .91,  .91,  .784} 0.45 (0.08) & \cellcolor[rgb]{ .792,  .918,  .929} 0.44 (0.08) & \cellcolor[rgb]{ .82,  .898,  .82} 0.43 (0.09) \\
    LON   & \cellcolor[rgb]{ .867,  .867,  .867} 0.51 (0.09) & \cellcolor[rgb]{ .89,  .894,  .741} 0.48 (0.09) & \cellcolor[rgb]{ .718,  .886,  .906} 0.49 (0.08) & \cellcolor[rgb]{ .792,  .882,  .792} 0.45 (0.10) \\
    LOO   & \cellcolor[rgb]{ .875,  .875,  .875} 0.50 (0.20) & \cellcolor[rgb]{ .902,  .906,  .773} 0.46 (0.24) & \cellcolor[rgb]{ .749,  .902,  .918} 0.47 (0.20) & \cellcolor[rgb]{ .792,  .882,  .792} 0.45 (0.23) \\
    LOP   & \cellcolor[rgb]{ .894,  .894,  .894} 0.47 (0.15) & \cellcolor[rgb]{ .918,  .918,  .8} 0.44 (0.19) & 0.30 (0.40) & \cellcolor[rgb]{ .945,  .969,  .945} 0.34 (0.34) \\
    LOQ   & \cellcolor[rgb]{ .835,  .835,  .835} 0.56 (0.11) & \cellcolor[rgb]{ .867,  .867,  .686} 0.52 (0.14) & \cellcolor[rgb]{ .643,  .859,  .882} 0.54 (0.11) & \cellcolor[rgb]{ .722,  .843,  .722} 0.50 (0.15) \\
    LOX   & \cellcolor[rgb]{ .859,  .859,  .859} 0.52 (0.06) & \cellcolor[rgb]{ .89,  .894,  .741} 0.48 (0.07) & \cellcolor[rgb]{ .792,  .918,  .929} 0.44 (0.09) & \cellcolor[rgb]{ .82,  .898,  .82} 0.43 (0.09) \\
    \bottomrule
    \end{tabular}%
    }
\end{table}%

It is possible that hyperparameter tuning could recover these performance losses.
Anecdotally, we note that adding additional graph convolutional layers seems to help.
This can, however, dilute the explanations which become further ``de-localized'' with each convolution.

\section{Conclusion}

We describe and implement two new regularization techniques: Batch Representation Orthonormalization and Gini regularization.
We show qualitatively that these techniques disentangle node representations and force models to make predictions using fewer of them.

We demonstrate that models trained with these constraints generate better site attributions on a benchmark dataset for many attribution methods.
Further, we show that for models trained on assay data of interest to medicinal chemists, human experts significantly prefer attribution maps generated from models trained with the constraints introduced in this paper.

While we give an exact definition for the BRO constraint in Equation~\ref{eq:BRO}, the choice of the vector 2-norm is arbitrary.
The novelty of our approach is normalizing the node representations per graph, and it is likely that other norms may yield better results in other circumstances.
Similarly, while the Gini coefficient has desirable properties for this application, other measures of dispersion could also be explored.

Finally, our methods could be extended to graph architectures which exploit edge features.
Future work may explore the separate or joint orthonormalization of node and edge features.

\section*{Acknowledgements}

We would like to thank the Bayer medicinal chemists based in Berlin and Wuppertal for their essential feedback on our work.
We would also like to thank Andreas Goeller, Marco Bertolini, Jorge Kageyama, and Tuan Le for their helpful input.
Funding in direct support of this work: Bayer AG Life Science Collaboration (``Explainable AI'').

redpajama_set_name: RedPajamaArXiv


Isaiah 45:1-7 – Cyrus of Persia becomes the instrument of God's power. Cyrus, who doesn't even know God! Yet God uses him to preserve His people and thereby glorify His name. God expands His military efforts through many kings – see prophecies in Daniel 2 and 7.
Jonah's preaching saves the Assyrians from judgment, preserving them so that later they become the instruments of God's hand – against Israel!
By the time of the Messiah, God no longer wields holy wars to achieve His goals. Instead, the Messiah fights His battles on a spiritual plain. Through Him, God raises up the church to engage in spiritual warfare. (The Crusades were totally misguided!) God will fight evil again, but that battle is reserved for the final judgment.


Hey .. I'm Vanessa !
(TL;DR: I started with just myself building the business over the years to have a team of pet sitters and office staff to changing in the last two years into a boutique personal pet care service).
Whilst I feel I am reliable, trustworthy, competent and most importantly an avid animal lovers ( yes, ALL animals ). This is a decision that you personally will have to make when you meet me !
I have been owned by several cats throughout my life. My most recent "owner" is Marnie and current "mate" to Garry. I am also a former volunteer (and foster carer hence the reason why I say I'm a foster failure – read how Marnie came into my life). Also formerly involved with Glamour Pusses fundraising for the Animal Welfare League Of QLD (for a few years). I'm the founder/head admin of the Gold Coast Lost and Found Pets page.
I've also had the number 1 most active (and loved) Periscope (live video streaming) Show and now a popular Snapchat following!
YES – I have current references from current and past clients who have contracted my services.
I love the color blue in all its variety.
I regard myself as having vegan inspired reductionist diet.
I have been using the internet consistently since late 1993.
I am an avid user of social media and the internet as a whole.
I love dark (healthy) chocolate and all varieties cheese.
I have lived on the Gold Coast for most of my life yet never lived in one place on the Gold Coast.
I lived in the USA for 6 months attending a Florida High School.
I enjoy doing the dishes. Something about that hot water full of suds that is calming to me.
I enjoy hydro-bathing dogs (and do not mind the water splash on me!).
I've always enjoyed the company of the animals in my life. They keep me grounded and sane.
I've been a a fan of Garfield ( the comic book cat ) for over a decade. Now with the popularity of YouTube I'm also a huge fan of Simon's Cat.
Anything else you would like to know, Just Ask!


text:
Home Lifestyle Art-Culture Aussie band The Buckleys to bring debut album to India via virtual...
Aussie band The Buckleys to bring debut album to India via virtual gig
SYDNEY, Sep 10: Australian sibling band, The Buckleys, are excited to perform the songs of their debut album, Daydream, for Indian fans via a virtual gig.
The Buckleys are a country pop trio comprising lead vocalist-guitarist Sarah, bassist Lachlan and Molly, a vocalist who also plays the mandolin and the piano or the organ.
The trio announced a special live performance on the album's release date, September 25. The concert, titled "Daydream With The Buckleys, Live From Byron Bay", will include all the album tracks. They performed for the Indian audience for the first time in May this year.
"We are beyond excited to be performing our debut album 'Daydream' live for India and Sri Lanka," said The Buckleys in a joint statement.
"We were so warmly embraced by the Indian and Sri Lankan community following our World Virtual Tour and it's such an exciting moment for us now with the release of our debut album, we can't wait to share with you. Special thanks to BookMyShow for connecting us with this beautiful part of the world, we can't wait to come play in person one day," they added.
Earlier this year, the trio recreated the personalised "live" experience in the time of social distancing, by performing virtual tours across North and South Americas, Europe, the Middle East, Asia, Australia and New Zealand.
Previous articlePM announces deal for 84mn Covid-19 vaccine doses
Next articleIndian soldiers tell Chinese troops to stop incursion attempts, put up barbed wire
Miss Universe 2021 Harnaaz Sandhu gets candid about her winning experience and future

redpajama_set_name: RedPajamaCommonCrawl


1.	Download and install the iTwinkle Wi-Fi App from App Store (iOS) or Play Store (android).
2.	Ensure Wi-Fi is set to ON in your device's settings.
3.	Plug in all the sets you wish to setup to a power source. The solid red indicator light (last bulb on strand) will turn solid green when it is ready to connect to your device.
4.	Open the iTwinkle Wi-Fi App. Tap 'OK' to proceed. Once on the 'Direct Connection' screen, tap 'Code multiple sets'. If using iOS, you will be prompted to visit your device's settings to access available Wi-Fi networks. Once there, select the 'iTwinkle WiFi' network. Enter the default network password '20152015' when prompted. You are now connected to the iTwinkle Wi-Fi network and can return to the App.
5.	The App will send an initial command to one of the plugged in sets. The set will display an alternating pattern of red and white LEDs indicating it is beginning the coding process.
6.	The App will ask you to assign a code number to your set by selecting a number using the arrows on the screen. You must assign #1 to the first set that you code. All additional sets must follow in sequential order for the sets to operate properly. (i.e. set #2 is coded #2, set #3 is coded #3, etc.) We recommend marking each set to identify its code number once assigned.
7.	After coding is successful, the App screen will display two symbols, a (+) sign for adding and coding additional sets, and a check mark for completing the pairing of the connected sets. Follow the instructions in step 6 to code your additional sets. If using iOS, you will need to follow the same procedure for selecting the 'iTwinkle WiFi' network as described in step 4. Repeat the process for each set you are coding. Once finished, tap the check mark.
8.	The App will confirm that your sets are connected. You will now be able to access the features of the App to use with all of your connected sets. You must be within the operating range (33') and connected to the network "iTwinkle WiFi 01" for your sets to communicate properly. Each set in sequential order (#1 - #2 - #3) must also be within the designated operating range (33') of each other in order for the sets to communicate properly. Verify that you are connected to the Wi-Fi network 'iTwinkle WiFi 01' and return to the App. Tap 'OK', and then tap 'Connect' to access the App features.


The Crux: Can Gaming Be Regulated?
In the dark recesses of the web hide sinister plots to trap the young. The alleged suicide of a young 14-year-old boy in Mumbai has suddenly woken us up to 'Blue Whale' suicide game. An online gaming trend that has allegedly taken 130 lives in Russia where the game was invented. Parents and teachers are worried and the government now says it is looking at how to regulate social media gaming platforms that could prove to be potentially dangerous.


Dianne Dwyer Modestini, '73, internationally renowned conservator of nineteenth-century Italian paintings, became a star in the art world in 2008 when she discovered Salvator Mundi (Savior of the World) created by Renaissance artist Leonardo da Vinci. The painting was the first da Vinci discovered in more than 100 years and recently sold at auction for over $400 million.
Modestini will talk about discovering and restoring the lost masterpiece on Monday, April 9, at 1:30 p.m. at the Burchfield Penney Art Center. She also will discuss her newly released book Masterpieces (Cadmo, 2018), which provides a window into the world of art conservator and supplements the memoirs of her late husband, the prominent restorer Mario Modestini.
Faculty from Buffalo State's Patricia H. and Richard E. Garman Art Conservation Department invited Modestini to campus for this free event.
Modestini discovered the da Vinci after an art dealer asked her to restore a painting in 2005. Over six years of painstaking work, including removing a clumsy repainting job, she discovered its true origins.
"One evening, I was reconstructing a loss above the lip when I had a sort of revelation that this Salvator Mundi could only be by Leonardo himself because of the seamless nature of the transitions from shadow to highlight, the complete absence of brushwork, and similar craquelure patterns," said Modestini, who lives in New York City and Florence, Italy. She operates a private art conservation business in New York and serves as the Kress Paintings Conservator and research professor at New York University's Conservation Center of the Institute of Fine Arts.
In 2008, da Vinci experts concurred that Modestini's find was indeed an original. The painting was included in the 2012 exhibition Leonardo da Vinci, Painter at the Court of Milan at the National Gallery in London.
Modestini earned her master's degree and certificate of advanced study at the Cooperstown Graduate Program in the Conservation of Historic and Artistic Works, which moved to Buffalo State College in 1983 and is now known as the Patricia H. and Richard E. Garman Art Conservation Department.
For more information on the talk, call (716) 878-5025.


Page 273 - Gallery Design of Home And Furniture | Dumpjaygarner Pool Paving Ideas. Shower Water Softener. Madeline Weinrib Rugs.
collection of galleries from Home And Furniture like Pool Paving Ideas. Shower Water Softener. Madeline Weinrib Rugs. and other designs you might like Four Poster Canopy Bed. Teal Bedroom Ideas. Macys Karastan Rugs. Stained Glass Lamp Patterns. Patio Chaise Lounge Chair. Beautyrest Bed. Bed Frames And Headboards.


text:
Q: Get item from first list of list inside list - java 8 I have two lists and I need check the max rate and when find it, retrieve bankConversionFees item
for (BankConversionFees bankConversionFees : allFees) {
    for (FeesHistory hist : bankConversionFee.getFeesHistory()) {
        //check FeesHistory with max value of hist.getRate()
    }
}

The classes:
public class BankConversionFees{
 private String name;
 private List<FeesHistory> feesHistory;
}

public class FeesHistory {
private Double rate;
}

I achieved the result with the code below but I'm not sure if it's the best way
Comparator<FeesHistory> comparator = Comparator.comparingDouble(FeesHistory::getRate);
FeesHistory maxFees = allFees.stream() //
                .filter(bank -> !bank.getFeesHistory().isEmpty()) //
                .map(bank -> bank.getFeesHistory().stream().max(comparator).get()) //
                .max(comparator).get();

Optional<BankConversionFee> maxBank = allFees.stream() //
                .filter(bank -> !bank.getFeesHistory().isEmpty()) //
                .filter(bank -> bank.getFeesHistory().contains(maxFees)) //
                .map(b -> b) //
                .findFirst();

A: Conceptually this can be reframed as trying to get the "greatest" BankConversionFees, where "greatest" means the one containing the single greatest individual rate.
This can be represented in a simple, straightforward manner using Stream.max(Comparator) with a comparator that compares the BankConversionFees based on the largest rate (treating any empty fee history lists as smaller than any non-emtpy ones):
Comparator<BankConversionFees> comparator = Comparator.comparing(
        f -> f.getFeesHistory().stream().map(FeesHistory::getRate).max(Comparator.naturalOrder()),
        Comparator.nullsFirst(Comparator.comparing(o -> o.orElse(null))));

return allFees.stream().max(comparator);

If you want to continue to return an empty optional in the case where no BankConversionFees has any rates, as opposed to returning one of the fees without rates, you can filter accordingly:
Comparator<BankConversionFees> comparator = Comparator.comparing(
        h -> h.getFeesHistory().stream().map(FeesHistory::getRate).max(Comparator.naturalOrder()).orElseThrow());

return allFees.stream().filter(f-> !f.getFeesHistory().isEmpty()).max(comparator);

redpajama_set_name: RedPajamaStackExchange


Inspired by human vision, Prophesee's technology uses a patented sensor design and AI algorithms that mimic the eye and brain to reveal what was invisible until now using standard frame-based technology.
Prophesee's machine vision systems open new potential in areas such as autonomous vehicles, industrial automation, IoT, security and surveillance, and AR/VR. One early application was in medical devices that restore vision to the blind.
Prophesee's technology is fundamentally different from the traditional image sensors – it introduces a paradigm shift in computer vision: event-based vision.
FRAME-BASED: A conventional camera takes an arbitrary number of frames per second, usually around 30 fps, in which all pixels record in synchrony regardless of what is going on in the scene.
EVENT-BASED: In Prophesee patented sensor, each pixel is independent and only records when it senses a change or movement. The information created does not arrive frame by frame. Rather, movement is captured as a continuous stream of information.
Prophesee sees between the frames, where all traditional frame-based systems are blind.
Prophesee technology functions like human vision.
Something moving at high speed will be sampled at a high rate. Something that moves slowly will be sampled at a lower rate, and something that does not change, will not be sampled at all. No excess data is created.
This drastically reduces the power, latency and data processing requirements imposed by traditional frame-based systems.
Onboard is the first device to combine Prophesee's patented sensor and AI algorithms.
Onboard has embedded processing capabilities for Industry 4.0 applications, such as vibration measurement or high-speed counting.
It is now possible to perform theses tasks using minimal power and computational requirements thanks to the very nature of event-based vision, which perceives all the essential information, while overlooking the irrelevant.
Prophesee is based in Passage de l'Innovation in Paris, with local offices in China, Japan, USA and is driven by a team of 80 visionary Engineers and Researchers and is backed by leading international investors including 360 Capital Partners, Supernova Invest, iBionext, Intel Capital, Renault Group, and Robert Bosch Venture Capital.
With over 30 global recognitions and 51 patents, PROPHESEE stands at the forefront of Event-Based Computer Vision.
The first Robot Operating System (ROS) driver for PROPHESEE's Event-Based Vision is here. It is time to experience the power of Event-Based Vision for your robotics applications and reach extreme performance levels in Speed, Robustness and Efficiency for SLAM, Navigation, Obstacle Avoidance, Swarm Robotics, Bio-Inspired Robotics and many others.
Luca Verre presented the Prophesee view of the changing, connected world at MEMS World Summit held in Shanghai, China in March 2019.
Luca Verre delivered a keynote speech on wide-scale adoption of event-based vision processing technology at Image Sensors Europe.


On this page you will find our current Kearns campus office, special-ed, discovery, kitchen, and other staff. The pictures and biographies here were created by our 2017-18 second-grade class!
Ms. Esther Blackwell has worked in education for over 20 years. She has taught students in all grades and covered many subjects. She spent the largest amount of time working with students in grades 7-10, teaching Social Studies and English Language Arts which she thoroughly enjoyed! Ms. Esther attended the University of Utah and Western Governors University and this is the 8th year that Ms. Esther has been a school administrator. It is hard for Ms. Esther to pick a favorite Design Principle because she loves them all, however one that particularly stands out and drew her to work at Entheos, is "Service and Compassion". Outside of school, Ms. Esther loves hiking and exploring, gardening, and spending time with family.
Mrs. Dina works at Entheos Academy. She is the assistant director. She helps the director run the school. She helps students learn. Her favorite Design Principle at Entheos is Solitude and Reflection. This means I need time to be with myself. Mrs. Dina likes this Design Principle because it gives us time to think about what we have learned. Mrs. Dina says that the thing she loves most about Entheos is the service learning. Her favorite hobbies are reading and watching movies. Mrs. Dina says that her favorite author is Jane Austen. Someday she hopes to travel to Paris for a vacation because she loves French food. She attended University of Utah and University of Nevada, Reno. We are so glad to have Mrs. Dina here at Entheos.
Miss Dawn works at Entheos Academy. Miss Dawn keeps track of Mr. Robin's calendar. She also takes care of students. Miss Dawn's favorite Design Principle is The Responsibility for Learning. This means I am responsible for my learning and I help others. She loves learning and she thinks it's really important to learn all we can. We can help each other be our best selves. She loves everything about Entheos. Her favorite hobbies are quilting and she loves camping. Her favorite book is Sarah Eden. Someday she wants to go to the Great Redwoods for a vacation because she wants to see the great trees and the ocean. Miss Dawn went to BYU Idaho and LDS Business College. We are so glad to have Miss Dawn here at Entheos.
Ms. Misty Startup works at Entheos Academy. She is the front office Secretary. Her favorite design principle is The Having of Wonderful Ideas. She loves to watch the students do new things. Ms. Startup says that the thing she loves most about Entheos is talking to the parents that come into the school. She also likes to read and do crafts as she spends time with her family. She says that Jodi Picoult is her favorite author. Someday Ms. Startup hopes to travel to Washington D.C. with her family. She wants to learn and see all of the interesting things that are there. It is important to make goals and to follow your dreams. She attended Weber State University and Salt Lake Community College. We are so glad to have Ms. Startup or Misty as we all like to call her at Entheos.
Mr. Gardner works at Entheos Academy. He is a Special Educator. He helps students who need extra help in school. His favorite Design Principle at Entheos is The Having of Wonderful Ideas. He likes this Design Principle because he likes being creative and trying new things. Mr. Gardner says that the thing he loves most about Entheos is how everyone works together. He likes to go running and play basketball. He says Resilience Break Through is his favorite book. Some day he hopes to travel to Italy for a vacation because he lived there for two years. He attended BYU. We're so glad to have Mr. Gardner at Entheos.
Ms. Melinda works at Entheos Academy. She sets up meetings and helps the teachers. Her favorite design principle at Entheos is: Empathy and Caring. This means to care for others and others care for me. She likes this design principle because she likes to help other people. She says that the thing she loves most about Entheos is She loves the teachers. She also likes to sing and listen to music. She says that The Goose Girl is her favorite book. Someday she hopes to travel to Hawaii for a vacation because she has never been there. It is important to make goals and follow your dreams. Ms. Melinda attended BYU. We are so glad to have her here at Entheos.
Mrs. Tandiman works at Entheos Academy. She helps students with math and reading. Her favorite Design Principle at Entheos is The Natural World. This means nature is our teacher. She likes this Design Principle because she strongly believes that we can learn a lot of things when we are out in the natural world. Nature teaches us. She says that the thing she loves most about Entheos is that we all work together to learn. She likes to hike and read. She says that mystery books are her favorite books. Someday she hopes to go on a cruise for a vacation because she wants to go on a big boat. She attended BYU Hawaii. We are so glad to have Mrs. Tandiman here at Entheos.
Mrs. Lisa Works at Entheos Academy as a Discovery Coordinator. She finds and organizes classes for Discovery and also directs the school musical. Her favorite Design principle is The Primacy of Self-Discovery. This means I am here to discover what I can do. She says that the thing she loves most about Entheos is fieldwork. She also likes to direct musicals for city councils. Her favorite book is Princess Bride. Someday she hopes to travel to New York for a vacation because she likes broadway. It is important to make goals and to follow your dreams. She attended college at Weber State University. We are so glad to have Mrs. Lisa here at Entheos.
Ms. Denise Taylor works at Entheos Academy. She runs Discovery, organizes and teaches. Her favorite Design principle at Entheos is Collaboration and Competition. This means, we work together as friends, I compete with myself. She likes this Design Principle because she loves sports. Ms. Denise says that the thing she love most about Entheos is it gives children many opportunities to learn. She also likes to sew and baking. She says that her favorite author is Dr. Seuss. Someday Ms. Denise hopes to travel to Hawaii for a vacation because she has never been there. It is important to make goals and follow your dreams. She attended Golden West University. We are so glad to have Ms. Denise here at Entheos.
Ms. Raegan Nielsen Works at Entheos Academy. She decides what's for lunch and breakfast. Her favorite Design Principle at Entheos is Success and failure. This means, Success is sweet but mistakes are good food. She likes this Design Principle because We can't succeed without failing first. She says that the thing she loves most about Entheos is Discovery. She also likes to Read. She says that To kill a Mockingbird is her favorite book. Someday She hopes to travel to Europe for a vacation because It would be fun to be on a vacation for a year. It is important to make goals and to follow your dreams. We are so glad to have her here at Entheos.
Mrs. Shirley works at Entheos. She is the kitchen manager. She orders the food and cooks the food. Her favorite Design Principle is The Responsibility for Learning. It is her favorite because she likes to learn and help others learn. She says that the thing she loves about Entheos is being involved with the children. Mrs. Shirley also likes reading and making quilts. She says that James Harriot is her favorite author. Someday she hopes to travel to Brazil for a vacation because it is a beautiful place. Mrs. Shirley attended Ricks College. We are so glad to have Mrs. Shirley here at Entheos.
Mrs. Jessica works at Entheos Academy. She is a lunch lady. Her favorite Design Principle at Entheos is Empathy and Caring. This means I care for others and others care for me. She likes this Design Principle because she likes to help others in any way she can. Mrs. Jessica says that the thing she loves most about Entheos is the friendly environment. Her favorite hobby is spending time with her family. She says that John Grisham is her favorite author. Someday Mrs. Jessica hopes to travel to Scotland for a vacation because she'd like to see the castles. Mrs. Jessica attended Hillsdale FWB College. We are so glad to have Mrs. Jessica here at Entheos.
Violet works at Entheos Academy. Her favorite Design Principle is Empathy and Caring. This means caring for others. Violet likes this Design Principle because it's important to care for others. What she loves most about Entheos is the people and kids. Her favorite hobby is camping. The Outsider is her favorite book. Someday she hopes to travel to Hawaii for a vacation because it is pretty. She attended graduated from Kearns High School. We are so glad to have Violet here at Entheos Academy.
Rahjaun works at Entheos Academy. Her favorite Design Principle at Entheos is empathy and caring. This means I care for others; others care for me. Rahjaun likes this Design Principle because she really likes helping people. She says that the thing she loves most about Entheos is all the good kids. She also likes to go camping and fishing.
She says her favorite books are scary and her favorite author is Stephen King. Someday Rahjaun hopes to travel to Hawaii for a vacation because there are lots of pretty flowers. It is important to make goals and to follow your dreams. We are so glad to have Rahjaun here at Entheos.
Mrs. Janey works as the EL School Designer. She helps school leaders know how to help kids learn and she also coaches teachers. Her favorite Design Principle is Empathy and Caring. This means I care for others and others care for me. Mrs. Janey likes this Design Principle because it is most important to be kind and help others. Janey says that the thing she loves most about Entheos is it is a safe place to learn. Mrs. Janey likes to travel to new places and she likes to read. Janey says that Number the Stars and the Giver by Lois Lowry are her favorite books. Someday Mrs. Janey hopes to travel to Fiji for a vacation because it is interesting and has cool beaches. Mrs. Janey attended Utah State University and Boston college. We are so glad to have Mrs. Janey here at Entheos.
Ms. McDaniel works at Entheos Academy. Ms. McDaniel works in the Library putting books away, checking books out for the students and doing fun activities for the students at Entheos. Ms. McDaniels favorite Design Principle at Entheos is Empathy and Caring. This means I care for others and others care for me. Ms. McDaniel likes this design principle because she likes taking care of family and others and she likes to be taken care of. The thing she likes most about Entheos is EVERYTHING! Ms.McDaniel also likes doing yard work, Shopping and Crafts. Her favorite books are anything written by Dr. Seuss. Someday Ms. McDaniel hoopes to travel to beach for a vacation because she loves the sunshine. It is important to make goals and follow your dreams. Ms. McDaniel attended Ricks College in Idaho. We are so glad to have Ms. McDaniel her at Entheos Academy.
Mrs. Larsen works at Entheos Academy. She is a keyboarding teacher and helps with Service Learning. Her favorite Design Principle at Entheos is Diversity and Inclusion. This means our differences make us stronger. She likes this Design Principle because everyone is unique and makes the world a better place to live in. Mrs. Larsen says that the thing she loves most about Entheos is that she loves that all the students get a chance to learn their way. She likes to paint. She also likes to read books and watch scary movies. She says The Crown by Kiera Cass is her favorite book. Someday she hopes to travel to Italy for vacation because she wants to see all the buildings, art, and for the yummy foods. She attended Snow College. We are so glad to have Mrs. Larsen here at Entheos.
Max Martinez works at Entheos Academy. He is our Maintenance Man. He fixes things at our school. His favorite Design Principles at Entheos Academy is The having of Wonderful Ideas and Empathy and Caring. He likes this design principles because he likes doing things for others. He says that the thing he love most about Entheos is the kids and the staff. He also likes to go fishing and camping. He says that his favorite book is the Bible. Someday he hopes to travel to Hawaii for a vacation because it is hot. It is important to make goals and to follow your dreams. We are so happy to have Max Martinez here at Entheos.
Mrs. Ivie works at Entheos. She is the service learning and after school administrator. She does fun activities and helps get more money by writing grants. She loves Entheos because everybody's nice. Her favorite Design Principle is Empathy and Caring. This means, I care for others; others care for me. She likes this Design Principle because it is important to learn reading, math, and science but it is just as important to learn to be kind to others. Mrs. Ivie's favorite hobbies are reading and doing things with kids. Her favorite author is Charles Dickins, C.S. Lewis, and Sara Eden. Her dream vacation is to visit some old cities back east to learn more American history. She went to BYU and has a Master's Degree. We are so glad to have Mrs. Ivie here at Entheos.
Ms. Louviere Works at Entheos Academy. Ms. Louviere's favorite Design Principle at Entheos is service and compassion. This means we do excellent things for others. She says if we think about and help others there wouldn't be fighting, sadness or people who are lonely, hungry or hurt and I love that my kids can learn hands on and learn how to be leaders and make a difference in the world. She says that the thing she loves most about Entheos is reading. She also has too many books to narrow it down to a favorite but she does like JK Rowling's writing style. She hopes to travel anywhere she can experience cool new adventures and see things that amaze her. It is important to make goals and to follow your dreams. She attended Ricks College and Utah State University. We are so glad to have Mrs. Louviere here at Entheos.
Mr. Jeremy works at Entheos Academy. He is the bus driver and maintenance coordinator. His favorite Design Principle at Entheos is Service and Compassion. This means, we do excellent things for others. He likes this Design Principle because when you are serving and helping others you forget yourself. He says that the thing he loves most about Entheos is that students are able to do things differently. Mr. Jeremy likes camping, watching his kid's activities and sports. He says that Charlie is his favorite book. Someday he hopes to go camping for a vacation because he wants to spend time with his family. He attended the Certified Careers Institute. We are so glad to have Mr. Jeremy here at Entheos.
Miss Ashtyn works at Entheos Academy. Miss Ashtyn works with kids. Miss Ashtyn's favorite Design Principle is Failure-Success. This means when you fail you can learn how to succeed. What Miss Ashtyn loves about Entheos is how everybody is kind to each other. Her favorite hobby is to read. She says her favorite book is Harry potter. Miss Ashtyn says her dream vacation is to go to Disneyland because it is the Happiest place ever. She attended BYU. We are so happy to have Miss Ashtyn here at Entheos Academy.


Moneyglass champion jockey AP McCoy tops the New Year's Honours List for the Mid Ulster area as we bid farewell to 2015, with Cookstown scout leader Colin Rea also earning recognition for the community work he does.
Tony McCoy called it an "unbelievable privilege" as he was awarded a knighthood to honour his incredible racing career.
The 41-year-old retired from racing in April after being crowned champion jockey for a 20th consecutive year.
The champion was presented with a lifetime achievement award at the BBC Sports Personality of the Year ceremony this year.
Throughout his two-decade career, he rode 4,300 winners including at the Grand National and Cheltenham Gold Cup.
The Mid Ulster area was represented in the New Year's Honours list, too, with 1st Cookstown Scouts leader, Colin Rea, receiving the British Empire Medal (BEM).
South West College's Training Department chief, Maria Hackett from Dungannon, was awarded the MBE for services to skills development in the area, while Liam McHugh was the other Tyrone recipient of the BEM for services to the Cystic Fibrosis Trust.


Many years ago, we made the commitment to build a herd of Angus cattle that could produce quality bulls that we could use in our own herd of commercial cattle. After bringing in bulls from out of state to use on our commercial cattle over the years and watching them melt away in the Florida heat, it was apparent that if you are going to use bulls in Florida, they must be raised in Florida.
Here at Petteway Citrus & Cattle, our bulls are raised with 3 things in mind: scrotal, soundness and size. Scrotal circumference is key to raising a bull that will have enough sperm production to get your cows bred. That's why we produce bulls that at 365 days (or 1 year old) have a 36cm scrotal size. When you hear a cattleman discussing soundness of a bull, you should be looking at the feet and legs of the animal you are purchasing. We offer you bulls that are structurally correct and have a good stride.
If they have any sort of problems such as sickle hocked, bent knees or post legs, these bulls are castrated and culled. Bulls with these problems can develop soreness which will hinder their ability to travel across the field and breed cattle. Finally, we come to the size of our bulls. The bulls that are raised on our ranch are of moderate size and height. We strive to offer bulls that are not overly large in one certain area, but they are just right in ALL areas. When you come to the ranch to purchase a bull, you will notice that they are not going to be butterball fat. A bull should have enough fat cover to make his sides look smooth. An overly fat bull will have a low quality sperm count and in turn will not impregnate your cattle. When bulls are purchased from our ranch, they are ready to go to work for you when you get home.
To raise good bulls, you must have good mothers. It's amazing how such a simple statement can have such large implications. Raising high quality seedstock bulls starts with the evaluation and breeding of good mothers. During the establishment of our herd, we traveled the southeast selecting quality cattle that we felt would work in our environment. These were cows that were not only sound in their phenotype, but had an excellent pedigree. Some of the cattle families we have established in our herd are the Forever Lady lines, Erica lines, Lemmon Beauty lines and Everelda Entense lines. When you look at the type of females we raise out of these great lines, you will see cows with tremendous mothering ability. Our cattle give everything to their calves and they look great doing it. Our Angus cattle are wide-hipped, deep gutted and are extremely functional milkers.
When the breeding seasons come around, we select AI bulls that have been proven through offspring, not flash in the pan bulls. This way we can offer you a more consistent product for your money. We match up the bulls' EPD's to our females and determine what will give us a more viable offspring. Using EPD's allows us to improve areas of a cow through proper breeding. GDAR Game Day, SAV Heritage, BC Eagle Eye, BC 7022 Raven, and Dunlouise Jipsey Earl are some of the popular AI sires we are using this season. So, whether you're looking for a replacement heifer for your herd or a quality bull to improve your calves, here at Petteway Citrus & Cattle we have everything you need to increase profitability in your herd.


Come and discover Eleven Magazine's competition 'Plastic Worlds' and help clean up our water ways and oceans. With a month left to register, there is still plenty of time to participate and submit your idea.
In this competition, you are asked to think of ways to fight the plastic problem in our waters: from rivers to oceans. The challenge is designed with two keywords in mind, each with a specific objective and site typology linked to it. The first is 'prevention', which is linked to rivers and focuses on halting the plastic flow. The second, is the concept of 'action', which is linked to the oceans and asks to engage with the cleaning up of the existing pollution. Between these two themes, there are infinite degrees of cross- pollination, which you are also free to explore in your designs. For those who are interested in a more comprehensive strategy, there is also the possibility of dealing with the whole plastic pollution route: from river to ocean.
Ultimately, it is up to you individually to define what the scope of the challenge is and what the outcome of this competition will be. Is it a structure, a series of structures, a product, a vehicle, an idea, a new place, a strategy or a combination of things? You decide. 'Plastic Worlds' is open to all creatives – both professionals and/or students. Participants can compete individually or in a team of up to four people. Each team is asked to register and submit their proposals online by the 11th of January 2019 with awarded entries officially announced online on the 11th of March 2019.


text:
You are here: Home / NYC Free / NYC Free: Silent Films with Live Music
← What to Do Free & Cheap This Weekend in NYC
Amtrak Discounts for Families & Friends →
NYC Free: Silent Films with Live Music
Return to the past at this acclaimed series of iconic silent films accompanied by live music, FREE in Lower Manhattan.
Themes including immigration, and income and gender inequality are timeless, and so is the popularity of such early movie stars as Charlie Chaplin.
Silent Films/Live Music series is curated by WNYC's John Schaefer.
As many as three short films are shown each night, over three nights, Wednesday, Jan. 22 to Friday, Jan. 24, at the Winter Garden glass atrium in Brookfield Place.
The series kicks off with the world premiere of Alice Guy-Blaché's The Consequences of Feminism accompanied by the sounds of Brooklyn-based bassist, Alexis Cuadrado.
Another evening offers the world premiere of Frankenstein featuring a new score by Vernon Reid.
GoGo Penguins concludes the series with the New York premiere of Godrey Reggio's Koyaanisqatsi.
There's also FREE popcorn, while supplies last.
Curator John Schaefer describes the films this way:
" … these films, some of them over a century old, are still relevant today. This of course is the property of art, to transcend the time in which it was made. But it's also a measure of how the themes in these movies keep recurring through the years.
Alexis Cuadrado has chosen films that deal with immigration (Chaplin's The Immigrant), income inequality (The Land Beyond The Sunset), and gender roles (in two very short films by Alice Guy-Blache, the first female director).
Vernon Reid became fascinated by the theme of "the other" – a theme that has long manifested itself in horror stories, so he's chosen the 1910 version of Frankenstein, the short American film The Fall Of The House of Usher, and the remarkable Tod Browning masterpiece The Unknown. … Finally, the UK trio GoGo Penguin has re-scored a contemporary silent film classic,
Godfrey Reggio's Koyaanisqatsi. Originally created with Kennedy Center award winner composer Philip Glass (whose score is one of his best-known works), Koyaanisqatsi deals with mankind's questionable stewardship of the earth, and the choices we've made with regard to technology."
Here's the schedule:
Pages: Page 1 Page 2
Posted by Evelyn Kanter on January 14, 2020 | Updated January 15, 2020 Filed Under: Film · NYC Free Tagged With: Arts Brookfield· Charlie Chaplin· Winter Garden
Scam Alert: Kars4Kids
How to Get Tickets to Late Show With Stephen Colbert


text:
<!DOCTYPE html>
<!--
Copyright 2015 The Chromium Authors. All rights reserved.
Use of this source code is governed by a BSD-style license that can be
found in the LICENSE file.
-->

<link rel='import' href='/tracing/extras/importer/trace_code_entry.html'>

<script>
'use strict';

tr.exportTo('tr.e.importer', function() {
  // This code is a tracification of:
  // devtools/front_end/timeline/TimelineJSProfile.js
  function TraceCodeMap() {
    this.banks_ = new Map();
  }

  TraceCodeMap.prototype = {
    addEntry: function(addressHex, size, name, scriptId) {
      var entry = new tr.e.importer.TraceCodeEntry(
          this.getAddress_(addressHex), size, name, scriptId);

      this.addEntry_(addressHex, entry);
    },

    moveEntry: function(oldAddressHex, newAddressHex, size) {
      var entry = this.getBank_(oldAddressHex)
          .removeEntry(this.getAddress_(oldAddressHex));
      if (!entry) return;

      entry.address = this.getAddress_(newAddressHex);
      entry.size = size;
      this.addEntry_(newAddressHex, entry);
    },

    lookupEntry: function(addressHex) {
      return this.getBank_(addressHex)
          .lookupEntry(this.getAddress_(addressHex));
    },

    addEntry_: function(addressHex, entry) {
      // FIXME: Handle bank spanning addresses ...
      this.getBank_(addressHex).addEntry(entry);
    },

    getAddress_: function(addressHex) {
      // 13 hex digits === 52 bits, double mantissa fits 53 bits.
      var bankSizeHexDigits = 13;
      addressHex = addressHex.slice(2);  // cut 0x prefix.
      return parseInt(addressHex.slice(-bankSizeHexDigits), 16);
    },

    getBank_: function(addressHex) {
      addressHex = addressHex.slice(2);  // cut 0x prefix.

      // 13 hex digits === 52 bits, double mantissa fits 53 bits.
      var bankSizeHexDigits = 13;
      var maxHexDigits = 16;
      var bankName = addressHex.slice(-maxHexDigits, -bankSizeHexDigits);
      var bank = this.banks_.get(bankName);
      if (!bank) {
        bank = new TraceCodeBank();
        this.banks_.set(bankName, bank);
      }
      return bank;
    }
  };

  function TraceCodeBank() {
    this.entries_ = [];
  }

  TraceCodeBank.prototype = {
    removeEntry: function(address) {
      // findLowIndexInSortedArray returns 1 for empty. Just handle the
      // empty list and bail early.
      if (this.entries_.length === 0) return undefined;

      var index = tr.b.math.findLowIndexInSortedArray(
          this.entries_, function(entry) { return entry.address; }, address);
      var entry = this.entries_[index];
      if (!entry || entry.address !== address) return undefined;

      this.entries_.splice(index, 1);
      return entry;
    },

    lookupEntry: function(address) {
      var index = tr.b.math.findHighIndexInSortedArray(
          this.entries_, function(e) { return address - e.address; }) - 1;
      var entry = this.entries_[index];
      return entry &&
          address < entry.address + entry.size ? entry : undefined;
    },

    addEntry: function(newEntry) {
      // findLowIndexInSortedArray returns 1 for empty list. Just push the
      // new address as it's the only item.
      if (this.entries_.length === 0) {
        this.entries_.push(newEntry);
      }

      var endAddress = newEntry.address + newEntry.size;
      var lastIndex = tr.b.math.findLowIndexInSortedArray(
          this.entries_, function(entry) { return entry.address; }, endAddress);
      var index;
      for (index = lastIndex - 1; index >= 0; --index) {
        var entry = this.entries_[index];
        var entryEndAddress = entry.address + entry.size;
        if (entryEndAddress <= newEntry.address) break;
      }
      ++index;
      this.entries_.splice(index, lastIndex - index, newEntry);
    }
  };

  return {
    TraceCodeMap,
  };
});

</script>

redpajama_set_name: RedPajamaGithub


Celery Juice: Is This Hot "New Year's" Weight Loss Trend the Real Deal?
A Doctors Advice: "Living in a toxic free Environment"
Why Computer Can be a Literal "Pain in the Neck"
The Sugar Detox Challenge: You Can Do It!
Gluten Free for Five Years and Loving It: Are You Up for the Challenge This New Year?
Could DHEA Soon be Used to Treat Weak Bones?


text:
Q: Unit Testing a Blazor RenderFragment element I've started to write a method for dynamically building a RenderFragment Element. As such I'm also trying to write Unit Tests alongside the method.
I'm starting with a very basic element and it fails. Here's the concrete method under test:
public RenderFragment buildFragment(string element, string elementContent, string[] attribute, string[] attributeContent)
    {
        RenderFragment content = builder => {
            builder.OpenElement(0, element);
            if (attribute != null)
            {
                for (int i = 0; attribute.Length - 1 >= i; ++i)
                {
                    builder.AddAttribute(0, attribute[i], attributeContent[i]);
                }
            }
            if (!string.IsNullOrEmpty(elementContent))
            {
                builder.AddContent(0, elementContent);
            }
            builder.CloseElement();
        };

        return content;
    }

This is my first basic test against the method using xUnit:
public void BuildFragmentReturnsOneElement()
        {
            //Arrange
            RenderFragment fragment = builder =>
            {
                builder.OpenElement(0, "p");
                builder.CloseElement();
            };

            //Act
            RenderFragment result = _dynamicContentHelper.buildFragment("p", string.Empty, null, null);

            //Assert
            Assert.Same(fragment, result);
        }

The error I receive is:

Message: Assert.Same() Failure
  Expected: RenderFragment { Method = Void b__2_0(Microsoft.AspNetCore.Blazor.RenderTree.RenderTreeBuilder), Target = <>c { } }
  Actual:   RenderFragment { Method = Void b__0(Microsoft.AspNetCore.Blazor.RenderTree.RenderTreeBuilder), Target = <>c__DisplayClass0_0 { attribute = null, attributeContent = null, element = "p", elementContent = "" } }

I don't understand why Target on my fragment object is different from the Target on result.

A: The RenderFragment is a Delegate method, so when you write code like this:
RenderFragment fragment = builder =>
            {
                builder.OpenElement(0, "p");
                builder.CloseElement();
            };

You are not creating a materialised artifact, but declaring a delegate that can be invoked.
The code Assert.Same(fragment, result); is therefore comparing two delegates, which are clearly not the same - they point to two different methods.
I believe you should investigate the "test" folder of the Blazor Source
This section may help a lot
The technique they apply is to examine the frames of the RenderTree
// Act
var frames = GetRenderTree(component);

// Assert
Assert.Collection(
 frames,
 frame => AssertFrame.Component(frame, "Test.RenderChildContent", 2, 0),
 frame => AssertFrame.Attribute(frame, RenderTreeBuilder.ChildContent, 1),
 frame => AssertFrame.Markup(frame, "\n

\n", 2));

Also, this section with a TestRenderer which has this code in it
protected RenderTreeFrame[] GetRenderTree(IComponent component)
        {
            var renderer = new TestRenderer();
            renderer.AttachComponent(component);
            component.SetParameters(ParameterCollection.Empty);
            return renderer.LatestBatchReferenceFrames;
        }

Have a look at how they do their tests as I cannot reproduce it all here, but those are the keys...

A: I found that there is a very useful library for unit testing Blazor components named bUnit library. The tests are very simple to be written. Here is an example of validating that a button click is working.
[Fact]
public void TestCounter()
{
    // Arrange
    var cut = RenderComponent<Counter>();
    cut.Find("p").MarkupMatches("
Current count: 0
");

    // Act
    var element = cut.Find("button");
    element.Click();

    //Assert
    cut.Find("p").MarkupMatches("
Current count: 1
");
}

And here is another example which includes mocking of service with JustMock Lite
[Fact]
public void TestFetchData_ForecastIsNull()
{
    // Arrange
    var weatherForecastServiceMock = Mock.Create<IWeatherForecastService>();
    Mock.Arrange(() => weatherForecastServiceMock.GetForecastAsync(Arg.IsAny<DateTime>()))
        .Returns(new TaskCompletionSource<WeatherForecast[]>().Task);
    Services.AddSingleton<IWeatherForecastService>(weatherForecastServiceMock);

    // Act
    var cut = RenderComponent<FetchData>();

    // Assert - that it renders the initial loading message
    var initialExpectedHtml =
                @"
Weather forecast

This component demonstrates fetching data from a service.

Loading...
";
    cut.MarkupMatches(initialExpectedHtml);
}

The examples are from the blog post Unit Testing Blazor Components with bUnit and JustMock