dataesr/scientific-paragraphs-categorization huggingface dataset:
Response was measured on a fourpoint scale by participants indicating for each dimension if they strongly agreed, agreed, disagreed or strongly disagreed that they had received advice and support. If they had not seen a nurse at all for that dimension of care, they were asked to check a fifth column. These questions aimed to provide patient-reported data for nursing provision and covered supportive care across the disease journey. We also collected demographic characteristics (age, education, living status, ethnicity and country of residence), and disease and treatment characteristics (time since diagnosis, treatment modality, time since treatment, time last assessed by a clinician and stage of disease). We hypothesised that demographic and treatment characteristics, patient-reported outcomes of quality-of-life (mental affect and health state) and patient experience would be associated with unmet needs of men with prostate cancer.
Descriptive analysis examined sample characteristics and patient-reported outcome measures. Analysis for SCNS domains was conducted on an overall response of no need (all item responses of not applicable or satisfied) vs some need (at least one item response of low, moderate or high unmet need). Within each domain, missing item responses were imputed using multiple imputations (Markov Chain Monte Carlow method) in IBM SPSS Statistics version 19. 0 (London, UK). Predictive modelling for some need was developed using the backwards elimination selection procedure to identify suitable logistic regression models for each of the five domains based on the pooled model results. Where possible, interactions were included in the models but none were found to be significant. All testing was conducted at the 5% significance level.
Social scientists have long hand-labeled texts to create datasets useful for studying topics from congressional policymaking to media reporting. Many social scientists have begun to incorporate machine learning into their toolkits. RTextTools was designed to make machine learning accessible by providing a start-to-finish product in less than 10 steps. After installing RTextTools, the initial step is to generate a document term matrix. Second, a container object is created, which holds all the objects needed for further analysis. Third, users can use up to nine algorithms to train their data. Fourth, the data are classified. Fifth, the classification is summarized. Sixth, functions are available for performance evaluation. Seventh, ensemble agreement is conducted. Eighth, users can cross-validate their data.
Introduction The process of hand-labeling texts according to topic, tone, and other quantifiable variables has yielded datasets offering insight into questions that span social science, such as the representation of citizen priorities in national policymaking  (Jones et al. , 2009)  and the effects of media framing on public opinion  (Baumgartner et al. , 2008). This process of hand-labeling, known in the field as "manual coding", is highly time consuming. To address this challenge, many social scientists have begun to incorporate machine learning into their toolkits. As computer scientists have long known, machine learning has the potential to vastly reduce the amount of time researchers spend manually coding data. Additionally, although machine learning cannot replicate the ability of a human coder to interpret the nuances of a text in context, it does allow researchers to examine systematically both texts and coding scheme performance in a way that humans cannot.
Thus, the potential for heightened efficiency and perspective make machine learning an attractive approach for social scientists both with and without programming experience. Yet despite the rising interest in machine learning and the existence of several packages in R, no package incorporates a start-to-finish product that would be appealing to those social scientists and other researchers without technical expertise in this area. We offer to fill this gap through RTextTools. Using a variety of existing R packages, RTextTools is designed as a one-stop-shop for conducting supervised learning with textual data. In this paper, we outline a nine-step process, discuss the core functions of the program, and demonstrate the use of RTextTools with a working example. The core philosophy driving RTextTools' development is to create a package that is easy to use for individuals with no prior R experience, yet flexible enough for power users to utilize advanced techniques.
Overall, RTextTools offers a comprehensive approach to text classification, by interfacing with existing text pre-processing routines and machine learning algorithms and by providing new analytics functions. While existing packages can be used to perform text preprocessing and machine learning, respectively, no package combines these processes with analytical functions for evaluating machine learning accuracy. In short, RTextTools expedites the text classification process: everything from the installation process to training and classifying has been streamlined to make machine learning with text data more accessible.
General workflow A user starts by loading his or her data from an Access, CSV, Excel file, or series of text files using the read_data() function. We use a small and randomized subset of the congressional bills database constructed by  Adler and Wilkerson (2004)  for the running example offered here. 1  We choose this truncated dataset in order to minimize the amount of memory used, which can rapidly overwhelm a computer when using large text corpora. Most users therefore should be able to reproduce the example. However, the resulting predictions tend to improve (nonlinearly) with the size of the reference dataset, meaning that our results here are not as good as they would be using the full congressional bills dataset. Computers with at least 4GB of memory should be able to run RTextTools on medium to large datasets (i.
e. , up to 30,000 texts) by using the three low-memory algorithms included: general linearized models  (Friedman et al. , 2010)  from the glmnet package, maximum entropy  (Jurka, 2012)  from maxent, and support vector machines  (Meyer et al. , 2012)  from e1071. For users with larger datasets, we recommend a cloud computing service such as Amazon EC2.
Creating a matrix First, we load our data with data(USCongress), and use the tm package  (Feinerer et al. , 2008)  to create a document-term matrix. The USCongress dataset comes with RTextTools and hence the function data is relevant only to data emanating from R packages. Researchers with data in Access, CSV, Excel, or text files will want to load data via the read_data() function. Several pre-processing options from the tm package are available at this stage, including stripping whitespace, removing sparse terms, word stemming, and stopword removal for several languages. 2 We want readers to be able to reproduce our example, so we set removeSparseTerms to. 998, which vastly reduces the size of the document-term matrix, although it may also reduce accuracy in real-world applications. Users should consult  Feinerer et al.
Creating a container The matrix is then partitioned into a container, which is essentially a list of objects that will be fed to the machine learning algorithms in the next step. The output is of class matrix_container and includes separate train and test sparse matrices, corresponding vectors of train and test codes, and a character vector of term label names. Looking at the example below, doc_matrix is the document term matrix created in the previous step, and USCongress$major is a vector of document labels taken from the USCongress dataset. trainSize and testSize indicate which documents to put into the training set and test set, respectively. The first 4,000 documents will be used to train the machine learning model, and the last 449 documents will be set aside to test the model. In principle, users do not have to store both documents and labels in a single dataset, although it greatly simplifies the process.
Analytics The most crucial step during the machine learning process is interpreting the results, and RTextTools provides a function called create_analytics() to help users understand the classification of their test set data. The function returns a container with four different summaries: by label (e. g. , topic), by algorithm, by document, and an ensemble summary. Each summary's contents will differ depending on whether the virgin flag was set to TRUE or FALSE in the create_container() function in Step 3. For example, when the virgin flag is set to FALSE, indicating that all data in the training and testing sets have corresponding labels, create_analytics() will check the results of the learning algorithms against the true values to determine the accuracy of the process. However, if the virgin flag is set to TRUE, indicating that the testing set is unclassified data with no known true values, create_analytics() will return as much information as possible without comparing each predicted value to its true label.
Cross validation Users may use n-fold cross validation to calculate the accuracy of each algorithm on their dataset and determine which algorithms to use in their ensemble. RTextTools provides a convenient cross_validate() function to perform n-fold cross validation. Note that when deciding the appropriate n-fold it is important to consider the total sample size so that enough data are in both the train and test sets to produce useful results. SVM <-cross_validate(container, 4, "SVM") GLMNET <-cross_validate(container, 4, "GLMNET") MAXENT <-cross_validate(container, 4, "MAXENT") SLDA <-cross_validate(container, 4, "SLDA") BAGGING <-cross_validate(container, 4, "BAGGING") BOOSTING <-cross_validate(container, 4, "BOOSTING") RF <-cross_validate(container, 4, "RF") NNET <-cross_validate(container, 4, "NNET") TREE <-cross_validate(container, 4, "TREE").
Conclusion Although a user can get started with RTextTools in less than ten steps, many more options are available that help to remove noise, refine trained models, and ultimately improve accuracy. If you want more control over your data, please refer to the documentation bundled with the package. Moreover, we hope that the package will become increasingly useful and flexible over time as advanced users develop add-on functions. RTextTools is completely open-source, and a link to the source code repository as well as a host of other information can be found at the project's websitehttp://www. rtexttools. com.
The footage from the two video cameras was sent to a TV monitor and a VCR in a separate room, where one or two observers recorded the infant's looking times. During this coding process, the display footage was occluded to ensure that the observer was blind to the habituation and test conditions. For 14 of the 20 infants, two observers coded the data live or from videotape; average intercoder reliability was 91%. At the beginning of each trial, a black occluder was lifted to reveal a black screen (65 cm640 cm) on which images were presented; the total display area measured 28. 4u618. 4u of visual angle at a viewing distance of about 60 cm. Each display remained visible until the infant looked for at least 0. 5 s, and ended when the infant looked away for 2 s continuously (or looked for a maximum of 120 s).
Participants Eligible participants adopted at least one child from a country other than France. The sample comprised 46 adoptive parents who volunteered to participate in the study, 12 fathers and 34 mothers. Eleven parents had two internationally adopted children and were interviewed twice (one interview for each child). We thus had a total of 57 interviews. Data saturation determined the sample size. Overall, 32 parents were married and 14 had adopted as single parents. In 11 families both parents participated. Parents' ages at the time of their children's adoptions ranged from 28 to 49 years and at the time of the interview from 31 to 60 years. Parents lived in urban areas of France. Most (86%) were college-educated professionals. Of the 42 internationally adopted children, 23 were girls and 19 boys.
Data Collection Procedure Data were collected via semi-structured interviews. The authors reviewed the international adoption literature to develop a guide for these parental interviews. The broad topics covered included the choice of country, the trip to the child's native country, and the first interactions with the child. The interview protocol that guided this research is included in the appendix (Appendix S1). Questions were designed to obtain specific information while remaining flexible so that the interviewees could tell their stories. Open-ended questions allowed participants to interpret the meaning of the question and respond according to their personal feelings. Interviewers used prompts and probes as needed to enrich the discussion. We chose to collect data through semi-structured interviews because this method combines an approximate standardization of questions with the opportunity for subjects and interviewers to expand their answers when appropriate.
Eye-Tracking System. We recorded gaze direction with an eye-tracking system described in detail elsewhere  [8]  including a computer equipped with two cameras which film the eyes of a subject looking at pictures presented on the computer screen. The software supporting the camera system captured cornean-illumination through infrared diodes, thus eliminating constraints on the subject, who remained free to move. The FaceLAB monitoring system determined eye direction, and Gaze Tracker software provided measurement and real-time analysis of the duration of exploration of the entire screen. The eye-tracking system recorded the eye position every 0. 017 s. The size of the stimuli was 37. 7 cm × 30 cm with a resolution of 1024 × 768 px (visual angle = 27 ∘ ). We studied total time tracked defined as time spent on the screen during the stimulus projection.
Data Analysis. We used Statistica 6. 1 software (StatSoft, Inc. , Tulsa, OK). We used repeated measures ANOVA to study the effects of group and type of image on eye tracking measures. Before these tests, we checked for the homogeneity of variances with a Levene test. In autism group, Spearman correlations were used to assess the relationship between visual patterns and clinical variables. value ≤. 05 was considered significant for all statistical analyses. All analyses were two tailed.
Following previous experiences in other European countries  [16] , our approach leveraged on the social and collaborative aspects of the Web for the setup of an online surveillance system for ILI aimed at gathering data on a large spectrum of information. Not only illness incidence in the community, but also information on health-care usage, contacts with specific classes of individuals (e. g. children, patients, and others), and infection-related attitudes or change of behaviors is collected. To complete the picture on the impact of an influenza epidemic in the general population, we rely on Web-based questionnaires as an appealing alternative option to the traditional methods of data collection based on offline surveys with paper questionnaires and interviews, often requiring high costs in large study populations  [9].
Participation was voluntary and anonymous. Registration took place on the GrippeNet. fr website where participants could create a user account. A valid email address was required to confirm the registration and avoid unsupervised registration attempts. The email address was also used to maintain a communication channel with each participant as a motivation purpose during the season, as explained in the Data collection subsection. The website contains several pages that are publicly accessible dedicated to the presentation and aims of the project, instructions on how to participate, general information about influenza virus and influenza epidemics and pandemics, and the results of the study provided in real time.
Data Collection Upon registration, the user was asked to complete an intake survey covering demographic factors (age, gender), geographical factors (location of home and work/school expressed at the municipality level), socio-economic factors (household size and composition, occupation, educational level, number of daily contacts with groups of patients, children or elderly, daily transportation means), and health-related factors (height and weight, diet, vaccination status, pregnancy status, smoking habits, major risk conditions, and others). At-risk population was identified as the population eligible for a vaccination voucher, based on the vaccination system for this population group in France (see subsection National Data Sources for more details). The full list of variables for which data was collected in the intake survey is reported in Tables  1  and 2 , and in Table  S1  in File S1.
The survey is available both in English and in the original French version in File S1. Participants were also allowed to register and create accounts for other individuals on their behalf, given consent, thus enabling, for instance, to grant access to the project to individuals less comfortable with Internet tools (e. g. in the older age classes). The data was collected only once at the enrollment, however the participant could access her/his intake survey anytime and modify it following any update (e. g. change of residence, of vaccination or pregnancy status). In presence of multiple instances of intake surveys, we considered the last completed. Each week participants were asked to fill in a weekly symptoms survey, independently of possible ILI symptoms. An automatic email message was sent weekly in the form of a newsletter that contained a reminder to fill in the symptoms survey as well.
The newsletter was also meant to keep a high motivation in the participation to the study by providing preliminary results on the analysis of the symptoms reported the week before, a general description of the influenza epidemic situation in France and in Europe, and an entertaining 'Did you know?' column about various flu curiosities and historical facts. The description of the weekly symptoms survey will be reported elsewhere, as here we focus on the representativeness of the project participants and will analyze exclusively the data collected through the intake survey. A final feedback survey was conducted during spring 2012, after the closure of the data collection campaign, to gather information on the perception of users regarding their participation to the study.
National Data Sources The study required gathering data from a number of sociodemographic datasets and health datasets that are described hereafter. The demographic and socioeconomic data of the French population were provided by the French National Institute of Statistics and Economic Studies (INSEE). In absence of data for the year of 2012, we relied on the most recent available sources: age-gender composition updated to January 1, 2010; household size and composition as of 2009; employment data updated to December 31, 2010; education data as of 2010; city size as of 2009. All data concern only mainland France  [35]. In the following we indicate as French adult population or general population, the population of mainland France being 18 years old or older. In France, the at-risk population who is recommended for vaccination by public health authorities includes the following categories: individuals aged over 65, pregnant women, obese individuals, and individuals with chronic health conditions (diabetes, pulmonary, kidney or heart disease, and others).
Data on body mass index (BMI) were provided by the ObEpi study for 2012  [39]. Data on diabetes was obtained from the CNAMTS through the Ecosante database for 2011 in mainland France  [40]. Incidence rates were calculated with 2010 demographic data obtained from INSEE. Data on smoking was provided by the Institut national de prevention et d'education pour la sante(Inpes, French national institute for prevention and health education)  [41]. Data of asthma prevalence were issued from a previous study  [42] , using the figure corresponding to the definition ''individuals who had an asthma crisis in the last 12 months and/or who currently have a treatment for asthma'', as we consider that the question of the intake questionnaire identified individuals who currently take a treatment, and individuals who take a treatment when they have an asthma crisis.
Commuting data across the 22 regions of mainland France was obtained from the data set provided by INSEE for 2009  [43] , the most recent source for commuting. The original data provides the number of daily commuters from a given municipality of origin (corresponding to the location of residence) to a given municipality of destination (corresponding to the location of school or workplace). All individuals aged more than 3 years old are recorded in the data set. The original data is then mapped to the region level in order to obtain the number of commuters who live in a given region and daily commute for educational or professional reasons to another region, for any pair of regions in France.
Data Analysis The representativeness of the GrippeNet. fr population was assessed through the comparison of its characteristics with the ones of the general French population, considered as the reference population, with x 2 -test for non-continuous sociodemographic variables, and Student's t-test for mean comparisons. All comparisons used bilateral tests and a 5% cutoff point. Statistical analyses were performed using the R software version 2. 13. 2 (R Development Core Team, R Foundation for Statistical Computing, Vienna, Austria, http://www. r-project. org). Apart geographical and demographic characteristics, a standardized analysis on age group and gender  [24]  was done on the other variables, considering the following age categories : 18-29, 30-39, 40-49, 50-59, 60-69, $70. The commuting data, extracted from the census and from the GrippeNet.
Mobility Features Among the active participants, 1,078 individuals (61. 6% of the studying/working GrippeNet. fr population) provided information on their school/work locations, specifying the corresponding municipality codes. Once the data was analyzed at the regional level, most of the participants declared to commute within the administrative region of their residence. The ratio of the crossregion commuters over the within-region commuters is 5. 4% [0%,19%], very close to the corresponding value for census data (3. 7% [1%,10%]). GrippeNet. fr commuting network is composed of 22 nodes as in the census commuting network, since all regions are covered by the study. Only 28 links over the 462 of the census network are however represented in the participant population. Four regions (Corse, Limousin, Poitou-Charentes, Bourgogne) are disconnected from the rest of the network, as they do not have either incoming or outgoing commuters.
If we compute the relative difference of the distribution of incoming commuters (or outgoing commuters) of the sample vs. census of a given region, we find quite a large disagreement between the two datasets, with only one region (Provence-Alpes-Cote-d'Azur) and two regions (Haute-Normandie and Centre) lying in the interval [215%,15%] for in-commuters and out-commuters, respectively (see Figure  S4  in File S1 for more details). Going beyond the comparison between absence or presence of the commuting links, we tested whether the GrippeNet. fr sample well reproduces the largest flows of mobility within the country, given the large variability of commuting fluxes of the French census commuting network (see Figure  S3  in File S1)  [47]. Half of the census commuting links having a probability larger than 60% are represented in the GrippeNet.