dataesr/scientific-paragraphs-categorization huggingface dataset:
, 2009b (Mairal et al. , ,a, 2010;; Jenatton et al. , 2010)  and SigPy  (Ong and Lustig, 2019) , PySAP offers efficient implementations of specialised multiscale transforms. In particular, PySAP provides undecimated wavelet transforms, which are well suited to astrophysical images, and 3D wavelet transforms, which are of particular interest for MR image processing (see Sec. 2. 1). PySAP also includes several detailed applications of these tools to data to facilitate user understanding (see Sec. 3). This paper is organised as follows. Section 2 provides a detailed description of the structure and features of PySAP with particular focus on the image transforms and optimisation tools. Section 3 demonstrates practical applications of PySAP on MRI and astrophysical data. Finally, conclusions and plans for the future development of the package are presented.
PySAP Features In essence, the base PySAP package serves as a frontend that comprises several specialised modules. PySAP provides a simplified framework in which to combine these modules as well as managing file IO, visualisation and exception handling. The core modules that provide the PySAP features are: • Sparse2D: Sparse Image Transforms • ModOpt: Modular Optimisation Tools • Plug-ins Fig. 1  illustrates the core structure of the PySAP package. Each of these modules is described in detail in the following subsections.
Sparse Image Transforms The most essential tools for implementing compressed sensing or sparsity in signal processing problems are efficient dictionaries well suited to the data at hand. In practice, these dictionaries correspond to a series of data transforms ranging from wavelets to curvelets that can convert the data into a domain where the majority of the information is concentrated in very few non-zero coefficients, a concept called sparsity or compressibility. Sparse2D is a C++ package, which forms part of iSAP (Interactive Sparse Astronomical data Analysis Packages), that provides a wide range of robust and efficient sparse transforms for 1D, 2D and 3D signals. In particular, the package includes a collection of undecimated wavelet transforms (UWT) that provide shift invariant properties for image reconstruction, such as the starlet transform  (Starck et al.
, 2007)  or the 7/9 UWT. These transforms are well documented in  Starck et al. (2015). Sparse2D also includes 2D1D and curvelets transforms, enabling the sparse decomposition of various types of data. A full list of the available transforms is provided in the Appendix A. These software tools have been extensively tested on astrophysical data producing high quality results on a range of different topics  (Bobin et al. , 2014; Leonard et al. , 2014; Ngolè Mboula et al. , 2015; Lanusse et al. , 2016). The fact that this package relies on a set of fixed multiscale dictionaries means that the transforms are very computationally efficient and are therefore ideally suited to on-line MR image reconstruction  (El Gueddari et al. , 2019a). PySAP provides Python bindings for the Sparse2D C++ libraries, thus enabling fast and efficient implementation of the sparse transforms inside of a Python environment.
Modular Optimisation Tools Linear inverse problems, such as compressed sensing, are ill-posed because they are under-determined, i. e. the number of measurements is far below the number of image pixels. To cope with this issue and make the inverse problem well posed, one usually resorts to regularisation. The image solution is then obtained as the minimiser of an optimisation problem. One of the main features of PySAP is a series of modular optimisation tools designed for solving linear inverse problems that comprise a subpackage called ModOpt. This package is particularly well suited for solving linear inverse imaging problems of the following form y = Hx + n (1) where y is the observed image obtained from the detector in question, H is a degradation matrix that could constitute blurring, sub-sampling, distortion, etc.
, x is the true image that one aims to recover and n is noise. ModOpt provides robust and extremely flexible implementations of cutting-edge optimisation algorithms such as Forward-Backward, FISTA  (Beck and Teboulle, 2009) , Generalised Forward-Backward  (Raguet et al. , 2013) ,  Condat-Vũ (Condat, 2013; Vũ, 2013)  and POGM  (Kim and Fessler, 2018). For instance, these algorithms have been compared for MR image reconstruction in  (Ramzi et al. , 2019). The flexibility of these implementations is provided via means of Python class composition. All of the proximity and linear operators as well as the gradient utilised by a given algorithm can be provided as class instances that inherit a parent structure to ensure smooth cohesion. The modularity of this approach means that any potential bug can be easily identified and fixed, thus ensuring a well maintained and robust framework.
Plug-ins PySAP also provides application specific plug-ins. In this module algorithms and operators from ModOpt can be combined with Sparse2D transforms to develop tools for a given application. The objective being to produce userfriendly functions, designed to solve well defined problems, that can be applied directly to data. At present, this module contains plug-ins that demonstrate the applicability of PySAP to astrophysical and MRI data (pysap-astro and pysap-mri, respectively). For example, the MRI plug-in pysap-mri  (El Gueddari et al. , 2020)  adds the ability to deal with non-Cartesian data using non-uniform or non-equispaced FFT tools, while the astrophysics plug-in provides easy-to-use tools for denoising or deconvolving survey images. A specific plug-in, called pysap-data hosts the data sets used in the examples provided, while another one, called pysap-tutorial, contains materials for hands-on sessions.
Astrophysical Images One straightforward application of PySAP on astrophysical data is to the problem of galaxy image deconvolution. Astrophysical images obtained with optical telescopes are subject to a blurring caused by internal factors, such as imperfections in the optical system, and external factors, such as the atmosphere for ground based instruments. The sum of these aberrations is commonly referred to as the Point Spread Function (PSF). Removing the effects of the PSF from noisy observations amounts to solving a non-trivial inverse problem that requires the use of regularisation owing to the illconditioned nature of the degradation matrix, which corresponds to convolution with the PSF in this case. This problem can be solved using sparse regularisation following the same prescription described in  Farrens et al.
This is a particularly challenging problem when the object in question contains important high-frequency spatial features that need to be preserved. Figure  3  presents the results of denoising an image of the galaxy NGC2997 using PySAP. For this example white Gaussian noise is added to the clean image and then the same isotropic undecimated wavelet transform from Sparse2D is used to decompose the noisy image, which is in turn thresholded by weights learned from the noisy image itself. Note that the data used for the examples presented in this paper are provided in PySAP (in the pysap-data plug-in). Therefore, all of the example outputs can be reproduced exactly by users.
The idea is to take advantage of these time-saving strategies, not only to increase spatial resolution in anatomical imaging, but also to reduce sensitivity to motion. Importantly, PySAP is able to deal with both single and multi-channel 2D and 3D k-space data using GPU versions of NFFT operators. 3D VDS may be particularly relevant to improve the spatio-temporal resolution in functional MRI. Take, for example, the problem of compressed sensing parallel imaging reconstruction. For this example let L be the number of coils used to acquire the NMR signal, n the image dimension and N = n × n be the number of pixels of a 2D complex-valued image x ∈ C N to be reconstructed and M the number of samples collected per channel during acquisition. We denote by y ∈ C M the complex-valued data recorded by the th channel, S ∈ C N ×N the corresponding diagonal sensitivity matrix.
=1 are known in advance, this problem can easily be solved using sparse regularisation following the same prescription described in  Chaari et al. (2011); Guerquin-Kern et al. (2011)  using PySAP in just a few lines of code. In the context of VDS, one may extract low frequency information from k-space data (y ) L =1 to estimate the sensitivity maps (S ) L =1 prior to reconstruction: this is called selfcalibrated MR image reconstruction and has been implemented in El  Gueddari et al. (2018). Several example applications to MR data are provided in the PySAP package. A first example is shown in  Figure 4. It shows the reconstruction of an MR image from retrospectively undersampled k-space data. The original Cartesian data were collected in vivo on a healthy volunteer at 7 Tesla (Magnetom Siemens scanner, Erlangen, Germany) using a 32-channel (Nova Medical Inc.
Conclusions In this paper we have presented the image processing package PySAP, its principal features and example applications to MR and astrophysical images. In particular, examples demonstrate how PySAP can be applied to image processing problems such as denoising, deconvolution and compressed sensing employing state-of-the-art reconstruction algorithms and wavelet transforms. In each case the plug-in framework provides easy-to-use tools for solving these problems for specific applications. The flexibility and modularity of this package permit a wide range of possible future developments. In particular,  we aim to continue to add new and cutting-edge optimisation algorithms, reweighting methods, etc. We additionally aim to add further features for handling 4D data and optimising the computation time by exploring GPU implementations.
Another important aspect to which we plan to dedicate effort is to integrating machine and deep learning techniques into the existing architecture. One of the most exciting uses PySAP comes from the Gadgedtron implementation. The universality of this system and the growing community mean that PySAP can readily be used at MRI scanners around the world, potentially leading to some fascinating developments in the biomedical imaging domain. Finally, we intend to seek out new applications of this software in a variety of different fields. In fact, work has already begun on developing a PySAP plug-in for electron tomography and electron microscopy. Reproducible research. In the spirit of reproducible research PySAP is made publicly available and fully open source. Documentation and installation instructions are available on the PySAP website (https://python-pysap.
Acknowledgments The authors wish to acknowledge the  COSMIC  project funded by the  CEA DRF-Impulsion  call in 2016, the  Cross-Disciplinary Program on Numerical Simulation  ( SILICOS-MIC  project in 2018) of  CEA , the  French Alternative Energies and Atomic Energy Commission. They are also grateful to the  UnivEarthS Labex program of Sorbonne Paris Cite  ( ANR-10-LABX-0023  and  ANR-11-IDEX-0005-02 ), the  European Community  through the grant DEDALE (contract no. 665044 ) within the  H2020 Framework Program  of the  European Commission , the  Euclid Collaboration , the  European Space Agency  and the support of the  Centre National d'Etudes Spatiales. The authors additionally acknowledge  Hanaé Carrié  and  Fabrice Poupon  for contributing to the development of this package.
Those subgroups are tested on independent data to assess their consistency across databases, while preserving statistical power by limiting the number of tests. To illustrate this algorithm, we applied it on the database of the International Diabetes Management Practice Study (IDMPS) to better understand the drivers of improved glycemic control and rate of episodes of hypoglycemia in type 2 diabetics patients. We compared Q-Finder with state-of-the-art approaches from both Subgroup Identification and Knowledge Discovery in Databases literature. The results demonstrate its ability to identify and support a short list of highly credible and diverse data-driven subgroups for both prognostic and predictive tasks.
2015). In this paper we present Q-Finder, which draws from two families of approaches: the first is Subgroup Identification (SI) and the second is Knowledge Discovery in Databases (KDD). In the sequel of this section we first place SD in the context of SA used in clinical studies. We then detail the different SA tasks in clinical research. More specifically we propose a new classification of SD tasks in a wider context including both SI and KDD which supports presenting a state-of-the-art of SD approaches. We conclude this section by presenting the limits of SD algorithms in the context of clinical research. In section 2 we describe the Q-Finder algorithm, that was designed to address the main limitations of stateof-the-art SD algorithms. In section 3 we describe the International Diabetes Management Practices Study (IDMPS) database and perform experiments to compare four different algorithms (namely SIDES  (Lipkovich and Dmitrienko 2014) , Virtual Twins  (Foster et al.
Subgroup analysis in clinical research Randomized Clinical Trials (RCTs) aim to test predefined hypotheses and answer specific questions in the context of clinical drug development. Essentially designed to demonstrate treatment efficacy and safety in a given indication using a limited number of patients with homogeneous characteristics, RCTs are performed in heavily controlled experimental conditions in order to maximize chances to obtain results with sufficient statistical power throughout successive trials. RCTs are the gold standard for evaluating treatment outcomes, although real life studies can reveal mismatches between efficacy and effectiveness  (Saturni et al. 2014). Conversely, Real-World (RW) Data (electronic medical records, claims data, registries), are mainly generated for administrative purposes, going beyond what is normally collected in clinical trial programs, and represents important sources of information for healthcare decision makers.
In both RCT and RW studies, SA are used to test local effects, for instance to account for the heterogeneity in the response to treatment. In particular in RCT, SA "has become a fundamental step in the assessment of evidence from confirmatory (Phase III) clinical trials, where conclusions for the overall study population might not hold"  (Tanniou et al. 2016). SA include both confirmatory analyses, whose purpose is to confirm predefined hypotheses, and exploratory ones, which aim to generate new knowledge and are exploratory in nature  (Lipkovich et al. 2016 ). When considering a set of patients included in a database, a subgroup of patients is any subset characterized by its extension (all the patients in the subset, e. g. Patient's ID in {"12345", "45678"}) and its intension (a description that characterizes the patients in the subset: e.
g. , are as large as possible and have the most unusual statistical (distributional) characteristics with respect to the property of interest"  (Fürnkranz et al. 2012 ). More generally, SD "is a type of data mining technique that supports the identification of interesting and comprehensible associations in databases, confirming hypotheses and exploring new ones"  (Atzmueller 2015). These associations are in the form of a set of rules represented as Subgroup -→ Target, where Target is the property of interest (e. g. Hypoglycemia = Y es) and Subgroup is a conjunction of attribute-selector-value triplets (e. g. Age > 18 & Sex = F ). SD belongs to the wider domain of Association Rule mining -this explains why many algorithms bear a name formed from an association rule algorithm and an SD extension -and differs from classical supervised learning as the goal is not to find rules that best predict the target value of unknown observations but rather best support describing groups of observations that when satisfying the condition of a rule also satisfy the target  (Fürnkranz et al.
Applying such algorithms to SA requires considering the outcome as the variable of interest. Nevertheless, the treatment is not explicitly considered as a special variable and dozens of quality measures exist (number of rules, number of variables, support, confidence, precision, interest, novelty, significance, false positive, specificity, unusualness (WRAcc), etc. )  (Herrera et al. 2010). We will refer to Subgroup Discovery in the context of clinical Subgroup Identification as SI-SD and to Subgroup Discovery in the context of Knowledge Discovery in Database as KDD-SD and compare them with the Q-Finder approach. There is an extensive literature comparing algorithms belonging to each culture independently (e. g. L. L. Doove et al. 2013; Zhang et al. 2018; Loh et al. 2019 ) but, to our knowledge, they are not compared when they come from two different cultures.
Furthermore, search space restriction strategies favor the detection of the strongest signals in the dataset, that are often already known and/or redundant from each other Finally, pure beam search strategies could miss relevant subgroups as they try to optimize the joint, i. e. global, accuracy of all leaves, that is a tree with the most heterogeneous leaves. Consequently, when limiting the complexity (i. e. subgroups length), we can miss interesting local structures in favor of the global picture 3  (see section 6. 1 in supplementary materials that shows an example where beam search strategy using a decision tree misses relevant subgroups). On the contrary, KDD-SD approaches support the exploration of much wider search spaces at the expense of accuracy, as they do not in general control for type 1 errors (be it strong or weak).
2020; Mornet et al. 2020; Ibald-Mulli et al. 2019; Zhou et al. 2019; Zhou et al. 2018; Rollot et al. 2018; Dumontet et al. 2018; Gaston-Mathe et al. 2017; Dumontet et al. 2016; Adam et al. 2016; Amrane et al. 2015; Eveno et al. 2014; Nabholtz et al. 2012). Figure  4 : Q-Finder works in 4 main stages: an exhaustive generation of candidate subgroups, a ranking of candidate subgroups via an evaluation of their empirical credibility, a selection of the best candidates (taking into account the redundancy between subgroups) then an assessment of subgroups' credibility on one or more test datasets.
Basic definitions : patterns, predictive and prognostic rules Numerous formalizations of KDD-SD have been given in the literature. We will briefly introduce some basic definitions of database, individuals, basic patterns, complex patterns, subgroup complexity and subgroup description related to the ones introduced by Atzmueller (2015). A database is formally defined as D = (I, A), a set I of N individuals and a set A of K attributes. We will only distinguish nominal and numerical attributes. For nominal attributes, a basic pattern (a i = v i,j ) is a Boolean function that is true if the value of attribute a i ∈ A is equal to v i,j in the domain of a i for a given individual of I. For a numerical attribute (be it real or integer) a i , both basic patterns (a i ≥ v i,j ) and (a i ≤ v i,j ) can be defined for each value v i,j in the domain of a i.
e. the individuals for which CP is true {x ∈ I; CP is true for x}. In this formalism, the set of all possible association rules is included in the powerset of Σ although many subsets are not considered because their extension is by construction empty (e. g. a i ≥ v i,j ∧ a i ≤ v i,k when v i,j > v i,k ). Moreover, this set of all subgroups can be partially ordered in a lattice structure  (Ganascia 1993 ). We will not rely on such lattice structure because the length of subgroups (i. e. their complexity) is sufficient to partially order the set of generated candidates in subsets  4. In SI-SD, many databases include information about treatment distinguishing different individuals grouped in arms. This notion is critical to distinguish two types of rules. The prognostic rules are not related to a treatment effect on a given outcome, unlike the predictive rules.
Empirical credibility of subgroups Q-Finder's candidates generation step may potentially produce a very large number of subgroups. Because of its exhaustive strategy, it produces a number of subgroups which grows exponentially with complexity. Dealing with a massive exploration of database is the challenge of any KDD-SD algorithm be it exhaustive or heuristic, as the number of computed statistical tests may induce a high risk of false positives, that needs to be mitigated. Q-Finder addresses this challenge by only selecting a subset of candidate subgroups and testing them on independent data, to assess the replicability of the results while controlling the number of tests (and thus the type 1 error). This strategy requires to address two issues: • a way of evaluating the empirical credibility of subgroups, in order to rank them from most to least promising • a top-k selection strategy, in order to select a set of subgroups that seem most credible and will be tested on an independent dataset.
The seven criteria described below are aligned with the clinical domain endpoints  (Sun, Briel, Walter, et al. 2010; Dijkman et al. 2009). Using these criteria when selecting the top-ranked subgroups ought to both promote the finding of credible subgroups and facilitate their acceptance by clinicians, agencies and publication journals. Drawing from this literature, continuous metrics to measure subgroups' credibility are used in Q-Finder (more details on literature's recommendations in relation to Q-Finder metrics in section 6. 9. 4 of supplementary materials). Several credibility criteria are defined, each composed of both a continuous metric and a minimum or maximum threshold (which may be modified by the user): 1. Coverage criterion: The coverage metric is defined by the ratio between the subgroup's size and the dataset's size.
Aggregation rules and subgroups ranking Aggregation rules are defined to discriminate subgroups according to a set of criteria and therefore to help select the most interesting and/or promising ones for each research question. This is a key concept of Q-Finder, as the goal is to select a set of "top" subgroups before testing them on an independent dataset, whether or not they pass all credibility criteria. In practice, ranking subgroups into aggregation ranks is helpful when no subgroup passes all credibility criteria, and we need to look into lower aggregation ranks to select the most promising subgroups. This approach contrasts with most SI-SD algorithms, where outputs are only subgroups passing all predefined indicators, hindering the generation of hypotheses if these are difficult to achieve.
In case of a tie, additional criteria can be used to determine the final ranking, such as the effect size criterion corrected for confounders, to favor subgroups with stronger effect sizes. This ranking procedure is summarized in algorithm 2. Q-Finder performs a subgroups top-k selection to be tested on an independent dataset. One of the known issues in KDD-SD of top-k mining algorithms is that they are prone to output redundant subgroups as each subgroup is considered individually. Several authors including  Leeuwen et al. (2012)  have argued to search for subgroups that offer a high diversity: diverse subgroup set discovery. Therefore, the goal is to take into account the fact that many subgroups might be redundant either extensionally (their basic patterns are very similar) or intensionally (the objects covered by the subgroup are similar).