Fuzzy data XML may handle it
- 格式:pdf
- 大小:239.74 KB
- 文档页数:15
data format error getwxacodeunlimit -回复Data Format Errors in getwxacodeunlimit: Troubleshooting GuideIntroductionIn today's digital era, it is imperative for businesses to have a strong online presence, and mobile applications have become an essential part of this strategy. WeChat mini-programs, with their vast user base and seamless integration with the WeChat ecosystem, have gained immense popularity among businesses and developers. When it comes to generating QR codes for these mini-programs, the getwxacodeunlimit API is a commonly used tool. However, encountering data format errors can be frustrating. In this article, we will walk you through the troubleshooting process to resolve any data format errors that you may encounter while using getwxacodeunlimit API.1. Understanding getwxacodeunlimit APIThe getwxacodeunlimit API is a part of WeChat's Mini Program API. It enables developers to generate QR codes without any restrictions on the number of times the code can be scanned. This feature is particularly useful for businesses that frequently update their mini-program content or have a dynamic user engagement.2. Common Data Format Errors2.1. Error: Invalid ParameterWhen calling the getwxacodeunlimit API, one common data format error you may encounter is an "Invalid Parameter" error. This error typically occurs when you fail to provide the required parameters or when the parameter values are incorrect. To resolve this error, ensure that you are providing the correct parameters and that they are formatted correctly.2.2. Error: Image Size Exceeded LimitAnother data format error you may come across is an "Image Size Exceeded Limit" error. This error occurs when the image size requested by the API exceeds the maximum limit. The maximum size limit for the getwxacodeunlimit API is 1280*1280 pixels. To fix this error, you will need to reduce the image size within the allowed limits.3. Troubleshooting StepsNow that we have identified the common data format errors in the getwxacodeunlimit API, let's delve into the troubleshooting steps for resolving these errors.3.1. Review API DocumentationBefore proceeding with troubleshooting, familiarize yourself with the official API documentation provided by WeChat. The documentation contains detailed information about the requiredparameters, their expected data formats, and any limitations imposed by the API. Ensure that you are using the correct parameters and formatting them correctly.3.2. Verify Parameter ValuesIf you encounter an "Invalid Parameter" error, carefully verify the values of all the parameters you are passing to the API. Double-check the spelling, capitalization, and ensure that you are providing the correct values. Sometimes, a simple typo or a missing character can lead to this error.3.3. Check Image SizeIn case you encounter an "Image Size Exceeded Limit" error, review the image size you are requesting through the getwxacodeunlimit API. Make sure that the size falls within the allowed limits of 1280*1280 pixels. If the image size exceeds this limit, you will need to resize or compress the image appropriately before calling the API.4. Advanced Troubleshooting TechniquesIf the above steps do not solve the data format error, consider the following advanced troubleshooting techniques:4.1. Debugging ToolsUtilize debugging tools provided by your development environment or programming language to track the error.Debuggers allow you to step through your code, inspect variables, and identify any issues that may be causing the data format error.4.2. Error Handling and LoggingImplement robust error handling mechanisms and logging in your code. Error handling allows your program to gracefully handle unexpected situations and provide relevant error messages. Logging helps in collecting useful information about the error, such as input values and intermediate results, which can aid in identifying the root cause of the data format error.4.3. Seek Community SupportIf you are still unable to resolve the data format error, consider seeking support from the developer community or forums dedicated to WeChat mini-program development. Other developers who have encountered similar issues may be able to provide guidance and insights on resolving the error.5. ConclusionGenerating QR codes for WeChat mini-programs using the getwxacodeunlimit API is a powerful feature that helps businesses enhance their online presence. However, encountering data format errors during the process can be challenging. By understanding common errors, reviewing documentation, and followingtroubleshooting steps, you can quickly resolve these errors and continue leveraging the benefits of WeChat mini-programs. Remember to implement good coding practices, such as error handling and logging, to facilitate efficient debugging and future error identification. With a little perseverance and the right approach, you can overcome data format errors in getwxacodeunlimit and successfully generate QR codes for your mini-programs.。
基于Fuzzy-IBE的提权攻击防御模型张悦;郑东;谭彭超;张应辉【摘要】为抵御Android系统的提权攻击,避免应用在权限传递的时候,造成威胁性的权限泄露,利用Fuzzy-IBE设计一种对权限进行约束的权限管理模型.通过属性对APK的核心模块或者敏感资源进行加密操作,使得在要访问该APK的其余APK 中,只有符合特定条件的APK,才能利用系统的私钥恢复出数据,访问原APK应用的资源和模块.通过该模型,可以进一步规划系统资源,规划某一APK应用中敏感数据的访问权限,优化系统和应用自身的模块管理,有效避免提权攻击.%To defend against the unauthorized access of Android system resource and make sure the sensitive permission without being leaked from one app to another,a permission agent model based on the Fuzzy-IBE was designed.The attribute was altered from Android application,using different attributes to encrypt the important algorithm or valuable resource to make sure that only when the condition was met could the sink application recover the data by using the decrypt key assigned by the source application and touch the core part of the source application.This model makes good use of the system resource,it optimizes the management of resource belonging to APK it-self,and it builds an access control system for application,which avoids the unauthorized access effectively.【期刊名称】《计算机工程与设计》【年(卷),期】2016(037)012【总页数】5页(P3161-3164,3170)【关键词】提权攻击;隐私保护;信息安全;模糊身份加密;权限管理【作者】张悦;郑东;谭彭超;张应辉【作者单位】西安邮电大学无线网络安全技术国家工程实验室,陕西西安 710121;西安邮电大学无线网络安全技术国家工程实验室,陕西西安 710121;西安邮电大学无线网络安全技术国家工程实验室,陕西西安 710121;西安邮电大学无线网络安全技术国家工程实验室,陕西西安 710121;国家密码管理局密码科学技术国家重点实验室,北京 100878【正文语种】中文【中图分类】TP309.2Android系统容易受到恶意代码的攻击,一方面是由于应用市场鱼龙混杂,缺乏标准化的检测机制,另一方面,更由于其本身的安全模型和权限机制存在着隐患[1]。
SQL Server Technical ArticleWriter: Jonathan FosterTechnical Reviewer: Karthik Pinnamaneni; Andre CiabattariPublished: November, 2013Applies to: SQL Server 2012Summary: This paper examines the performance of an XtremIO All Flash array in an I/O intensive BI environment.CopyrightThis document is provided “as-is”. Information and views expressed in this document, including URL and other Internet Web site references, may change without notice. You bear the risk of using it.Some examples depicted herein are provided for illustration only and are fictitious. No real association or connection is intended or should be inferred.This document does not provide you with any legal rights to any intellectual property in any Microsoft product. You may copy and use this document for your internal, reference purposes.© 2013 Microsoft. All rights reserved.IntroductionThe Customer Service & Support BI group at Microsoft (CSSBI) was offered the opportunity to test BI-related SQL loads on EMC’s XtremIO storage unit for ultra-fast IO rates. The group decided to create a load test that simulated peak activity in their data acquisition platform (DAP). The DAP is a single SQLInstance containing 100’s of various size databases hosted on a very powerful server. These databasesare updated w/ new data at various frequencies while at the same time queried by managed systems, reports, and ad hoc users. This paper presents the disk I/O performance of the XtremIO unit in a DAP test environment and also provides disk I/O performance metrics from a standard SAN to be used as a reference point. The purpose of this paper is to provide BI architects and D BA’s with viable performance information for helping select viable hardware configurations to meet specific performance needs.BackgroundAs mentioned previously, the CSSBI DAP server is subjected to competitive IO requests throughout each day with the heaviest load occurring in the early morning business hours. Many of these IO transfers involve large datasets like clickstream or user event data and/or large-object data types like online forum chats and XML data. A portion of these large data flows are repetitive meaning the same query types occur multiple times each day. Near-real time (NRT) subsets of these data flows are also occurring simultaneously. CSSBI’s value to stakeholders is its ability to provide consistently good performance in an easily acc essible symmetric multiprocessing (SMP) environment. The project’s success has resulted in exponential growth of both data and users which has forced the IT owners to regularly upgrade the underlying infrastructure & platform to ensure optimal performance.PurposeWhen EMC shared the technical details and future integration plans of the XtremIO storage unit, the CSSBI IT team wanted to evaluate whether the product might solve a specific need for expanding the NRT or real-time (RT) capability of the DAP for larger datasets as described previously. Most often in these scenarios the solution is one that involves more expensive massive parallel processing (MPP) capability. The CSSBI IT team’s goal is to try and meet the business requirements with a less expensive SMP capability for as long as possible.TestThe test involved a variety of DDL & DML operations having distinctively different I/O patterns organized to run predominately synchronously in order to force longer disk queues. The test was designed and executed within SSIS with the beginning and ending of each step logged to audit tables. The relational landscape consisted of 9 databases containing a mixture of clickstream, incident management, and chat data with a storage footprint of approximately 3.5TB. Other important environment details to call out are:∙The source tables all contained clustered indexes having various levels of fragmentation.∙All SQL engine, system and user db files were intentionally placed on volumes hosted by 1 storage device. For example, during the XtremIO testing all SQL and db files were placed onvolumes presented by the XtremIO device. Conversely, during the SAN comparison test all SQLand db files were placed on volumes presented by the SAN.∙SQL Server memory was intentionally fixed @ 190GB for min and max settings to eliminate memory allocation swaps.∙SQL system cache & buffer pool were cleansed prior to each single test run∙All data flows used OLE DB connections with Rows Per Batch set to 10k & Maximum Insert Commit Size set to 100k∙The clickstream database totaled 1.7TB and was composed of 3 monthly partitions∙The incident & chat databases which contained the bulk of LOB data totaled 1.9TB w/ each having their largest tables spread in monthly partitionsThe following pages summarize each individual test component in a graphical format. The color and pattern of each graphic will correspond to individual line items in the disk latency chart presented later in the results.Click stream test flow Remote extractLocal extractComplex aggregationSequential READsRandom READsSimple aggregationLarge Inefficient XML LookupSmall inefficient XML lookupSmall inefficient XML lookups w/ delete - asyncronousCursor operation in TempDBLong text string operation in TempDBGUID JOIN in TempDBCTE operationLarge DDL & DML in TempDBLarge single remote extractSmall single remote extractRandom READLarge DML operationSmall multiple remote extract & complex aggSmall inefficient XML lookups - syncronousMaintenance TasksSuccess CriteriaOur success criteria was very simple - disk latency avg across all the XtremIO volumes should never exceeded 10 milliseconds and should be sustained below 5 milliseconds. Since it is common for most storage systems to experience short spikes in latency as cache is swapped, we allowed the transgression of the 5ms sustainment for activities shorter than 15 seconds.Test ResultsThe avg test duration was 70 mins and during that time approx. 104k IOPS were generated from approx. 58GB of data movement. Disk latency across the XtremIO volumes never exceeded 4ms including the temporary spikes mentioned previously. The avg disk latency for the first phase of the test which was also the most I/O intensive was < 2ms. The avg disk latency reached its highest when the database restore executed causing sustained latency to bounce between 2ms & 3ms. Once the restore was completed, avg sustained latency remained < 1ms with isolated spikes at 1.75ms.DiagnosticIndex DefragmentationDatabase RestoreSummary & ConclusionThe success criteria outlined for the test was entirely met with final results actually exceeding our most optimistic expectations. Sustained latency rates were well below the recommended 10ms threshold for OLTP applications, therefore, to exceed this threshold in an I/O contentious BI environment is highly commendable.As stated previously, the test package incorporated all the most I/O intensive operations that the CSSBI team will typically observe on the stand-alone DAP instance during peak usage periods. What’s more, it incorporated maintenance operations that typically are schedule during non-peak usage periods. When considering how well the unit performed in an unlikely “worst case scenario” it is feasible that the I/O could be substantially increased further before any storage performance bottleneck would be encountered.In addition, the fact that the XtremIO storage unit was able to easily handle the load with no care given to the actual placement of files on the volumes, or the segregation of files based upon READ/WRITE balance (ex. hosting TempDB files on the same volumes hosting LOB and clickstream data files) has the potential to greatly reduce the time and effort required of DBA’s to organize the storage volumes and the files they host. SAN’s achieve this to some degree with pools and block tiering, however, the setup of the pools and tiers still requires a SAN administrator. What’s more, in most BI environments the rate of change and growth is exponential which requires DBA’s to frequently work with the SAN administrator on storage optimization. However, the XtremIO storage p roduct has the ability to be a “plug and play” solution where the optimization efforts of the DBA and SAN administrator are greatly reduced.Despite the very large storage footprint of most BI systems, it’s common that less than 20% of the data is actively used by the BI end-users. It’s feasible that an XtremIO unit could be provisioned to host the most active data files, thereby allowing the storage of the remaining 80% on less expensive and highly redundant SATA pools either in DAS or SAN. Such a setup could ensure that storage performance was highly optimized without the higher associated expense of the hardware and the support personnel.For more information:/sqlserver/: SQL Server Web site/en-us/sqlserver/: SQL Server TechCenter/en-us/sqlserver/: SQL Server DevCenter/ EMC XtremIODid this paper help you? Please give us your feedback. Tell us on a scale of 1 (poor) to 5 (excellent), how would you rate this paper and why have you given it this rating? For example: ∙Are you rating it high due to having good examples, excellent screen shots, clear writing, or another reason?∙Are you rating it low due to poor examples, fuzzy screen shots, or unclear writing?This feedback will help us improve the quality of white papers we release.Send feedback.。
XML反序列化出错,XML⽂档(2,2)中有错误XML转换为实体类的错误处理⽅案⼀.错误描述:XML反序列化出错,XML ⽂档(2, 2)中有错误⼆.解决⽅案:在实体类的字段要加上XmlElement属性三.具体实现:1.XML⽂档<EVENT_INSTANCE><EventType>ALTER_TABLE</EventType><PostTime>2015-08-04T10:21:14.670</PostTime><SPID>175</SPID><ServerName>E6SER14</ServerName><LoginName>sa</LoginName><UserName>dbo</UserName><DatabaseName>E6ETms</DatabaseName><SchemaName>ETms</SchemaName><ObjectName>Driver</ObjectName><ObjectType>TABLE</ObjectType><AlterTableActionList><Drop><Constraints><Name>DF_Driver_DriverID</Name></Constraints></Drop></AlterTableActionList><TSQLCommand><SetOptions ANSI_NULLS="ON" ANSI_NULL_DEFAULT="ON" ANSI_PADDING="ON" QUOTED_IDENTIFIER="ON" ENCRYPTED="FALSE" /> <CommandText>ALTER TABLE ETms.DriverDROP CONSTRAINT DF_Driver_DriverID</CommandText></TSQLCommand></EVENT_INSTANCE>2.⽬标实体对象[XmlRoot(ElementName = "EVENT_INSTANCE")][Serializable]public class EventModel{[XmlElement(ElementName = "EventType")]public string EventType { set; get; }[XmlElement(ElementName = "PostTime")]public string PostTime { set; get; }[XmlElement(ElementName = "SPID")]public string Spid { set; get; }[XmlElement(ElementName = "ServerName")]public string ServerName { set; get; }[XmlElement(ElementName = "UserName")]public string UserName { set; get; }[XmlElement(ElementName = "DatabaseName")]public string DatabaseName { set; get; }[XmlElement(ElementName = "SchemaName")]public string SchemaName { set; get; }[XmlElement(ElementName = "ObjectName")]public string ObjectName { set; get; }[XmlElement(ElementName = "ObjectType")]public string ObjectType { set; get; }[XmlElement(ElementName = "TargetObjectName")]public string TargetObjectName { set; get; }[XmlElement(ElementName = "TargetObjectType")]public string TargetObjectType { set; get; }[XmlElement(ElementName = "PropertyName")]public string PropertyName { set; get; }[XmlElement(ElementName = "PropertyValue")]public string PropertyValue { set; get; }[XmlElement(ElementName = "Parameters")]public Parameters Parameters { get; set; }[XmlElement(ElementName = "TSQLCommand")]public TsqlCommand TsqlCommand { get; set; }}public class TsqlCommand{[XmlElement(ElementName = "CommandText")]public string CommandText { set; get; }[XmlElement(ElementName = "SetOptions")]public string SetOptions { set; get; }}public class Parameters{[XmlElement("Param")]public List<string> ParamContent { get; set; }}3.XML转实体类测试//xmlStr 是xml字符串;type是要转换⽬标实体的类型【typeof (EventModel)】;public static object DeserializeFromXml(string xmlStr, Type type){try{using (StringReader sr = new StringReader(xmlStr)){XmlSerializer xs = new XmlSerializer(type);return xs.Deserialize(sr);}}catch (Exception ex){throw (ex);}}。
Package‘EM.Fuzzy’October12,2022Type PackageTitle EM Algorithm for Maximum Likelihood Estimation by Non-PreciseInformationVersion1.0Date2018-08-08Author Abbas Parchami(Department of Statistics,Faculty of Mathematics and Computer,Shahid Ba-honar University of Kerman,Kerman,Iran)Maintainer Abbas Parchami<**************.ir>Description The EM algorithm is a powerful tool for computing maximum likelihood esti-mates with incomplete data.This package will help to applying EM algorithm based on triangu-lar and trapezoidal fuzzy numbers(as two kinds of incomplete data).A method is pro-posed for estimating the unknown parameter in a parametric statistical model when the observa-tions are triangular or trapezoidal fuzzy numbers.This method is based on maximizing the ob-served-data likelihood defined as the conditional probability of the fuzzy data;for more de-tails and formulas see Denoeux(2011)<doi:10.1016/j.fss.2011.05.022>.License LGPL(>=3)Imports FuzzyNumbers,DISTRIBNeedsCompilation noRepository CRANDate/Publication2018-08-1609:30:08UTCR topics documented:EM.Fuzzy-package (2)EM.Trapezoidal (3)EM.Triangular (5)Index912EM.Fuzzy-package EM.Fuzzy-package EM Algorithm for Maximum Likelihood Estimation by Non-PreciseInformationDescriptionThe main goal of this package is easy estimation of the unknown parameter of a continues distribu-tion by EM algorithm where the observed data are fuzzy rather than crisp.This package contains two major functions:(1)the function EM.Triangular works by Triangular Fuzzy Numbers(TFNs), and(2)the function EM.Trapezoidal works by Trapezoidal Fuzzy Numbers(TrFNs).Author(s)Abbas ParchamiReferencesDenoeux,T.(2011)Maximum likelihood estimation from fuzzy data using the EM algorithm,Fuzzy Sets and Systems183,72-91.Gagolewski,M.,Caha,J.(2015)FuzzyNumbers Package:Tools to deal with fuzzy numbers in R.R package version0.4-1,https:///web/packages=FuzzyNumbersGagolewski,M.,Caha,J.(2015)A guide to the FuzzyNumbers package for R(FuzzyNumbers version0.4-1)Exampleslibrary(FuzzyNumbers)library(DISTRIB,warn.conflicts=FALSE)#Let us we are going to estimation the unknown mean of Normal population with known variance #(e.g,sd(X)=0.5)on the basis of11trapezoidal fuzzy numbers(which we simulate them in #bellow for simplification).n=11set.seed(1000)c1=rnorm(n,10,.5)c2=rnorm(n,10,.5)for(i in1:n){if(c1[i]>c2[i]){zarf<-c1[i];c1[i]<-c2[i];c2[i]<-zarf}}round(c1,3);round(c2,3)c1<=c2l=runif(n,0,1);round(l,3)u=runif(n,0,1);round(u,3)EM.Trapezoidal(T.dist="norm",T.dist.par=c(NA,0.5),par.space=c(-5,30),c1,c2,l,u, start=4,ebs=.0001,fig=2)EM.Trapezoidal MLE by EM algorithm based on Trapezoidal Fuzzy DataDescriptionThis function can easily obtain Maximum Likelihood Estimation(MLE)for the unknown one-dimensional parameter on the basis of Trapezoidal Fuzzy observation.UsageEM.Trapezoidal(T.dist,T.dist.par,par.space,c1,c2,l,u,start,ebs=0.001, fig=2)ArgumentsT.dist the distribution name of the random variable is determined by characteristic el-ement T.dist.The names of distributions is similar to stats package.T.dist.par a vector of distribution parameters with considered ordering in stats pack-age.If T.dist has only one parameter(which obviously is unknown)the usermust be considered T.dist.par=NA.Also,it may be T.dist has two parameterswhich one of them is unknown and another known.In such cases,the user mustbe considered T.dist.par=c(NA,known parameter where thefirst parame-ter is unknown,and T.dist.par=c(known parameter,NA where the secondparameter is unknown.See bellow examples.par.space an interval which is a subset/subinterval of the parameter space and it must be contain the true value of unknown parameter.c1a vector with length(c)=n from thefirst point of the core-values of TrFNs.c2a vector with length(c)=n from the last point of the core-values of TrFNs.Therefore,it is obvious that c1<=c2.l a vector with length(c)=n from the left spreads of TrFNs.u a vector with length(c)=n from the right spreads of TrFNs.start a real number from par.space which EM algorithm must be started/worked with this start point.ebs a real positive small number(e.g.,0.01,0.001or0.16)which determine the accuracy of EM algorithm in estimation of unknown parameter.fig a numeric argument which can tack only values0,1or2.If fig=0,the result of EM algorithm will not contains anyfigure.If fig=1,then the membership functions of TrFNs will be shown in afigurewith different colors.If fig=2,then the membership functions of TrFNs will be shown in afigurewith the curve of estimated probability density function(p.d.f.)on the basis ofmaximum likelihood estimation.ValueThe parameter computed/estimated in each iteration separately and also the computation of thefollowing values can be asked directly.MLE the value of maximum likelihood estimated for unknown parameter by EM al-gorithm based on TrFNs.parameter.vectora vector of the ML estimated parameter for unknown parameter in algorithmwhich itsfirst elements start and the last element is MLE.Iter.Num the number of EM algorithm iterations.NoteIn using this package it must be noted that:(1)The sample size of TrFNs must be less than16.This package is able to work with small samplesizes(n≤15)and can be extended by the user if needs.(2)Considering a suitable interval for par.space is very important to obtain a true result for EMalgorithm.It must be mentioned that this interval must be a sub-interval of the parameter spaceand the user must check the result of algorithm(MLE).It means that if the obtained MLE(byEM.Trapezoidal)overlay on the boundary of par.space,then the result is not acceptable and theEM algorithm must be repeated once again with a wider par.space.(3)This package is able to work for continuous distributions with one or two parameter which onlyone of them is unknown and the user wants to estimate it based on TrFNs.See AlsoDISTRIB FuzzyNumbersExampleslibrary(FuzzyNumbers)library(DISTRIB,warn.conflicts=FALSE)#Example1:Estimation the unknown mean of Normal population with known variance(e.g,#var=0.5^2)based of Trapezoidal FNs.n=2set.seed(1000)c1=rnorm(n,10,.5)c2=rnorm(n,10,.5)for(i in1:n){if(c1[i]>c2[i]){zarf<-c1[i];c1[i]<-c2[i];c2[i]<-zarf}}round(c1,3);round(c2,3)c1<=c2l=runif(n,0,1);round(l,3)u=runif(n,0,1);round(u,3)EM.Trapezoidal(T.dist="norm",T.dist.par=c(NA,0.5),par.space=c(-5,30),c1,c2,l,u,start=4, ebs=.1,fig=2)#Example2:n=4set.seed(10)c1=rexp(n,2)c2=rexp(n,2)for(i in1:n){if(c1[i]>c2[i]){zarf<-c1[i];c1[i]<-c2[i];c2[i]<-zarf}}round(c1,3);round(c2,3)c1<=c2l=runif(n,0,1);round(l,3)u=runif(n,0,2);round(u,3)EM.Trapezoidal(T.dist="exp",T.dist.par=NA,par.space=c(.1,20),c1,c2,l,u,start=7, ebs=.001)#Example3:Estimation the unknown standard deviation of Normal population with known #mean(e.g,mean=7)based of Trapezoidal FNs.n=10set.seed(123)c1=rnorm(n,4,1)c2=rnorm(n,4,1)for(i in1:n){if(c1[i]>c2[i]){zarf<-c1[i];c1[i]<-c2[i];c2[i]<-zarf}}round(c1,3);round(c2,3)c1<=c2l=runif(n,0,.5);round(l,3)u=runif(n,0,.75);round(u,3)EM.Trapezoidal(T.dist="norm",T.dist.par=c(4,NA),par.space=c(0,40),c1,c2,l,u,start=1, ebs=.0001,fig=2)#Example4:Estimation alpha parameter in Beta distribution.n=4set.seed(12)c1=rbeta(n,2,1)c2=rbeta(n,2,1)for(i in1:n){if(c1[i]>c2[i]){zarf<-c1[i];c1[i]<-c2[i];c2[i]<-zarf}}round(c1,3);round(c2,3)c1<=c2l=rbeta(n,1,1);round(l,3)u=rbeta(n,1,1);round(u,3)EM.Trapezoidal(T.dist="beta",T.dist.par=c(NA,1),par.space=c(0,10),c1,c2,l,u,start=1, ebs=.01,fig=2)EM.Triangular MLE by EM algorithm based on Triangular Fuzzy DataDescriptionThis function can easily obtain Maximum Likelihood Estimation(MLE)for the unknown one-dimensional parameter on the basis of Triangular Fuzzy observation.UsageEM.Triangular(T.dist,T.dist.par,par.space,c,l,u,start,ebs=0.001,fig=2)ArgumentsT.dist the distribution name of the random variable is determined by characteristic el-ement T.dist.The names of distributions is similar to stats package.T.dist.par a vector of distribution parameters with considered ordering in stats pack-age.If T.dist has only one parameter(which obviously is unknown)the usermust be considered T.dist.par=NA.Also,it may be T.dist has two parameterswhich one of them is unknown and another known.In such cases,the user mustbe considered T.dist.par=c(NA,known parameter where thefirst parame-ter is unknown,and T.dist.par=c(known parameter,NA where the secondparameter is unknown.See bellow examples.par.space an interval which is a subset/subinterval of the parameter space and it must be contain the true value of unknown parameter.c a vector with length(c)=n from the core-values of TFNs.l a vector with length(c)=n from the left spreads of TFNs.u a vector with length(c)=n from the right spreads of TFNs.start a real number from par.space which EM algorithm must be started/worked with this start point.ebs a real positive small number(e.g.,0.01,0.001or0.16)which determine the accuracy of EM algorithm in estimation of unknown parameter.fig a numeric argument which can tack only values0,1or2.If fig=0,the result of EM algorithm will not contains anyfigure.If fig=1,then the membership functions of TFNs will be shown in afigure.If fig=2,then the membership functions of TFNs will be shown in afigurewith the curve of estimated probability density function(p.d.f.)on the basis ofmaximum likelihood estimation.ValueThe parameter computed/estimated in each iteration separately and also the computation of the following values can be asked directly.MLE the value of maximum likelihood estimated for unknown parameter by EM al-gorithm based on TFNs.parameter.vectora vector of the ML estimated parameter for unknown parameter in algorithmwhich itsfirst elements start and the last element is MLE.Iter.Num the number of EM algorithm iterations.NoteIn using this package it must be noted that:(1)The sample size of TFNs must be less than16.This package is able to work with small samplesizes(n≤15)and can be extended by the user if needs.(2)Considering a suitable interval for par.space is very important to obtain a true result for EMalgorithm.It must be mentioned that this interval must be a sub-interval of the parameter space and the user must check the result of algorithm(MLE).It means that if the obtained MLE(by EM.Triangular)overlay on the boundary of par.space,then the result is not acceptable and the EM algorithm must be repeated once again with a wider par.space.(3)This package is able to work for continuous distributions with one or two parameter which onlyone of them is unknown and the user wants to estimate it based on TFNs.See AlsoDISTRIB FuzzyNumbersExampleslibrary(FuzzyNumbers)library(DISTRIB,warn.conflicts=FALSE)#Example1:n=2set.seed(131)c=rexp(n,2);round(c,3)l=runif(n,0,1);round(l,3)u=runif(n,0,2);round(u,3)EM.Triangular(T.dist="exp",T.dist.par=NA,par.space=c(0,30),c,l,u,start=5,ebs=.1, fig=0)EM.Triangular(T.dist="exp",T.dist.par=NA,par.space=c(0,30),c,l,u,start=50,ebs=.001, fig=1)#Fast ConvergenceEM.Triangular(T.dist="exp",T.dist.par=NA,par.space=c(0,30),c,l,u,start=50,ebs=.1^6, fig=2)#Example2:Computing the mean and the standard deviation of20EM estimations:n=15MLEs=c()for(j in100:120){print(j)set.seed(j)c=rexp(n,2)l=runif(n,0,1)u=runif(n,0,2)MLEs=c(MLEs,EM.Triangular(T.dist="exp",T.dist.par=NA,par.space=c(0,30),c,l,u,start=5,ebs=.01,fig=0)$MLE)}MLEs# 3.2837032.4755413.171026...mean(MLEs)#2.263996sd(MLEs)#0.4952257hist(MLEs)#Example3:Estimation the unknown mean of Normal population with known variance #(e.g,var=1)based of TFNs.n=5set.seed(100)c=rnorm(n,10,1);round(c,3)l=runif(n,0,1);round(l,3)u=runif(n,0,1);round(u,3)EM.Triangular(T.dist="norm",T.dist.par=c(NA,1),par.space=c(-10,30),c,l,u,start=20, ebs=.001,fig=2)#Example4:Estimation the unknown standard deviation of Normal population with known #mean(e.g,mean=7)based of TFNs.n=10set.seed(123)c=rnorm(n,7,2);round(c,3)l=runif(n,0,2.5);round(l,3)u=runif(n,0,1);round(u,3)EM.Triangular(T.dist="norm",T.dist.par=c(7,NA),par.space=c(0,10),c,l,u,start=5, ebs=.0001,fig=2)#Example5:Estimation the unknown parameter b where X~U(a=0,b).n=15set.seed(101)c=runif(n,0,5);round(c,3)l=runif(n,0,1);round(l,3)u=runif(n,0,1);round(u,3)b<-EM.Triangular(T.dist="unif",T.dist.par=c(0,NA),par.space=c(0,10),c,l,u,start=5,ebs=.001,fig=2)$MLEprint(b)Index∗EM algorithmEM.Trapezoidal,3EM.Triangular,5∗Fuzzy DataEM.Trapezoidal,3EM.Triangular,5∗Maximum Likelihood EstimationEM.Trapezoidal,3EM.Triangular,5∗TrapezoidalFuzzyNumberEM.Trapezoidal,3∗TriangularFuzzyNumberEM.Triangular,5EM.Fuzzy(EM.Fuzzy-package),2EM.Fuzzy-package,2EM.Trapezoidal,3EM.Triangular,59。
Package‘msig’October13,2022Title An R Package for Exploring Molecular Signatures DatabaseVersion1.0Description The Molecular Signatures Database('MSigDB')is one of the most widely used and comprehensive databases of gene sets for performing gene setenrichment analysis<doi:10.1016/j.cels.2015.12.004>.The'msig'package providesyou with powerful,easy-to-use andflexible query functions for the'MsigDB'database.There are2query modes in the'msig'package:online query and local query.Both queries contain2steps:gene set name and gene.The online search is divided into2modes:registered search andnon-registered browse.For registered search,email that you registered shouldbe provided.Local queries can be made from local database,which can be updated by msig_update()func-tion.License GPL-2Encoding UTF-8RoxygenNote7.1.1Imports do,rvest,xml2,set,plyr,httr,jsonlite,utils,kableExtra,tmcn,crayon,dplyr,stringr,sqldfDepends R(>=4.1.0)NeedsCompilation noAuthor Jing Zhang[aut,cre],Zhi Jin[aut]Maintainer Jing Zhang<****************>Repository CRANDate/Publication2021-06-2907:50:02UTCR topics documented:browse_msig (2)browse_show_collection (3)local_msig (4)12browse_msig local_version (5)msig_detail (6)msig_download (6)msig_filt (7)msig_gene (7)msig_geneSymbol (8)msig_update (9)msig_version (9)msig_view (10)NewMsigDB (10)read_msigdb_xml (11)related_geneset (11)search_msig (12)search_show_collection (12)search_show_contributor (13)search_show_organism (14)show_local_collection (14)show_local_contributor (15)show_local_contributor_org (15)show_local_data (16)show_local_sub_collection (16)similarity_geneset (17)Index18browse_msig Retrieve Gene set Names from MSigDB database Retrieve gene setnames from MSigDB database by the gene set name and collection.the searchfiled is gene name.DescriptionRetrieve Gene set Names from MSigDB database Retrieve gene set names from MSigDB database by the gene set name and collection.the searchfiled is gene name.Usagebrowse_msig(geneSetName="",collection="")ArgumentsgeneSetName one keyword for gene set name,default is emptycollection one collection,default is emptyValuegene set namesbrowse_show_collection3 Examples#missing genSetName and collection to get all gene set namesx<-browse_msig()#search for gene names include immunex<-browse_msig( immune )x|>msig_view( cells , response , to , m )#search for gene names include immune in c8browse_msig( immune , c8 )#gene names in c8browse_msig( immune , c8 )browse_show_collectionShow collection of MSigDB databaseDescriptionShow collection of MSigDB databaseUsagebrowse_show_collection()Valueshow all collection in MSigDB in web page /gsea/msigdb/genesets.jsp.For chromosome,we should treat as collection together.Examplesbrowse_show_collection()4local_msig local_msig Query gene set names from local dataDescriptionQuery gene set names from local dataUsagelocal_msig(geneset=NULL,description=NULL,collection=NULL,sub_collection=NULL,organism=NULL,contributor=NULL,contributor_org=NULL,author=NULL,chip=NULL,gene=NULL,geneset_fuzzy=NULL,collection_fuzzy=NULL,sub_collection_fuzzy=NULL,organism_fuzzy=NULL,contributor_fuzzy=NULL,contributor_org_fuzzy=NULL,author_fuzzy=NULL,chip_fuzzy=NULL,gene_fuzzy=NULL)Argumentsgeneset one sql format character for exact matchdescription one sql format character for exact matchcollection one sql format character for exact matchsub_collection one sql format character for exact matchorganism one sql format character for exact matchcontributor one sql format character for exact matchcontributor_orgone sql format character for exact matchauthor one sql format character for exact matchchip one sql format character for exact matchgene one sql format character for exact matchlocal_version5 geneset_fuzzy fuzzy matchcollection_fuzzyfuzzy matchsub_collection_fuzzyfuzzy matchorganism_fuzzy fuzzy matchcontributor_fuzzyfuzzy matchcontributor_org_fuzzyfuzzy matchauthor_fuzzy fuzzy matchchip_fuzzy fuzzy matchgene_fuzzy fuzzy matchValueone dataframe with attribute of msig_local.Examplesx<-local_msig( IMMUNE_RESPONSE )x<-local_msig( IMMUNE_RESPONSE|IMMUNE_SYSTEM_PROCESS )local_version Local database versionDescriptionLocal database versionUsagelocal_version()Valueversion of local databaseExampleslocal_version()6msig_download msig_detail Retrieve detail information of gene setDescriptionRetrieve detail information of gene setUsagemsig_detail(...)Arguments...one or more gene set names,which can be little or capital.ValuePrint detail information about the geneset,number of genes and return all gene names. Examplesd<-msig_detail( izadpanah_stem_cell_adipose_vs_bone_dn ,AAACCAC_MIR140 )msig_download Download MsigDB databaseDescriptionDownload MsigDB databaseUsagemsig_download(version)Argumentsversion versionValuedowanload the data to local PCmsig_filt7 msig_filt Filt data by key words Case insensitiveDescriptionFilt data by key words Case insensitiveUsagemsig_filt(x,...)Argumentsx data from msig package...one or more key wordsValuefilted results with high light information.Examplesbrowse_msig( immune )|>msig_filt( response )msig_gene Retrieve gene by Gene set NameDescriptionRetrieve gene by Gene set NameUsagemsig_gene(...,list=TRUE,info=TRUE)##S3method for class charactermsig_gene(...,list=TRUE,info=TRUE)##S3method for class data.framemsig_gene(...,list=TRUE,info=TRUE)8msig_geneSymbolArguments...one or more geneset names,which can be little or capital.list logical,default is FALSE,whether to show result by list.info logical,whether to show information about gene set.ValuePrint detail information about the geneset,number of genes and return all gene names. Examplesgenes<-msig_gene( izadpanah_stem_cell_adipose_vs_bone_dn ,REACTOME_DEGRADATION_OF_AXIN )genes|>msig_view()msig_geneSymbol Retrieve gene by Gene Symbol from MsigDBDescriptionRetrieve gene by Gene Symbol from MsigDBUsagemsig_geneSymbol(...,local=FALSE)##S3method for class listmsig_geneSymbol(...,local=FALSE)##S3method for class data.framemsig_geneSymbol(...,local=FALSE)##S3method for class charactermsig_geneSymbol(...,local=FALSE)Arguments...one or more geneset names,which can be little or capital.local logical,default is FALSE,whether to extract gene symbol from local database Valuegene symbolmsig_update9 Examplesgenes<-msig_geneSymbol( izadpanah_stem_cell_adipose_vs_bone_dn )genes<-msig_geneSymbol( izadpanah_stem_cell_adipose_vs_bone_dn ,REACTOME_DEGRADATION_OF_AXIN )msig_update Update local MsigDB databaseDescriptionUpdate local MsigDB databaseUsagemsig_update(xml=NULL,version=NULL)Argumentsxml msigdb xmlfileversion version,if missing,the latest version will be usedValueupdate local MsigDB databasemsig_version version information of MSigDB databaseDescriptionversion information of MSigDB databaseUsagemsig_version()Valueversion dataframe10NewMsigDB msig_view View data in viewer panelDescriptionView data in viewer panelUsagemsig_view(x,...)Argumentsx dataframe...one or more hightliht wordsValueopen data in view panel in rstudioExamples# browse_msig( immune )|>msig_view( response )NewMsigDB Create NewMsigDB object for new versions of MsigDB databaseDescriptionCreate NewMsigDB object for new versions of MsigDB databaseUsageNewMsigDB(xml)Argumentsxml path of xml msigdbfile pathValuedataframe which can be used inner packageread_msigdb_xml11 read_msigdb_xml read MSigDB xml dataDescriptionread MSigDB xml dataUsageread_msigdb_xml(xml)Argumentsxml xml data pathValueone dataframe contains gene infomationrelated_geneset Query related gene setsDescriptionQuery related gene setsUsagerelated_geneset(geneSetName)ArgumentsgeneSetName one gene set nameValuerelated gene sets from gene set detailed information tableExamplesx<-related_geneset( AAANWWTGC_UNKNOWN )x|>msig_filt( unknown )|>msig_view( ttt )12search_show_collection search_msig Query MSigDB database by cookieDescriptionQuery MSigDB database by cookieUsagesearch_msig(keywords,collection="",organism="",contributor="",email)Argumentskeywords one keywords see Detailfieldcollection one or more collectionsorganism one or more organismscontributor one or more contributorsemail email that registered for MSigDB database.Valuedataframe contains name,description and so on.Examplesemail<- your emailx<-search_msig( immune&response )x|>msig_filt( system )|>msig_view( C2 )search_show_collectionShow collctions for msigdb_search()DescriptionShow collctions for msigdb_search()Usagesearch_show_collection(email)search_show_contributor13Argumentsemail email that registered for MSigDB database.Valuecollections from MsigDB website.Examplessearch_show_collection("your email")#oremail<- your emailsearch_show_collection()search_show_contributorShow contributor for msigdb_search()DescriptionShow contributor for msigdb_search()Usagesearch_show_contributor(email)Argumentsemail email that registered for MSigDB database.Valuecontributors from MsigDB website.Examplessearch_show_contributor("your email")#oremail<- your emailsearch_show_contributor()14show_local_collection search_show_organism Show organism for msigdb_search()DescriptionShow organism for msigdb_search()Usagesearch_show_organism(email)Argumentsemail email that registered for MSigDB database.Valueorganisms from MsigDB website.Examplessearch_show_organism("your email")#oremail<- your emailsearch_show_organism()show_local_collection Show collections of local MsigDB databaseDescriptionShow collections of local MsigDB databaseUsageshow_local_collection()ValueA dataframe contains2columns.Thefirst column is the name of the collection.The second columnis the number of frequencies it has.Examplesshow_local_collection()show_local_contributor15 show_local_contributorShow contributors of local MsigDB databaseDescriptionShow contributors of local MsigDB databaseUsageshow_local_contributor()ValueA dataframe contains2columns.Thefirst column is the name of the contributor.The secondcolumn is the number of frequencies it has.Examplesshow_local_contributor()show_local_contributor_orgShow contributor_orgs of local MsigDB databaseDescriptionShow contributor_orgs of local MsigDB databaseUsageshow_local_contributor_org()ValueA dataframe contains2columns.Thefirst column is the name of the contributor_org.The secondcolumn is the number of frequencies it has.Examplesshow_local_contributor_org()16show_local_sub_collection show_local_data Show local data used in this packageDescriptionShow local data used in this packageUsageshow_local_data()Valuedata used inner this packageExamplesshow_local_data()show_local_sub_collectionShow sub_collections of local MsigDB databaseDescriptionShow sub_collections of local MsigDB databaseShow sub_collections of local MsigDB databaseUsageshow_local_sub_collection()show_local_sub_collection()ValueA dataframe contains2columns.Thefirst column is the name of the sub_collection.The secondcolumn is the number of frequencies it has.A dataframe contains2columns.Thefirst column is the name of the sub_collection.The secondcolumn is the number of frequencies it has.Examplesshow_local_sub_collection()show_local_sub_collection()similarity_geneset17 similarity_geneset Query similarity gene setsDescriptionQuery similarity gene setsUsagesimilarity_geneset(geneSetName)ArgumentsgeneSetName one gene set nameValuesimilarity gene setsExamplesx<-similarity_geneset( REACTOME_DEGRADATION_OF_AXIN )x|>msig_view()Indexbrowse_msig,2browse_show_collection,3local_msig,4local_version,5msig_detail,6msig_download,6msig_filt,7msig_gene,7msig_geneSymbol,8msig_update,9msig_version,9msig_view,10NewMsigDB,10read_msigdb_xml,11related_geneset,11search_msig,12search_show_collection,12search_show_contributor,13search_show_organism,14show_local_collection,14show_local_contributor,15show_local_contributor_org,15show_local_data,16show_local_sub_collection,16similarity_geneset,1718。
ieee fuzzy 短文Fuzzy logic is a mathematical tool that allows for approximate reasoning and decision-making in uncertain or ambiguous situations. It originated from the work of Lotfi Zadeh in the 1960s and has since been widely applied in various fields, including engineering, computer science, and artificial intelligence.At its core, fuzzy logic deals with degrees of truth rather than the traditional binary logic of true or false. It acknowledges that many concepts in the real world are not easily defined or categorizable in a strict sense. Fuzzy logic allows for the representation of imprecise or vague information and enables the use of linguistic terms to describe these concepts.The main building blocks of fuzzy logic are fuzzy sets, which are defined by membership functions that assign a degree of membership to each element in a set. Unlike in classical set theory, where an element either belongs to a set or does not, fuzzy sets provide a more flexible approach by allowing for partial membership. This allows for a more nuanced representation of data and facilitates better decision-making in uncertain situations. Fuzzy logic is often employed in control systems, where it enables the modeling of complex, nonlinear relationships between inputs and outputs. By incorporating linguistic rules, fuzzy logic controllers can handle imprecise or incomplete information and adapt to changing conditions. This makes them particularly useful in applications such as temperature and speed control, as well as in intelligent systems like autonomous vehicles.Another area where fuzzy logic has found extensive application is in pattern recognition and image processing. Fuzzy logic algorithms can effectively handle the inherent uncertainty and variability in real-world data, making them suitable for tasks such as object recognition, classification, and clustering. By considering the degree of similarity or dissimilarity between objects, fuzzy logic techniques can provide more robust and reliable results compared to traditional binary methods.Fuzzy logic has also been utilized in decision-making systems, where it allows for the modeling of human-like reasoning processes. By employing fuzzy inference and rule-based systems, decision support systems can analyze complex data and make intelligent decisions based on expert knowledge and subjective criteria. This can be particularly valuable in fields such as medicine, finance, and risk analysis, where decisions often involve multiple factors and uncertainties.Despite its numerous applications and advantages, fuzzy logic does have its limitations. The construction of accurate membership functions and the formulation of appropriate fuzzy rules can be challenging. Additionally, the computational complexity of fuzzy logic algorithms may be higher compared to classical methods, leading to increased processing time and resource requirements.In conclusion, fuzzy logic provides a powerful framework for dealing with uncertainty and imprecision in decision-making. Its ability to handle vague and incomplete information makes it highly applicable in a wide range of fields. By incorporating linguistic terms and membership functions, fuzzy logic enables morerealistic and human-like reasoning processes. However, it is important to carefully consider the appropriate use of fuzzy logic and to address the associated challenges when applying it in practice.。
Testing against natural language RequirementsHarry M. SneedAnecon GmbH, Vienna, AustriaEmail: Harry.Sneed@t-online.atAbstract:Testing against natural language requirements is the standard approach for system and acceptance testing. This test is often performed by an independent test organization unfamiliar with the application area. The only things the testers have to go by are the written requirements. So it is essential to be able to analyze those requirements and to extract test cases from them. In this paper an automated approach to requirements based testing is presented and illustrated on an industrial application.Keywords: Acceptance Testing, System Testing, Requirements Analysis, Test Case Generation, Natural Language ProcessingA test is always a test against something. According to the current test literature this something can be the code itself, the design documentation, the data interfaces, the requirements or the unwritten expectations of the users [1]. In the first case, one is speaking of code based testing where the test cases are actually extracted from an analysis of the code. In the second case, one is speaking of design based testing where test cases are taken from the design documents, e.g. the UML diagrams. In the third case, we speak of data based testing, where test cases are generated from the data structures, e.g. the SQL schema or the XML schema. In the fourth case, we speak of requirements based testing, where we extract the test cases from the requirements documents. This is also known as functional testing. In the fifth and final case, we speak of user based testing, in which a representative user invents test cases as he goes along. This is also referred to as creative testing [2].Another form of testing is regression testing in which a new version of a previous system is tested against the older version. Here the test cases are taken from the old data or from the behavior of the old system. In both cases one is comparing the new with the old, either entirely or selectively [3].1. Functional testingIn this paper the method of requirements based testing is being described, i.e. testing against the functional and non functional requirements as defined in an official document. This type of testing is used primarily as a final system test or as an acceptance test. Bill Howden referred to this as functional testing [4]. It assumes that other kinds of testing, such as code based unit testing and/or design based integration testing have already taken place so that the software is executable and fairly reliable. It is then the task of the requirements based test to demonstrate that the system does what it should do according to the written agreement between the user organization and the developing organization. Very often this test is performed by an independent test organization so as to eliminate any bias. The test organization is called upon not only to test, but also to interpret the meaning of the requirements. In this respect, the requirements are similar to laws and the testers are performing the roles of a judge, whose job it is to interpret the laws to apply to a particular case [5].What laws and requirements have in common is that they are both written in natural language and they are both fuzzy. Thus, they are subject to multiple interpretations. Judges are trained to interpret laws. Testers are not always prepared to interpret requirements. However, in practice this is the essence of their job. Having an automated tool to dissect the requirement texts and to distinguish between different types of requirement statements is a first step in the direction of automated requirements testing. The Text Analyzer is intended to be such a tool.2. Nature of natural language requirementsBefore examining the functions of a requirement analysis tool, it is first necessary to investigate the nature of requirement documents. There may be certain application areas where requirements are written in a formal notation. There are languages for this, such as VDM, SET and Z, and more recently OCL the object Constraint Language propagated by the OMG [6]. However, in the field of information technology such formal methods havenever really been accepted. There, the bulk of the requirements are still written in prose text.Christof Ebert distinguishes between unstructured text, structured text and semi formal text [7]. In a structured text the requirements are broken down into prescribed chapters and sections with specific meanings. A good example of this is the ANSI/IEEE-830: Guide to Requirements Specification. It prescribes a nested hierarchy of topics including the distinction between functional and non functional requirements [8]. Functional Requirements are defined in terms of their purpose, their sequence, their preconditions and post conditions as well as their inputs and outputs. Inputs are lists of individual arguments and outputs lists of results. Arguments and results may be even defined in respect to their value ranges. This brings the functional specification very close to a functional test case.Non functional requirements are to be defined in terms of their pass and fail criteria. Rather than depicting what flows in and out of a function, a measurable goal is set such as a response time of less than 3 seconds. Each non functional requirement may have one or more criteria which have to be fulfilled in order for the requirement to be fulfilled. In addition to the functional and non functional requirements of the product, the ANSI/IEEE standard also stipulates that constraints, risks and other properties of the projects be defined. The end result is a highly structured document with 7 sections. Provided that standard titles or standard numbering is used, a text analysis tool should easily recognize what is being described even if the description itself is not interpretable. By having such a structured document a tester has an easier job of extracting test cases. The job becomes even easier if the structured requirements are supplemented by acceptance criteria as proposed by Christiana Rupp and others [9]. After every functional and non functional requirement a rule is defined for determining whether the requirement is fulfilled or not. Such a rule could be that in case of a withdrawal from an account, the balance has to be less than the previous balance by the withdrawal amount. Account = Account@pre Withdrawal;An acceptance criterion is equivalent to a post condition assertion so that it can be readily copied into a test case definition.Semi formal requirements go one step further. They have their text content placed in a specific format, such as the use case format. Use cases are typical semi formal descriptions. They have standardized attributes which the requirement writer must fill out, attributes like trigger, rule, precondition, post condition, paths, steps and relations to other use cases. In the text these attributes will always have the same name so that a tool can readily recognize them. Most of the use cases are defined in standard frameworks or boxes which make it even easier to process them [10].A good semi formal requirements document will also have links between the use cases and the functional requirements. Each requirement will consist of a few sentences and will have some kind of number or mnemonic identifier to identify it. This identifier will then be referred to by the use case. One use case can fulfill one or more functional requirements. One attribute of the use case will be a list of such pointers to the requirements it fulfills [11].At the upper end of a semiformal requirement specification arithmetic expressions or logical conditions may be formulated. Within an informal document there can be scattered formal elements. These should be recognizable to an analysis tool.In the current world of information technology, the requirement documents range from structured to semi formal. Even the most backward users will have some form of structured requirements document in which it is possible to distinguish between individual functional requirements as well as between constraints and non functional requirements. More advanced users will have structured, semi formal documents in which individual requirements are numbered, use cases are specified with standardized attributes, and processing rules are defined in tables. Really sophisticated requirement documents such as can be found in requirements engineering tools like Doors and Rational Requisite Pro will also have links between requirements, rules, objects and processes, i.e. use cases [12].3. The Testing StrategyA software system tester in industry is responsible for demonstrating that a system does what it is supposed to do. To accomplish this, he must have an oracle to refer to. The concept of an automated oracle for functional testing was introduced by Howden in 1980 [13]. As foreseen by Howden then,the test oracle was to be a formal specification in terms of pre and post conditions. However the oracle could also be a natural language text provided the text is structured and has some degree of formality. In regression testing the oracle is the input and output data of the previous version. In unit testing it is the pre and post conditions of the methods and the invariant states of the objects. In integration testing it is the specification of the interfaces and in system testing it is the requirements document [14]. Thus, it is the task of the system tester to extract test cases from the functional and non functional requirements. Using this as a starting point, he then proceeds to carry out seven steps on the way to achieving confidence in the functionality of a software system. These seven steps are:identifying the test casescreating a test designspecifying the test casesgenerating the test casessetting up the test environmentexecuting the testevaluating the test.3.1 Identifying the test casesHaving established what it is to be tested against, i.e. the test oracle, it is first up to the tester to analyze that object and to identify the potential test cases. This is done by scanning through the document and selecting all statements about the behavior of the target system which need to be confirmed. These statements can imply actions or states, or they define conditions which have to be fulfilled if an action is to take place or a state is to hold [15].Producing a customer reminder is an action of the system. The fact that the customer account is overdrawn is a state. The rule that when a customer account is overdrawn the system should produce a customer reminder is a condition. All three are candidates for a test case. Testing whether the system produces a customer reminder is one test case. Testing if the customer account can be overdrawn is another test case, and testing whether the system produces a customer reminder when the customer account is overdrawn is a test case which combines the other two.In scanning the requirements document the tester must make sure to recognize each action to be performed, each state which may occur and each condition under which an action is performed or a state occurs. From these statements the functional test cases are extracted. But not only the functional test cases. Statements like the response time must be under 3 seconds and the system must recognize any erroneous input data are non functional requirements which must be tested. Every statement about the system, whether functional or non functional is a potential test case. The tester must recognize and record them [16].3.2. Creating a test designOf course, this is only the beginning of a system test. Once the test cases have been defined they must be ordered by time and place and grouped by test session. A test session encompasses a series of test cases performed within one dialog session or one batch process. In one session several requirements and several related use cases are executed. The test cases can be run sequentially or in parallel. The result of this test case ordering by execution sequence is part of the test design.3.3 Specifying the test casesFollowing the test design is the test case specification. This is where the attributes of the test cases are filled out in detail down to the level of the input and output data ranges. Each test case will already have an identifier, a purpose, a link to the requirements, objects and use cases it tests, as well as a source, a type and a status. It may even have a pre and post condition depending on how exact the requirements are. Now it is up to the tester to design the predecessor test cases, the physical interface or database being tested and to assign data values. Normally the general test case description will be in a master table whereas the input and output values will be in sub tables one for the test inputs and one for the expected outputs. In assigning the data, the tester will employ such techniques as equivalence classes, representative values, boundary values and progression or degression intervals. Which technique is used, depends on the type of data. In the end there will be for each test case a set of arguments and results [17].3.4 Generating the test dataProvided the test data definitions are made with a formal syntax, the test data itself can then be automatically generated. The tester may only have to oversee and guide the test data generation process. The basis for the test data generation will be the interface descriptions such as HTML forms, XML schemas, WSDL specifications and SQL database schemas. The values extracted from the test case, specifications are united with the structuralinformation provided by the data definition formats to create test objects, i.e. GUI instances, maps, records, database tables and other forms of test data [18].3.5 Setting up the test environmentIn the 5th step the test environment is prepared. Test databases must be allocated and filled with the generated data. Test work stations are loaded with the client software and the input test objects. The network is activated. The server software is initialized. The source code may be instrumented for tracing execution and test coverage.3.6 Execution the testNow the actual test can be started, one session at a time or several sessions in parallel depending on the type of system under test. The system tester will be either submitting the input data manually or operating a tool for submitting the data automatically. The latter approach is preferable since it is not only much faster, but also more reliable and above all repeatable. While the test is running the execution paths are being monitored and the test coverage of the code is being measured.3.7 Evaluating the testAfter each test session or test run the tester should perform an analysis of the test results. This entails several sub tasks. One sub task will be to report any incidents which may have occurred during the test session. Another task will be to record and document the functional test coverage. A third and vital task is to confirm the correctness of the data results, i.e. the post conditions. This can and should be done automatically by comparing the actual results with the expected results as specified in the test cases. Any deviations between the actual and the specified data results should be reported. Finally the tester will want to record various test metrics such as the number of test cases executed, the number of requirements tested, the number of data validated, the number of errors recorded and the degree of test coverage achieved [19].4. Automating the requirement analysisAs can be gathered from this summary of the system tester s tasks, there are many tasks which lend themselves to automation. Both test data generation and test data validation can be automated. Automated test execution has been going on for years and there are several tools for performing this. What are weakly automated are the test case specification and the test design. Not automated at all are the activities setting up the test environment and identifying the test cases [20].The focus of this paper is on the latter activity, i.e., identifying and extracting test cases. It is the first and most important task in functional system testing. Since the test we are discussing here is a requirements based test, the test cases must be identified in and extracted from the requirements document.The tool for doing that is the text analyzer developed by the author. The same tool goes on to create a test design, thus covering the first two steps of the system testing process. The Text Analyzer was conceived to do what a tester should do when he begins a requirements based system test. It scans through the requirements text to pick out potential test cases.4.1 Recognizing and selecting essential objects The key to requirements analysis is to have a natural language processor which extracts information from the text based on key words and sentence structure. This is referred to as text mining, a technique used by search engines on the internet. [21] The original purpose of text mining was to automatically index documents for classification and retrieval. The purpose here is to extract test cases from natural language text.Test cases relate to the objects of a system. Objects in a requirement document are either acted upon or their state is checked. Therefore, the first step of the text analysis is to identify the pertinent objects. For this all of the nouns must be identified. This is not an easy task, especially in the English language, since nouns can often be verbs or compound words such as master record. In this respect other languages such as German and Hungarian are more precise. In German nouns begin with a capital letter which makes the object recognition even easier.A pre scanner can examine the text to identify and record all nouns. However, only the human analyst can determine which nouns are potential objects based on the context in which they are used. To this end all of the nouns are displayed in a check box and the user can uncheck all nouns which he perceives to be irrelevant. The result is a list of pertinent nouns which can be recorded as the essential objects. Depending on the scope of the requirementsdocument their number can be anywhere from 100 to 1000.Besides that, object selection is apt to trigger a lengthy and tedious discussion among the potential users about which objects are relevant and which are not. In presenting the list of potential objects it becomes obvious, how arbitrary software systems are. In order to come up with an oracle to test against, the users must first come to a consensus on what the behavior of the system should be. Confronting them with the contradictions in their views helps to establish that consensus. [22]4.2 Defining key words in contextAs a prerequisite for the further text analysis, the user must identify the key words used in the requirement text. These key words can be any string of characters, but they must be assigned a predefined meaning. This is done through a key word table. There are currently some 20 predefined notions which can be assigned to a key word in the text. These are:SKIP= ignore lines beginning with this word REQU= this word indicates a requirementMASK= this word indicates a user interfaceINFA= this word indicates a system interface REPO = this word indicates a reportINPT = this word indicates a system inputOUTP = this word indicates a system outputSERV = this word indicates a web serviceDATA = this word indicates a data storeACT= this word indicates a system actorTRIG= this word indicates a triggerPRE= this word indicates a preconditionPOST= this word indicates a post condition PATH= this word indicates a logical path or sequence of stepsEXCP= this word indicates an exception condition ATTR = this word indicates any user assigned text attributeRULE= this word indicates a business rule PROC = this word indicates a business process GOAL = this word indicates a business goalOBJT= this word is the name of an object.By means of the key words, the analyzer is able to recognize certain requirement elements embedded in the prose text.4.3 Recognizing and extracting potential test cases The next step is for the tool to make a second scan of the document. This time only sentences in which an essential object occurs are processed, the others are skipped over. Each sentence selected is examined whether it is an action, a state query, or a condition. The sentence is an action when the object is the target of a verb. The sentences The customer account is updated daily and The system updates the customer account are both actions. The account is the object and updates is the action. The test case will be to test whether the system really updates the account.The sentence The account is overdrawn when the balance exceeds the credit limit is a state which needs to be tested and the sentence If an account is overdrawn, it should be frozen until a payment comes in is a condition combining an object state with an object action. The object is the account. The state is overdrawn. The action is should be frozen. There are actually two tests here. One is to confirm that an account can become overdrawn. The other is to confirm that an account is frozen when it is overdrawn.To qualify as a statement to be tested, a sentence must contain at least one relevant object. In the sentence If his credit rating is adequate, the customer can order a book. there are three relevant objects - credit, customer and book - so this qualifies the sentence to be processed further. The clause if his credit rating is adequate indicates that this is a condition which needs to be tested. There are many words which can be used to identify a condition. Besides the word if there are other words like should, provided, when, etc. there are also word patterns like in case of and as long as. When they occur the statement is assumed to be a condition.If the sentence is not a condition it may be a state declaration. A state declaration is when a relevant object is declared to be in a given state, i.e.The customer must be registered.The word customer is a selected object and the word pattern be registered indicates a state that the object is in. Predicate verbs such as be, is, are, were, etc denote that this is a state declaration.If the sentence is neither a condition nor a state, it may be an action. An action is indicated by a verb which acts upon a selected object e.g.The system checks the customer order.Here the order is a relevant object and checks is a verb which acts upon it. Normally these verbs will end with an s if they are in present tense and with ed if they are in past tense. So this makes it easier to recognize them. The advantage of requirement texts as opposed to texts in general is that they are almost always written in the third person, thus reducing the number of verb patterns to be checked. Sentences which qualify as a statement to be tested are extracted from the text and stored in the test case table. Assuming that all sentences are embedded in the text of a section,, a requirement or a use case, it is possible to assign test cases to individual requirements, use cases or simply to titled sections. If a test case originates from a requirement it receives the number or title of that requirement. If the test cases are created from a use case, then they bear the title of that use case. If these structural elements are missing the test case is simply assigned to the last text title. Relations are also established between test cases and objects. Test cases extracted from a particular sentence will have a reference to the objects referred to in that sentence.A generated test case will have an id, a purpose, a trigger, a pre-condition and a post-condition. The id of the test case is generated from the system name and a running number. The condition if the customer s credit rating is adequate, he can order a book implies two pre conditions1.the customer s credit rating is adequate2.the customer s credit rating is not adequate There are also two post conditions1.the customer has ordered a book2.the customer has not ordered a bookThis shows that for every conditional clause there should be two test casesone which fulfils the condition, andanother which does not fulfil the condition. They both have the same trigger, namely the customer orders a book.These are samples of functional test cases. Non functional test cases are all either states or conditions. The sentence The system should be able to process at least 2000 transactions per hour is a state denoted by the verb should be. The sentence In case of a system crash, the system has to be restarted within 2 minutes is a condition determined by the predicate In case of, followed by an action restarted. Both requirements must be tested. The tool itself can only distinguish between functional and non functional test cases based on the objects acted on or whose state is checked. Here again the user must interact by marking those objects such as system which are not part of the actual application.4.4 Storing the potential test casesThe result of the text analysis is a table of potential system test cases. If the requirements document is structured so that the individual requirements are recognizable, the test cases will be ordered by requirement. If there are use case definitions, the test cases extracted from a particular use case will be associated with that use case. Otherwise, the test cases will be grouped by subtitles.In the end every test case, whether functional or non-functional will have at least the following attributes:a test case Ida test case purpose = the sentence fromwhich the case was takena test case type = {action | state | condition }a preconditiona post conditiona triggera reference to the objects involveda reference to the requirements being testeda reference to the use case being tested5. Generating a test designIt is not enough to extract potential test cases. The test cases also need to be assigned to an overall test framework. The test framework is derived from the structure of the requirements document. Requirements should be enhanced by events. An event is something which occurs at one place at one time. Use cases are such events. An account withdrawal is an example of a use case event. A money transfer is another event. Printing out an account statement is yet another event. Events are triggered by a user, by the system itself or by some other system.In system testing it is essential to test every event, first independently of the other events and then in conjunction with them. An event will have at least two test cases - a positive and a negative outcome, but it may have many. In the case of an account withdrawal, the user may give in a bad PIN number, he may have an invalid card, the amount to be withdrawn may exceed the daily limit or his account may be frozen. There are usually 4 to 20 test cases for each use case.In generating a test design the text analyzer tool orders the test cases by event. The event is the focus of a testing session. Requirements and essential objects are assigned to an event so that it becomes clear which functions and which objects are tested within a session. If recognizable in the requirements text, the user or system interface for an event is also assigned. This grouping of all relevant information pertaining to an event is then presented in an XML document for viewing and editing by the tester. In so doing, the text analyzer has not only extracted the potential test cases from the requirements, it has also generated a test design based on the events specified.6. Experience with automated requirements analysisThe German language version of the text analyzer was first employed in a web application for the state of Saxony at the beginning of 2005. The requirements of that application were split up among 4 separate documents with 4556 lines of text. Some 677 essential objects were identified. Specified with these objects were 644 actions, 103 states and 114 rules. This led to 1103 potential test cases in 127 use cases. The generated test case table served as a basis for the test case specification. As might be expected, several test cases were added, so in the end there were 1495 test cases to be tested. These test cases revealed 452 errors in the system under test as opposed to the 96 errors discovered in production giving an error discovery rate of 89%. This demonstrated that the automatic extraction of test cases from requirements documents, complemented by manual test case enhancement is a much cheaper and more efficient way of exposing errors than a pure manual test case selection process [23]. Besides that it achieves higher functional test coverage. In this project over 95% of the potential functions were covered.Since this first trial in the Saxon e-Government project the German language version has been employed in no less than 12 projects to generate test cases from the requirements text including a project to automate the administration of the Austrian Game Commission, a project to introduce a standard software package for administering the German water ways, and a project to develop a university web site for employment opportunities.The English language version has only recently been completed, but has already been used in 3 projects once for analyzing the use cases of a mobile phone billing system, secondly for analyzing the requirements of an online betting system, and thirdly to generate test cases for a Coca Cola bottling and distribution system. In the case of the mobile billing system, a subsystem with 7 use cases was analyzed in which there were 78 actions and 71 rules for 68 objects rendering 185 test cases. The online betting system had 111 requirements of which 89 were functional and 22 were non-functional. There were 69 states, 126 actions and 112 rules for 116 specified objects from which 304 test cases were extracted. The specification of the Coca Cola distribution system is particularly interesting because it used neither a list of requirements nor a set of use cases, but instead a table of outputs to a relational database. In the first column of the table was the name of the output data, in the second the data description, in the third the algorithm for creating the data and in the fourth the condition for triggering the algorithm. A typical output specification is depicted in Table 1. Name Definition Source ConditionA400TotalNumber ofBottlesXX20QuantityfromMobileDeviceTranstype<5(Sampling)Transtype >7(Breakage)ARTIDF =1Aor1RTable 1: Output SpecificationFor this one output 6 test cases were generated Transtype <5 & ARTIDF = 1ATranstype <5 & ARTIDF = 1RTranstype <5 & ARTIDF ! = 1A & ARTIDF ! = 1RTranstype > 7 & ARTIDF = 1ATranstype > 7 & ARTIDF = 1ATranstype > 7 & ARTIDF = 1RTranstype > 7 & ARTIDF ! = 1A & ARTIDF ! = 1R。
模糊深度学习网络算法的研究一、本文概述Overview of this article随着和机器学习技术的快速发展,深度学习已成为许多领域中的主流方法,尤其在图像识别、语音识别和自然语言处理等方面取得了显著的突破。
然而,传统的深度学习网络在处理模糊、不确定或含有噪声的数据时,其性能往往会受到严重影响。
因此,针对模糊数据的深度学习网络算法的研究具有重要的理论价值和实际应用意义。
With the rapid development of machine learning technology, deep learning has become a mainstream method in many fields, especially in areas such as image recognition, speech recognition, and natural language processing, where significant breakthroughs have been made. However, traditional deep learning networks often suffer from serious performance issues when dealing with fuzzy, uncertain, or noisy data. Therefore, the research on deep learning network algorithms for fuzzy data has important theoretical value and practical application significance.本文旨在深入研究模糊深度学习网络算法,探讨其基本原理、发展现状和未来趋势。
文章首先介绍了模糊数据的概念和特性,然后分析了模糊深度学习网络算法的基本原理和优势,接着回顾了近年来模糊深度学习网络算法在各个领域的应用案例和研究成果,最后指出了当前研究中存在的问题和未来的发展方向。
ReferencesAiton EJ(1985)Leibniz:a biography.Hilger,LondonAmbuehl M,Baumgartner M(2017)CNA:causal modeling with coinci-dence analysis.R package version 2.0.0.https:/// package=cnaBarrenechea R,Mahoney J(2017)A set-theoretic approach to Bayesian process tracing.Sociol Methods Res.https:///10.1177/ 0049124117701489Baumgartner M(2009)Inferring causal complexity.Sociol Methods Res 38(1):71–101.https:///10.1177/0049124109339369Baumgartner M(2013)Detecting causal chains in small-n data.Field Methods 25(1):3–24.https:///10.1177/1525822X12462527Baumgartner M(2015)Parsimony and causality.Qual Quant49:839–856. https:///10.1007/s11135-014-0026-7Baumgartner M,Thiem A(2017)Often trusted but never(properly)tested: evaluating qualitative comparative analysis.Sociol Methods Res.https:// /10.1007/s11229-008-9348-0Bennett B(2012)Logically fallacious.The ultimate collection of over300log-ical ,Sudbury.https:// Berg-Schlosser D(2012)Mixed methods in comparative politics:principles and applications.Palgrave Macmillan,BasingstokeBogin B(1998)The tall and the short of it.Discover19(2):40–44Bolton-Smith C,Woodward M,Tunstall-Pedo H,Morrison C(2000)Accuracy of the estimated prevalence of obesity from self reported height and weight in an adult Scottish population.J Epidemiol Community Health54:143–148 Boole G(1854)An investigation of the laws of thought.Walton&Maberly, London.Available online,April2017:/files/ 15114/15114-pdf.pdfBorkowski L(ed)(1970)JanŁukasiewicz:selected works.North Holland, Amsterdam273©Springer International Publishing AG,part of Springer Nature2019A.Dus,a,QCA with R,https:///10.1007/978-3-319-75668-4274References Braumoeller B(2015a)QCAfalsePositive:tests for type I error in qualita-tive comparative analysis(QCA).R package version1.1.1.https://CRAN. /package=QCAfalsePositiveBraumoeller BF(2015b)Guarding against false positives in qualitative com-parative analysis.Polit Anal23(4):471–487.https:///10.1093/pan/ mpv017Braumoeller B,Goertz G(2000)The methodology of necessary conditions. Am J Polit Sci44(4):844–858.https:///10.2307/2669285Caren N,Panofsky A(2005)TQCA.A technique for adding temporality to qualitative comparative analysis.Sociol Methods Res34(2):147–172. https:///10.1177/0049124105277197Cebotari V,Vink MP(2013)A configurational analysis of ethnic protest in Europe.Int J Comp Sociol54(4):298–324Cheli B,Lemmi A(1995)A“totally”fuzzy and relative approach to the multidimensional analysis of poverty.Econ Notes1:115–134Cronqvist L,Berg-Schlosser D(2009)Multi-value QCA(mvQCA).In:Rihoux B,Ragin C(eds)Configurational comparative methods:qualitative compar-ative analysis(QCA)and related techniques.Sage,London,pp69–86 Dalgaard P(2008)Introductory statistics with R,2nd edn.Springer, New YorkDauben JW(1979)Georg cantor.His mathematics and philosophy of the infinite.Princeton University Press,PrincetonDe Meur G,Rihoux B,Yamasaki S(2009)Addressing the critiques of QCA. In:Rihoux B,Ragin C(eds)Configurational comparative methods:quali-tative comparative analysis(QCA)and related techniques.Sage,London, pp147–165Dus,a A(2007)Enhancing PASSS Working Paper. /wpseries/Dusa2007b.pdfDus,a A(2010)A mathematical approach to the Boolean minimization prob-lem.Qual Quant44:99–113.https:///10.1007/s11135-008-9183-x Dus,a A(2017)Venn:draw venn diagrams.R package version1.5.https:// /package=vennDus,a A,Thiem A(2015)Enhancing the minimization of Boolean and multi-value output functions with eQMC.J Math Sociol39:92–108.https://doi. org/10.1080/0022250X.2014.897949Emmenegger P,Schraff D,Walter A(2014)QCA,the truth table analysis and large-N survey data:the benefits of calibration and the importance of robustness PASSS Working Paper./ wpseries/EmmeneggerSchraffWalter2014.pdfFox J(2005)The R commander:a basic statistics graphical user interface to R.J Stat Softw14(9):1–42./v14/i09Garcia-Castro R,Ariño MA(2016)A general approach to panel data set-theoretic research.J Adv Manag Sci Inf Syst2:63–76Gibson BC,Burrel V(2017)braQCA:bootstrapped robustness assessment for qualitative comparative analysis.R package version0.9.9.6.https://CRAN. /package=braQCAReferences275 Goertz G(2003)Cause,correlation and necessary conditions.In:Goertz G, Starr H(eds)Necessary conditions:theory,methodology,and applications. Rowman&Littlefield,Lanham,pp47–64Goertz G(2006a)Assessing the trivialness,relevance,and relative importance of necessary or sufficient conditions in social science.Stud Comp Int Dev 41(2):88–109.https:///10.1007/BF02686312Goertz G(2006b)Social science concepts.A user’s guide.Princeton University Press,PrincetonHaesebrouck T(2015)Pitfalls in QCA’s consistency measure.J Comp Polit 2:65–80.Handle:1854/LU-6834276Hak T,Jaspers F,Dul J(2013)The analysis of temporarily ordered config-urations:challenges and solutions.In:Fiss PC,CambréB,Marx A(eds) Configurational theory and methods in organizational research.Emerald Group Publishing,Bingley,pp107–127Hino A(2009)Time-series QCA:studying temporal change through Boolean analysis.Sociol Theory Methods24(2):247–265Hug S(2013)Qualitative comparative analysis:how inductive use and mea-surement error lead to problematic inference.Polit Anal21(2):252–265. https:///10.1093/pan/mps061Hume D(1999)An enquiry concerning human understanding.In:Beauchamp T(ed)Oxford philosophical texts.Oxford University Press,OxfordKing G,Keohane RO,Verba S(1994)Designing social inquiry.Scientific in-ference in qualitative research.Princeton University Press,Princeton Krogslund C,Choi DD,Poertner M(2015)Fuzzy sets on shaky ground:pa-rameter sensitivity and confirmation bias in fsQCA.Polit Anal23(1):21–41. https:///10.1093/pan/mpu016Krook ML(2010)Women’s representation in parliament:a qualitative com-parative analysis.Polit Stud58(5):886–908Lazarsfeld P(1937)Some remarks on typological procedures in social research. Z Sozial6:1–24.Available on July2017:http://dspace.gipe.ac.in/xmlui/ handle/10973/33569Lipset MS(1959)Some social requisites of democracy:economic development and political legitimacy.Am Polit Sci Rev53(1):69–105Lucas SR(2014)Rejoinder:taking heat and giving light–reflections on the early reception of“qualitative comparative analysis in critical perspective”. Sociol Methodol44(1):127–158.https:///10.1177/0081175014544105 Lucas SR,Szatrowski A(2014)Qualitative comparative analysis in crit-ical perspective.Sociol Methodol44(1):1–79.https:///10.1177/ 0081175014532763Mahoney J,Kimball E,Koivu KL(2009)The logic of historical explanation in the social p Polit Stud42(1):114–146.https:///10. 1177/0010414008325433Marx A,Dus,a A(2011)Crisp-set qualitative comparative analysis (csQCA),contradictions and consistency benchmarks for model specifica-tion.Methodol Innov Online6(2):103–148.https:///10.4256/mio. 2010.0037276References Marx A,Rihoux B,Ragin C(2014)The origins,development,and applica-tion of qualitative comparative analysis:the first25years.Eur Polit Sci Rev6(1):115–142.https:///10.1017/S1755773912000318 McCluskey EJ(1956)Minimization of Boolean functions.Bell Syst Tech J 5:1417–1444Medzihorsky J,Oana IE,Quaranta M,Schneider CQ(2017)SetMethods: functions for set-theoretic multi-method research and advanced QCA.R package version2.1.https:///package=SetMethods Murdoch DJ(2004)Venn diagrams in R.J Stat Softw11(1):1–3.https://doi. org/10.18637/jss.v011.c01,https:///v011/c01Murrell P(2006)R graphics.Chapmann&Hall,Boca RatonNeuman LW(2003)Social research methods:qualitative and quantitative approaches,5th edn.Allyn Bacon,BostonPersico N,Postlewaite A,Silverman D(2004)The effect of adolescent expe-rience on labor market outcomes:the case of height.J Polit Econ112(5): 1019–1053Quine WVO(1952)The problem of simplifying truth functions.Am Math Mon59(8):521–531Quine WVO(1955)A way to simplify truth functions.Am Math Mon 62(9):627–631Ragin C(1987)The comparative method.Moving beyond qualitative and quantitative strategies.University of California Press,BerkeleyRagin C(2000)Fuzzy set social science.University of Chicago Press,Chicago Ragin C(2005)From fuzzy sets to crisp truth PASSS Working Paper./wpseries/Ragin2004.pdfRagin C(2006)User’s guide to fuzzy-set/qualitative comparative analysis2.0. Tucson,ArizonaRagin C(2008a)Measurement versus calibration:a set theoretic approach. In:Box-Steffensmeier J,Brady HE,Collier D(eds)The Oxford handbook of political methodology.Oxford University Press,Oxford,pp174–198 Ragin C(2008b)Redesigning social inquiry.Fuzzy sets and beyond.University of Chicago Press,ChicagoRagin C(2014)Lucas and Szatrowski in critical perspective.Sociol Methodol 44(1):80–94.https:///10.1177/0081175014542081Ragin C,Rihoux B(2004)Qualitative comparative analysis(QCA):state of the art and prospects.Qual Methods2:3–13Ragin C,Sonnett J(2005)Between complexity and parsimony:limited diversity,counterfactual cases,and comparative analysis.In:Kropp S, Minkenberg M(eds)Vergleichen in der Politikwissenschaft.VS Verlag für Sozialwissenschaften,Wiesbaden,pp180–197.https:///10.1007/ 978-3-322-80441-9Ragin C,Sonnett J(2008)Limited diversity and counterfactual cases.In: Ragin C(ed)Redesigning social inquiry.Fuzzy sets and beyond.University of Chicago Press,Chicago,pp147–159References277 Ragin C,Strand SI(2008)Using qualitative comparative analysis to study causal ment on Caren and Panofsky.Sociol Methods Res 36(4):431–441.https:///10.1177/0049124107313903Rihoux B,De Meur G(2009)Crisp-set qualitative comparative analysis (csQCA).In:Rihoux B,Ragin C(eds)Configurational comparative meth-ods:qualitative comparative analysis(QCA)and related techniques.Sage, London,pp33–68Royston P,Altman DG(1994)Regression using fractional polynomials of continuous covariates:parsimonious parametric modelling.J R Stat Soc Ser C43(3):429–467RStudio,Inc.(2013)Easy web applications in R./ shiny/Ruskey F,Weston M(2005)Venn diagrams.Electron J Comb Dyn Surv DS5. /ojs/index.php/eljc/article/view/DS5/html Sauerbrei W,Royston P(1999)Building multivariable prognostic and diagnos-tic models:transformation of the predictors by using fractional polynomials. J R Stat Soc Ser A162(1):71–94Schneider CQ,Rohlfing I(2013)Combining QCA and process tracing in set-theoretic multi-method research.Sociol Methods Res42(4):559–597. https:///10.1177/0049124113481341Schneider CQ,Rohlfing I(2016)Case studies nested in fuzzy-set QCA on sufficiency:formalizing case selection and causal inference.Sociol Methods Res45(3):536–568.https:///10.1177/0049124114532446 Schneider C,Wagemann C(2012)Set-theoretic methods for the social sciences.A guide to qualitative comparative analysis.Cambridge University Press, CambridgeSchneider CQ,Wagemann C(2013)Doing justice to logical remainders in QCA:moving beyond the standard analysis.Polit Res Q66(1):211–220. https:///10.1177/1065912912468269hSchneider MR,Schulze-Bentrop C,Paunescu M(2010)Mapping the institu-tional capital of high-tech firms:a fuzzy-set analysis of capitalist variety and export performance.J Int Bus Stud41:246–266Seawright J(2014)Comment:limited diversity and the unreliability of QCA. Sociol Methodol44(1):118–121.https:///10.1177/0081175014542082 Shannon CE(1940)A symbolic analysis of relay and switching circuits.Mas-ter’s thesis,Massachusetts Institute of Technology,Department of Electrical Engineering.Available on,July2017:https:///handle/1721. 1/11173Skaaning SE(2011)Assessing the robustness of crisp-set and fuzzy-set QCA results.Sociol Methods Res40(2):391–408.https:///10.1177/ 0049124111404818Skocpol T(1979)States and social revolutions.A comparative analysis of France,Russia,and China.Cambridge University Press,Cambridge Smithson M,Verkuilen J(2006)Fuzzy set theory.Applications in the social sciences.Sage,Thousand Oaks278References Spirtes P,Glymour C,Scheines R(2000)Causation,prediction,and search, 2nd edn.MIT Press,CambridgeThiem A(2014)Membership function sensitivity of descriptive statistics in fuzzy-set relations.Int J Soc Res Methodol17(6):625–642Thiem A(2016)Standards of good practice and the methodology of necessary conditions in qualitative comparative analysis.Polit Anal24(4):478–484 Thiem A,Dus,a A(2013)Qualitative comparative analysis with R.A user’s guide.Springer,New YorkThiem A,Spöhel R,Dus,a A(2016)Enhancing sensitivity diagnostics for qual-itative comparative analysis:a combinatorial approach.Polit Anal24:104–120.https:///10.1093/pan/mpv028Thompson SL(2011)The problem of limited diversity in qualitative com-parative analysis:a discussion of two proposed solutions.Int J Mult Res Approaches5(2):254–268.https:///10.5172/mra.2011.5.2.254 Valero-Mora PM,Ledesma RD(2012)Graphical user interfaces for R.J Stat Softw49(1):1–8Verkuilen J(2005)Assigning membership in a fuzzy set analysis.Sociol Meth-ods Res33(4):462–496.https:///10.1177/0049124105274498 Verzani J(2005)Using R for introductory statistics,2nd edn.Chapman& Hall,Boca RatonWeber M(1930)The protestant ethic and the spirit of capitalism.Routledge, LondonWilkinson L(2011)Exact and approximate area-proportional circular venn and Euler diagrams.IEEE Trans Vis Comput Graph18(2):321–331.https:// /10.1109/TVCG.2011.56Yamasaki S,Rihoux B(2009)A commented review of applications.In:Ri-houx B,Ragin C(eds)Configurational comparative methods:qualita-tive comparative analysis(QCA)and related techniques.Sage,London, pp123–145Zadeh LA(1965)Fuzzy sets.Inf Control8:338–353Zuur A,Ieno E,Meesters E(2009)A beginner’s guide to R.Springer, New York。
Fuzzy data: XML may handle it Keywords: Fuzzy data, Model flexibility, XML schemaAuthor: Ralf Schweiger; Simon Hoelzer MD, Joachim Dudeck MDarXiv:cs.IR/0007017 13 Jul 2000Institute of Medical Informatics, Justus-Liebig-University Giessen, Germany_______________________________________ Author Contact Address: Ralf Schweiger Heinrich-Buff-Ring 44 35392 Giessen Germany tel.:+49-641-9941370 fax.:+49-641-9941359 mailto:Ralf.Schweiger@informatik.med.uni-giessen.deFuzzy data: XML may handle itAbstract Data modeling is one of the most difficult tasks in application engineering. The quality of the data model often determines the quality of the application itself. As a consequence, data modeling has to be done very carefully. The engineer must be aware of the use cases and the required application services and at a certain point of time he has to fix the data model which forms the base for the application services. However, once the data model has been fixed it is difficult to consider changing needs. This might be a problem in specific domains, which are as dynamic as the healthcare domain. With fuzzy data we address all those data that are difficult to organize in a single database. In this paper we discuss a gradual and pragmatic approach that uses the XML technology to conquer more model flexibility. XML may provide the clue between unstructured text data and structured database solutions and shift the paradigm from „organizing the data along a given model“ towards „organizing the data along user requirements“.Introduction Most heavily, XML is discussed as a message format (1,2). Existing interchange formats are often limited with respect to the number of available delimiters and with respect to the number of hierarchical levels. With XML on the other hand we may easily invent new delimiters and the simple start-end-delimitation of XML can express any hierarchical structure. In addition, an arriving XML message can be easily parsed and transformed using the DOM and XSL facility. XML consequently provides the communication framework that will facilitate the development of communication interfaces (3).However, we might use XML also as a storage format. Database solutions are well accepted in domains where the data structures are approximately clear. Clear in this context implies a „broad consensus“ and the „validity over a long period of time“. However, this is not true for all domains. Especially in the healthcare domain we often find narrative documents that are difficult to exploit with respect to their content. Experts in medical information science consequently postulate the insertion of more structure and more codes into medical documents (4). The reasons for this situation are manifold. Healthcare data are document oriented, that means the healthcare data are organized into cohesive communication units that contain different kinds (administrative and clinical) of data. Such data are difficult to organize in a single database. Another reason for this situation is the fact that healthcare data need to be very flexible with respect to their structure. It must be possible to put a comment into any context of the clinical document. Any model that restricts the proper, i.e. the context related accommodation of the information would fail sooner or later. A model must not put constraints on the documentation process, but has to obey the user requirements. Finally, we cannot reduce clinical documents to a set of related dataitems since items often have a descriptive context. We consequently need the possibility to freely mix up data items with narrative text. Database schemas are often not flexible enough to satisfy these constraints (cohesive form, flexibility to change and narrative context).With XML on the other hand, we may invent markup for the identification of single items in textual documents, i.e. we add structure to the data rather than adding data to a given structure. The data consequently remain in a cohesive form. In addition, the structure remains flexible since we can easily add new markup, i.e. structure to the documents. Besides, XML provides the concept of mixed content models allowing to freely mix up single items with narrative text. The problem of the XML approach reveals, when we have to manage a large set of related documents, e.g. the reports of an entire pathology institute. We run the risk of losing control over the items contained in the various documents. What we need is a sort of data model or schema that can be used to establish search strategies upon the document base. The XML schema approach (5) may help to solve the problem.The concept The idea is to let the document author extend the document where and when necessary and to automatically update an XML schema definition which represents the overall document model. The XML schema definition keeps track of the items contained in a set of related documents and can be used to establish search strategies upon the document set. XML consequently provides the means to preserve the flexibility of free text documents AND to schematize the data at the same time. XML may provide the clue between unstructured text data and structured database solutionsand shift the paradigm from organizing the data along a given and often fixed schema towards organizing the data along changing user requirements.XML schemaXML documentsFigure 1: The XML schema as a superset and summary of the items contained in a set of related documents. We may change the schema as easily as the documents (both are XML files) thus combining the flexibility of free text with the schematization of a database.Method The following figure outlines the overall architecture of our approach. In the center of the architecture is a software component, which will be referred to as manager. The manager uses an XML schema definition of the document model to automatically generate and organize a corresponding user front and storage back end. As a consequence, the application system can be easily adjusted to changing user requirements by simply providing a different model description. If needed, the manager will reorganize existing data. In addition, the manager changes the user interface so that the end user can enter data instances to the newly added model items. The main difference of our approach compared to a database approach is the fact that the meta data, i.e. thecontent model can be updated as easily as the data itself. In addition, the manager handles both, the user front and the storage back end. The model description, the user front end (data entry and data presentation) and the storage back end will be now described in separate sections.Model descriptionUser interface Document store Manager Style FormFigure 2: XML based application system that improves the model flexibility. The manager automatically adjusts the entire application system to the latest model description (XML schema definition). The user himself may change the document model in order to satisfy the latest documentation requirements.Model description For the description of a document model, we use a standard XML schema definition (Schema). Figure 3 presents the XML schema of a simple clinical report. The root element of a corresponding model instance, i.e. an XML document that validates against the XML schema, is the report element. According to its type, the report element contains a report date, a sender and a receiver of the report, a patient that the report relates to, a report subject (reason of communication) and a report content (clinical findings etc.). The sender and the receiver of the report are both of type PersonType, i.e. they have a name and an address. The PatientType isderived from the PersonType by extension that means the patient has a name, an address and in addition a date of birth and a gender. Elements without an explicit type such as the report date and the report subject are assumed to have the simple type „string“. The minOccurs and maxOccurs attributes of the XML schema namespace are used to define optional elements such as the person address and repeatable elements such as the address telecommunication (telephone, facsimile, email etc.).The standard XML schema markup (default namespace) is mixed up with the markup of a nonstandard user namespace. The user namespace defines a few XML attributes such as prompt and form which allow the schema designer to easily assign and relate elements of the user form to elements of the document model. The usage of a nonstandard namespace for the description of data forms is just pragmatism and might be replaced by any other namespace with similar expressiveness. All elements in the XML schema with simple types correspond to data entry forms in the user interface. The gender element e.g. has the prompt „Geschlecht“ and the possible gender values m(ale), f(emale) and no value are represented by the prompts „mann“, „frau“ and „undefined“ which are offered to the end user in a selection box. The report content element has the prompt „Befund“ and corresponds to a text area with eleven rows. Default values for the prompt (element name) and the form (single line of text) attribute further simplify the schema definition.<schema xmlns="XML schema namespace" xmlns:user="namespace for the description of the user interface"> <element name="Report" type="ReportType" user:prompt="Bericht"/> <complexType name="ReportType"> <element name="Date"/> <element name="Sender" type="PersonType" user:prompt="Von"/> <element name="Receiver" type="PersonType" user:prompt="An"/> <element name="Patient" type="PatientType"/> <element name="Subject" user:prompt="Betreff" user:form="narrate 4"/> <element name="Content" user:prompt="Befund" user:form="narrate 11"/> </complexType> <complexType name="PersonType"> <element name="Name"/> <element name="Address" type="AddressType" minOccurs="0"/> </complexType> <complexType name="PatientType" base="PersonType" derivedBy="extension"> <element name="DoB" user:prompt="Gebdat"/> <element name="Gender" user:prompt="Geschlecht" user:form="mann/m,frau/f"/> </complexType> <complexType name="AddressType"> <element name="Institution" user:form="narrate 2"/> <element name="Street" user:prompt="Strasse"/> <element name="City" user:prompt="Ort"/> <element name="Telecommunication" maxOccurs="unbounded" user:prompt="Telekomm"/> </complexType> </schema>Figure 3: XML schema definition of a simple clinical report.User front end Figure 4 and Figure 5 represent the user interface of the application system. The manager generates the user form from the XML schema definition in Figure 3 and enables the end user to enter instances of model elements, i.e. to assign data to the elements in the XML schema. When selecting an element instance (radio button), the applicable functions automatically appear on top of the data entry form. The functions of the user front end can be subdivided into editor functions and document management functions.Editor functions may be used to open and close composed and narrative element instances thus controlling the document details. The content of closed element instances is presented to the user so that the user can immediately open the right instance in the case of many element instances. The newInstance (creation of a new element instance) and delInstance (deletion of an element instance) function are derived from the element occurrence defined in the XML schema. The selected content element e.g. is not repeatable (we would have to specifymaxOccurs=“unbounded“ in the XML schema). As a consequence, the newInstance function does not appear. Beside of instance functions, the user interface may also offer model functions to the user. Model functions such as the newEl function enable the user to insert new elements into the document model.Examples for document management functions are shown in Figure 4. The getModel function allows the user to select a different document model, e.g. a different version of the pathology report or even a different model domain such as laboratory. The newDoc function creates an empty document from the XML schema that can be used to enter either a completely new report or to enter only a few selecting data and to retrieve the matching documents by the getDoc function. The currently selected documents are listed in the left frame of the Web browser window and the user can choose a document from the list for update purposes. The styleDoc function allows the user to see the presentation style (Figure 5) of the data before he stores them in the document base using the putDoc function. The presentation style of the document model is defined in a stylesheet associated with the current content model.Figure 4: User form for data entry.Figure 5: Presentation of data.Storage back endFigure 6 shows the back end representation of the data entered by the user. The data are logically stored as XML documents that are valid against the corresponding XML schema definition. The manager does not care about the physical details of the document store, which have been wrapped by some logical Application Programming Interface (API).Figure 6: XML structured data as the result of the data entry.DiscussionIn this paper we present an XML based approach towards more flexible data models. The approach uses an XML schema definition for the description of a document model. Such an XML schema definition can be updated by the application engineer or even the user himself. Theadjustment of the entire application system, i.e. the user front and the storage back end is managed automatically. As a consequence, new model requirements are easy to satisfy. With such an approach we may handle fuzzy data, i.e. data that are difficult to accommodate in a single database. In this section we will discuss the role of XML in our approach.The ultimate problem of our approach can be phrased in the following question: How can we change the structure of single documents and track the structure (model) of a set of documents at the same time? Without an overall model we would not know what elements can be searched for in the document base. The answer is that the model needs to be as modifiable as the data itself. And this is exactly the point where XML may contribute to the solution of our problem. The standard XML schema language is well suited for the explicit description of document models. In addition, XML files, and this includes the model instances as well as the model itself, are easy to transform with standard XML facilities such as DOM and XSLT.For the description of the document model we prefer an XML schema definition over a Document Type Definition (DTD). The XML schema approach supports more abstraction concepts thus allowing a higher reuse of definitions. This shall be illustrated at the PersonType definition. The PersonType defines an element type respectively an element class, which is reused for the sender and the receiver of a report. The XML schema consequently supports the abstraction concept of …classification“ which can be already found in the DTD (Document Type Definition) approach. Furthermore, the XML schema supports a derivation concept that has no counterpart in the DTD. The PatientType e.g. is derived from the PersonType by extension, i.e. the PersonType is a generalization of the PatientType. Abstraction concepts such as classification and generalization allow a high reuse of definitions.The model flexibility can be illustrated at the gender element of the presented XML schema definition (Figure 3). The gender element has been added to the schema in spite of the fact that existing documents would no longer comply with this new schema definition. The manager automatically extends the user form and lets the gender value undefined. The user can now define the gender value and save it in the document store. The key point in our approach is that the manager always uses the XML schema definition to organize the data in the application system.XML may also facilitate the development of communication interfaces to other systems. This includes the export of documents to another system as well as the import of existing data into a given document. When sending a given document to another system, we usually have to transform the local storage format into a standard message format. XML supports such a format transformation. The Document Object Model (DOM) e.g. parses an XML document into its elements and provides methods for the ease of document navigation and document manipulation from within a programming environment (6). The eXtensible Styling Language (XSL) supports the transformation of existing documents into a different document style, e.g. a presentation style or a message style (7). The fact that XML is increasingly preferred as the interchange format for messages will further facilitate the development and the maintenance of communication interfaces.Beside of the data export, the user may also retrieve existing data and integrate these data seamlessly into a given document. For this purpose, the user namespace may define a get attribute that can be added to any element in the XML schema and whose value is a standard URL. The URL defines the location of the remote data. For the integration of the patient datafrom an existing patient system e.g. we may add a …user:get“ attribute to the patient element with the URL instancehttp://patientHost/patientServer?service=getPatientData&argument=/Report/Patient/NameThe URL enables the manager to instantiate the arguments from the document content, to send the service value and the argument instances to the server and to integrate the returned data into the given document. The argument is defined using the standard XML Path language (8). The XPath "/Report/Patient/Name" e.g. instructs the manager to read the patient name from the document instance before contacting the remote server. The manager will complain if the patient name has not yet been entered. The data retrieval itself is controlled by the user using the getInstance function.ConclusionInflexible data models can lead to low acceptance of application systems in domains which are as dynamic as the healthcare domain. Our approach to this problem is to let the user requirements change the model description, i.e. to adjust the structure to the data instead of adjusting the data to the structure. The key concept of our solution is to make the structure, i.e. the XML schema definition as modifiable as the data itself. Necessary adjustments of the user front & storage back end are managed automatically. The XML technology provides a proper means in terms of XML Schema, XSLT, XPath and DOM to implement such an approach.Literature1.J. P. Morgenthal, SIGS Component Strategies, 54 (May 1999).2.CEN/TC 251/N99-067, Task Force XML Final report 1999-07-02.3.J. Dudeck, International Journal of Medical Informatics48, 163 (1998).4.J. J. Cimino, Yearbook of Medical Informatics, 289 (1995).5.WD-xmlschema-0-20000407, XML Schema Part 0: Primer, W3C Working Draft, 7 April2000.6.REC-DOM-Level-1-19981001, Document Object Model (DOM) Level 1 Specification,Version 1.0, W3C Recommendation 1 October, 1998.7.REC-xslt-19991116, XSL Transformations (XSLT), Version 1.0, W3C Recommendation 16November 1999.8.REC-xpath-19991116, XML Path Language (XPath), Version 1.0, W3C Recommendation 16November 1999.。