dataesr/scientific-paragraphs-categorization huggingface dataset:
For instance, the crypt instruction in figure  3b  modifies the database by encrypting the second column with a homomorphic scheme that supports equality testing (l. 3). Similarly, the fragV instruction splits the database vertically on the first column (l. 4). It distributes the left fragment on site number one and the right fragment on site number two. Henceforth, the querying should be done on both fragments (l. 5-13). The protection functions crypt and fragV are complemented by discarding functions decrypt and defragV. The discarding functions from the framework differ from the ones in the DSL because the framework ones discard protection on the database, whereas the functions of the DSL discard protections on the query result. In the DSL example of the cloud application (Sec. 3. 2), the call of def rag π date joins at the client side the result of both fragments and hands it over to the count computation.
In the corresponding implementation (Fig. 3b ), calling a defragV will join fragments but not the result of the queries. For this reason, the framework provides the gather instruction, which is applied at the query level. It brings back data at the client side and discards protection. Given this, the program 3b gathers the result from both fragments in order to count the number of meetings (l. 14). Note that in this example like in the example of the DSL, the gather does not have to decrypt names because the right query discards them. Monadic programming and types. In example 3b it does not make sense to encrypt the second column twice. As it does not make sense to query the fragmented database in the same manner as the local database. Furthermore, it does not make sense to group on an encrypted data that does not support equality testing.
To put it simply, if privacy techniques are to be composed, errors can easily be introduced that yield to runtime errors! Inria A main feature of monads is the use of types to exhibit what it means to execute chained function applications. Given this, the guardian monad exhibits useful information at the type level to help the programmer write programs that cannot go wrong. For instance, the type of the guardian at the end of program 3b is: With: (1) The shape of the database at the start of the computation. Here the guardian only accepts, as input, database that stores date, name and address (i. e. , DB[Date |: Name |: Addr]) in plain form (i. e. , Raw) and uploaded at client side (i. e. , Site0). (2) The shape of the database at the end of the computation. Here the guardian transforms the database into two fragments.
Feedback on the Implementation with Scala The Scala programming language is good for generalization. We harness an advanced use of Scala implicits and type members to perform type-level computations  [dSOMO10]. This enables the definition of arity-polymorphic databases, so that the guardian monad can be implemented once and for all. Without an arity-polymorphic database we would have to write as many guardian monads as a database could contain attributes, just like for tuples. In the previous examples (e. g. , Fig. 3b ), the presence of integers prefixed by an underscore is the direct consequences of type-level computation. Integers with an underscore are Church encodings of the natural numbers at the type level. They make it possible to identify, at compile time, which column has to be encrypted, and the type of both fragments after fragmentation.
Scala unifies functional and object-oriented programming. Under the hood, data are objects and operations method calls. This object model is good for modularity and generalization, for instance, with subtyping. However, it makes type inference less powerful than that of ML-like functional languages that use the Hindley-Milner algorithm. Because of that, the guardian monad sometimes requires to explicitly specifying the type to help the compiler infer type parameters. The code examples we presented above are a beautified version, omitting a few type annotations that are needed by the compiler, so that readers can more easily understand the intention of the guardian monad. The code with all necessary type annotation is available on the Github platform. Finally, the guardian monad is a prototype, whose implementation proves its validity.
Several language-based approaches have been proposed for other privacy properties. Tetali et    [FKDL13]  define ZQL, a query language operating over annotated database schemas that use strong typing in order to ensure security properties of generated implementations in F # and C ++. Reed and Pierce  [RP10]  propose a specialized type system to enforce privacy guarantees by means of differential privacy. However, none of these approaches provides language support for the composition of fragmentation and encapsulation techniques. Another domain of related work consists in support for the expression of privacy properties in the form of policies and constraints over accesses to runtime objects. Sticky policies  [KSW02] , e. g. , represent a class of policies that enable the abstract definition of privacy properties and their enforcement through runtime annotations.
Conclusion In this paper we have addressed the problem of how to define and enforce privacy properties in the context of complex computations executed in mutualized environments, such as the Cloud, and that require different privacy-enforcing techniques to be used. We have considered privacy properties that are formulated in terms of compositions of data fragmentation and encryption. We have provided programming language support for the declarative definition of such composed privacy-enforcement strategies and an implementation on top of the Scala language that, using a specialized type system, ensures privacy properties by construction. We have also provided a set of laws that ensure privacy properties and that are satisfied by the language mechanisms we provide. As future work we intend to extend the set of fragmentation techniques and approaches to encryption in order to obtain a full-fledged composition theory for these two classes of privacyenforcing techniques.
Experimental section Bovine serum albumin (BSA) was obtained from Sigma-Aldrich (product code A3059) as a lyophilized powder (99% purity) and used without further purification. The proteins were dissolved in water (D 2 O) and filled in double-walled cylindrical aluminum sample holders (outer diameter 22 mm, gap 0. 25 mm) for the neutron scattering experiments. The cylinders where sealed against vacuum and inserted into a cryostat on the neutron spectrometer for temperature control. The neutron data were recorded on the backscattering spectrometer BASIS  61  (SNS, ORNL). Neutrons were analyzed using Si(111) single crystals, thus setting the analyzed energy to 2. 08 meV. The integration time for each neutron spectrum amounted to approximately 4 hours per temperature. We have carried out the data reduction using the Mantid software provided by the SNS and subsequently analyzed the data using MATLAB, as reported in detail in ref.
62. Using neutron spectroscopy, we measure the scattering function S(q,o) at scattering vectors q which are coupled to reciprocal intermolecular distances and at energy transfers o which can be resolved, at BASIS, down to B3. 5 meV FWHM. We have determined the spectrometer resolution function R by recording the scattering signal from a vanadium standard and modeled it by a sum of 4 Gaussians. We have subsequently implemented the convolution of R with the fit functions in MATLAB analytically by building Voigt functions. 62 Results and discussion.
Acknowledgements The research at  Oak Ridge National Laboratory 's Spallation Neutron Source was sponsored by the  Scientific User Facilities Division, Office of Basic Energy Sciences, U. S. Department of Energy. The spectrometer  BASIS  is supported by the  Ju ¨lich Center for Neutron Science (JCNS) ,  Germany , via the partner user programme and M. G. and F. Za. acknowledge travel funding by  JCNS  to conduct the experiments as well as a student grant by the  Institut Laue-Langevin  (ILL). M. H. , M. G. and T. S.
This paper introduces two R packages available on the Comprehensive R Archive network. The main application concerns the study of computer code output. Package DiceDesign is dedicated to numerical design of experiments, from the construction to the study of the design properties. Package DiceEval deals with the fit, the validation and the comparison of metamodels. After a brief presentation of the context, we focus on the architecture of these two packages. A two-dimensional test function will be a running example to illustrate the main functionalities of these packages and an industrial case study in five dimensions will also be detailed.
Secondly, this fitted model is the key point of the study as it will be used as a surrogate for the simulator code. It is then important to test the predictive performance of the model at points which do not belong to the training set. In this article, we present a part of a numerical toolbox that provides a complete range of functions for each step of a case study. All methods used through the consortium applications are implemented using the R language (see R Core Team 2015) and integrated as R packages. The DICE toolbox consists of the following five packages: DiceDesign for numerical design of experiments  (Franco, Dupuy, and Roustant 2015). DiceEval for evaluation and comparison of metamodels  (Dupuy and Helbert 2015). DiceKriging for the estimation of a response surface via Gaussian processes  (Roustant, Ginsbourger, and Deville 2015).
DiceOptim for global optimization  (Ginsbourger and Roustant 2015). DiceView for graphical methods for computer experiments design and models  (Richet, Deville, and Chevalier 2013). Each package addresses a specific task where classical and new methods are implemented. DiceDesign is dedicated to the construction of space filling designs and the computation of discrepancy and distance criteria to study a distribution of points. DiceEval provides tools for the evaluation and the comparison of classical metamodels. A validation procedure (containing numerical criteria, graphical plots and cross-validation methods) is also provided to validate a fitted model. DiceKriging implements a large panel of kriging models. The component DiceOptim performs different versions of the efficient global optimization algorithm proposed by  Jones, Schonlau, and Welch (1998)  to optimize the simulator using kriging.
Dice-View has been implemented to visualize a fitted kriging model for a better understanding of its behavior. Therefore, this package allows 2D/3D sections of kriging models obtained by DiceKriging to be viewed. This article only deals with the first two packages, while a full description of DiceKriging and DiceOptim can be found in  Roustant, Ginsbourger, and Deville (2012). This paper is organized as follows: Section 2 focuses on the DiceDesign package. First, the architecture of the package is described in detail. The generated space filling designs and the associated quality criteria are introduced and illustrated in dimension 2. Section 3 is dedicated to the DiceEval package. Metamodel quality criteria are defined and the functionalities of this package are illustrated on a test example in dimension 2.
DiceDesign package In the computer experiments context, the number of simulations is often constrained by the high cost of one simulation. The exploratory phase consists of defining the position of the simulated points. In the absence of prior information about the output variable(s), it seems important to spread the points evenly throughout the experimental domain. Where deterministic simulators are concerned, replications are useless (in the sense that running the code many times with the same input values provides the same value for the output). Moreover, it is possible that the response depends only on some input factors or some combination of the inputs, hence alignments should be avoided. The DiceDesign package provides routines to create some specific space filling designs (SFD) and to test their intrinsic quality.
DiceEval package Suppose now that the simulations have been carried out at x 1 ,. x n. The numerical values of the output are then analyzed to provide a response surface for prediction, uncertainty propagation or global optimization. The DiceEval package deals with the construction of different types of response surfaces also called surrogates or metamodels. Several procedures (especially numerical and graphical tools) are provided to validate fitted models. Then, DiceEval gathers the most common methods used to model a computer code output. Most of them are already available in R. The main contributions of this package are the standardization of the calls to fit the different metamodels and the implementation of standard criteria for quantifying the error between the model and the simulated phenomenon.
6). The main functions of the DiceEval package have been listed previously. Now, we will present its features in use. The package is illustrated using a 2-dimensional analytic function. Although simplistic, this example describes a study in detail from the beginning to the end. The dimension of the input domain allows a representation of the designs and the construction of the data set is simplified by knowledge of the output. The objective of this study is to highlight the influence of the choice of the design on the quality of the metamodel.
Construction and prediction The main function modelFit is dedicated to the construction of a model from a training data set; modelPredict aims at predicting the values of the model at new locations. Five metamodeling techniques are considered, i. e. , the linear model and its stepwise version, additive models, MARS, PolyMARS and kriging models. Note that most of the learning models depend on other packages, namely gam (Hastie 2014), mda  (Hastie 2013) , polspline  (Kooperberg 2013)  and DiceKriging  (Roustant et al. 2015). In order to make package maintenance easier, the interface to external packages is restricted to the modelFit function. Except for kriging, the different models implemented in the DiceDesign package are illustrated in  Hastie, Tibshirani, and Friedman (2009).
Fitting of a model with package DiceEval Let us denote by X_unif the random experimental design and Y_unif the corresponding response values. In the following, the first command builds an additive model that fits the data set (X_unif, Y_unif). The second command retrieves the values obtained on test points contained in the matrix (or data. frame) X_test. Here, the test set is a factorial grid of 10,201 points that corresponds to 101 levels in each direction. R> modAm <-modelFit(X_random, Y_random, type = "Additive", + formula = formulaAm(X_random, Y_random)) R> Y_test_Am <-modelPredict(modAm, X_test) Figure  16  gives a 2D plot of the additive response surface and two 1D cut sections with the true and the predictive functions in each direction. The additive model (with cubic spline basis in each direction) gives an approximation of the general behavior of the real function.
This selection is carried out by an automatic minimization that is often parametrized. The package proposes a study of the influence of the penalty parameter using graphical and numerical tools which can be used to choose the most appropriate value. The criterion to minimize, denoted by C in the following, depends on the penalty argument and is defined by: C(penalty) = -n ln(σ 2 ) + M penalty, where n is the size of the data set, σ is an estimation of the residual standard deviation and M is the number of parameters in the statistical model. Note that the first term is proportional to the likelihood function of the estimated model. An illustration of the use of modelFit for the metamodels with a penalty parameter is detailed in the command lines below. R> modStep <-modelFit(X_unif, Y_unif, type = "StepLinear", penalty = 2) Warning message: In modelFit(X_random, Y_random, type = "StepLinear", penalty = 2) : [type==" StepLinear"] argument 'formula' not found, set at 'Y~.
Conclusions of the study of the 2-dimensional toy function Several metamodels have been estimated on the four designs represented in Figure  15 : a linear model with a quadratic trend (i. e. , the two predictor variables x 1 and x 2 , the interaction x 1 : x 2 and the squared order terms x 2 1 and x 2 2 ), an additive model, a MARS model of degree two, a PolyMARS model with gcv equal to 2 and a kriging model. The kriging models presented in what follows have been obtained using the DiceKriging package (see  Roustant et al. 2012). The prediction quality of the fitted models is tested on the same 101×101 grid as previously used. Table  6  contains the values of the R2 criteria. Table  6  shows that the quality of the fitted models differs widely from one to the other: The MARS models behave poorly.
An industrial case study in dimension 5 Among all the case studies proposed by the industrial partners of the DICE consortium, we present that proposed by IRSN (Institut de Radioprotection et de Sûreté Nucléaire) to illustrate the main functionalities of the DiceEval package. Data sets of this case study are provided with the package. Its dimension makes it a good example problem for the DiceEval functionalities. All the R commands can be found in the demonstration file attached to the DiceEval package: R> library("DiceEval") R> demo("IRSN5D", package = "DiceEval").
Data of the IRSN case In this case study, the learning set is a Strauss design with 50 points and the test set is a grid of 324 points. Unfortunately, we cannot provide the parameters that were used to generate the Strauss design. The data set is nevertheless used because of the availability of the data. R> data("dataIRSN5D", package = "DiceEval") R> X <-dataIRSN5D[, -6] R> Y <-dataIRSN5D[, 6] R> data("testIRSN5D", package = "DiceEval") R> Xtest <-testIRSN5D[, -6] R> Ytest <-testIRSN5D[, 6] A simple transformation is applied to translate the experimental design on [-1, 1] 5. For factorial designs with two levels, this transformation ensures orthogonality. In Figure  19 , we can observe that the projective points of the training set visually fill the twodimensional space whereas the test set exhibits clusters.
Adjustment An important contribution made by the package is the use of a unique function called modelFit to fit different types of metamodels. This function makes it possible to fit linear and additive models, stepwise versions of linear model, two models with piecewise linear functions (namely MARS and PolyMARS) and kriging models. For all metamodels, the call depends on the type argument which specifies the model's family. Furthermore, some other arguments are sometimes needed: formula for linear and additive models, formula and penalty for stepwise linear models, degree for the MARS models and gcv for the PolyMARS models. In the case of the linear model, we only have to specify the input and output data, the type "Linear" and the formula. R> modLm <-modelFit(X, Y, type = "Linear", formula = Y ~.
This simulation is more difficult to calibrate since a Gibbs distribution and Markov chain Monte Carlo parameters have to be chosen with respect to the desired properties of the design. However, these designs yield good results in practice and this approach can offer other possibilities such as generating non-stationary designs. Extensions are not yet implemented in the package. Furthermore, DiceDesign provides a set of criteria to assess the quality of the generated designs and an associated graphical tool. The goal of the second package presented in this paper is to unify and to simplify metamodeling when different types of models are tested. Furthermore, DiceEval provides numerical and graphical tools to evaluate the quality of the estimation. These two packages have been illustrated on a two-dimensional analytical case and on a fivedimensional real case study.
Acknowledgments This work was conducted within the framework of the DICE consortium between ARMINES, Renault, EDF,  IRSN ,  ONERA  and  Total S. A. The authors are very grateful to  Y. Richet  ( IRSN ) who provided the data for the demonstration example. The authors wish to thank  O. Roustant ,  L. Carraro ,  Y. Deville  and  D. Ginsbourger  for their contributions. We also wish to thank the anonymous referees for several helpful comments and suggestions that improved and clarified the presentation of this work.
In this paper, a new supervised classification method dedicated to binary predictors is proposed. Its originality is to combine a model-based classification rule with similarity measures thanks to the introduction of new family of exponential kernels. Some links are established between existing similarity measures when applied to binary predictors. A new family of measures is also introduced to unify some of the existing literature. The performance of the new classification method is illustrated on two real datasets (verbal autopsy data and handwritten digit data) using 76 similarity measures.
Introduction Supervised classification aims to build a decision rule able to assign an observation x in an arbitrary space E with unknown class membership to one of L known classes C 1 ,. , C L. For building this classifier, a learning dataset {(x 1 , y 1 ),. , (x n , y n )} is used, where an observation is denoted by x i ∈ E and y i ∈ {1,. , L} indicates the class belonging of x i , i = 1,. , n. Model-based classification assumes that the predictors {x 1 ,. , x n } are independent realizations of a random vector X on E and that the class conditional distribution of X is parametric. When E = R p , among the possible parametric distributions, the Gaussian is often preferred and, in this case, the marginal distribution of X is therefore a mixture of Gaussians. Estimation of model parameters can be achieved with maximum likelihood, see  [29].
In this paper, we focus on the application of the pgpDA method to binary predictors. To this end, we show how new kernels can be built basing on similarity or dissimilarity measures. In particular, 76 such measures are considered. Some links are established between these measures when they are applied to binary predictors. A new family of measures is also introduced to unify the existing literature. As a result, we end up with a new supervised classification method dedicated to binary predictors combining similarity measures and mixture models. Its performance is illustrated on two real datasets (verbal autopsy data and handwritten digit data). It is shown that the proposed kernels can lead to good classification results even in challenging problems. The paper is organized as follows. The principle of pgpDA applied to binary predictors is explained in Section 2.
In Section 5, pgpDA is compared to Support Vector Machine (SVM) classification  [20, 21, 36]  and k-nearest neighbours (kNN)  [22] , Chapter 13, on two real datasets. From the theoretical point of view, pgpDA offers a number of advantages compared to SVM: It is naturally a multi-class method; as a model-based classifier, it provides classification probabilities, and finally its computation cost is lower than SVM  [7].
Let us recall that the basic principle of HDDA is to assume that the original data of each class live in a linear subspace of low dimension. The next lemma shows that the classification rule associated with a linear kernel is independent from the coding of the data. Lemma 2. Let x, x ∈ {0, 1} p and introduce Klinear (x, x ) =< 1 -x, 1 -x >= d (this kernel counts the number of negative matches between x and x ). Then, the classification rules (2) associated with K linear and Klinear are equivalent. Exponential kernels. The best-known exponential kernel is RBF kernel: K RBF (x, x ) = exp - x -x 2 2σ 2 , where σ is a positive parameter. In the binary framework, the RBF kernel can be built from the Hamming similarity measure (see Table  1  or  [37]  eq. (  15 )): Lemma 3. Let x, x ∈ {0, 1} p. Then, K RBF (x, x ) = exp S Hamming (x, x ) 2σ 2.