科学网

 找回密码
  注册

tag 标签: kappa

相关帖子

版块 作者 回复/查看 最后发表

没有相关内容

相关日志

idl做卷积
liuxiaolan2012 2016-2-25 09:39
如果要做SED拟合,各个波段的imag具有不同的beam,不同的pixel大小,需要重新做convole和rebin,有两种方法: (1)高斯卷积-convo.pro; (2)用kenel函数做卷积,然后用starlink的kappa做rebin: idl .compile conv_image.pro idl conv starlink: convert fits2ndf prompt/fits2ndf *.fits ** wcsalign prompt ndf2fits prompt idl .compile mpfit idl.compile mpfitfun idl.compile sedfit idl sedfit
3591 次阅读|0 个评论
kappa 调节两个image的位置以及pixel大小相同
liuxiaolan2012 2016-2-3 16:09
wcsalign prompt-Aligns a group of NDFs using World Co-ordinate System information 这个命令是将input image 转换成与reference image有相同的起始位置、相同的piexl的大小、相同的坐标系,这样得到的result images能够相互比较,可以做SED拟合,做比值计算。 ←Prev KAPPA –- Kernel Application Package Next→ TOC ↑ WCSALIGN Aligns a group of NDFs using World Co-ordinate System information Description: This application resamples or rebins a group of input NDFs , producingcorresponding output NDFs which are aligned pixel-for-pixel with a specified referenceNDF. If an input NDF has more pixel axes than the reference NDF, then the extra pixel axes areretained unchanged in the output NDF. Thus, for instance, if an input RA/Dec/velocitycube is aligned with a reference two-dimensional galactic-longitude/latitude image, theoutput NDF will be a galactic-longitude/latitude/velocity cube. The transformations needed to produce alignment are derived from the co-ordinate systeminformation stored in the WCS components of the supplied NDFs. For each input NDF,alignment is first attempted in the current co-ordinate Frame of the reference NDF. Ifthis fails, alignment is attempted in the current co-ordinate Frame of the input NDF.If this fails, alignment occurs in the pixel co-ordinate Frame. A message indicatingwhich Frame alignment was achieved in is displayed. Two algorithms are available for determining the output pixel values: resampling andrebinning (the method used is determined by the REBIN parameter). Two methods exist for determining the bounds of the output NDFs. First youcan give values for Parameters LBND and UBND which are then used as the pixelindex bounds for all output NDFs. Second, if a null value is given for LBND orUBND, default values are generated separately for each output NDF so that theoutput NDF just encloses the entire area covered by the corresponding inputNDF. Using the first method will ensure that all output NDFs have the samepixel origin , and so the resulting NDFs can be directly compared. However, thismay result in the output NDFs being larger than necessary. In general, thesecond method results in smaller NDFs being produced, in less time. However,the output NDFs will have differing pixel origins which need to be taken intoaccount when comparing the aligned NDFs. Usage: wcsalign in out lbnd ubndref Parameters: ABORT = _LOGICAL (Read) This controls what happens if an error occurs whilst processing one of the input NDFs. If a FALSE value issupplied for ABORT, then the error message will be displayed, but the applicationwill attempt to process any remaining input NDFs. If a TRUE value is suppliedfor ABORT, then the error message will be displayed, and the application willabort. ACC = _REAL (Read) The positional accuracy required, as anumber of pixels. For highly non-linear projections, a recursive algorithm isused in which successively smaller regions of the projection are fitted with aleast-squares linear transformation. If such a transformation results in amaximum positional error greater than the value supplied for ACC (in pixels),then a smaller region is used. High accuracy is paid for by larger run times. ALIGNREF = _LOGICAL (Read) Determines the co-ordinate system inwhich each input NDF is aligned with the reference NDF. If TRUE, alignmentis performed in the co-ordinate system described by the current Frame of theWCS FrameSet in the reference NDF. If FALSE, alignment is performed in theco-ordinate system specified by the following set of WCS attributes in the referenceNDF: AlignSystem, AlignStdOfRest, AlignOffset, AlignSpecOffset, AlignSideBand,AlignTimeScale. The AST library provides fixed defaults for all these. So for instance,AlignSystem defaults to ICRS for celestial axes and Wavelength for spectralaxes, meaning that celestial axes will be aligned in ICRS and spectral axes inwavelength, by default. Similarly, AlignStdOfRest defaults to Heliocentric,meaning that by default spectral axes will be aligned in the Heliocentric restframe. As an example, if you are aligning two spectra which both use radio velocity as thecurrent WCS, but which have different rest frequencies, then setting ALIGNREF to TRUEwill cause alignment to be performed in radio velocity, meaning that the differences inrest frequency are ignored. That is, a channel with 10 Km/s in the input is mappingonto the channel with 10 km/s in the output. If ALIGNREF is FALSE (and no value hasbeen set for the AlignSystem attribute in the reference WCS), then alignment will beperformed in wavelength, meaning that the different rest frequencies cause anadditional shift. That is, a channel with 10 Km/s in the input will be mapping ontowhich ever output channel has the same wavelength, taking into account the differentrest frequencies. As another example, consider aligning two maps which both have (azimuth,elevation)axes. If ALIGNREF is TRUE, then any given (az,el) values in one image will be mappedonto the exact same (az,el) values in the other image, regardless of whether the twoimages were taken at the same time. But if ALIGNREF is FALSE, then a given (az,el)value in one image will be mapped onto pixel that has the same ICRS co-ordinates in theother image (since AlignSystem default to ICRS for celestial axes). Thus anydifferent in the observation time of the two images will result in an additionalshift. As yet another example, consider aligning two spectra which are both in frequency withrespect to the LSRK, but which refer to different points on the sky. If ALIGNREFis TRUE, then a given LSRK frequency in one spectrum will be mapped onto theexact same LSRK frequency in the other image, regardless of the different skypositions. But if ALIGNREF is FALSE, then a given input frequency will first beconverted to Heliocentric frequency (the default value for AlignStdOfRest is“Heliocentric”), and will be mapped onto the output channel that has the same Heliocentric frequency. Thus the differecen in sky positions will result in anadditional shift. CONSERVE = _LOGICAL (Read) If set TRUE, then the outputpixel values will be scaled in such a way as to preserve the total data value in afeature on the sky. The scaling factor is the ratio of the output pixel size to theinput pixel size. This option can only be used if the Mapping is successfullyapproximated by one or more linear transformations. Thus an error will be reported ifit used when the ACC parameter is set to zero (which stops the use of linearapproximations), or if the Mapping is too non-linear to be approximated by apiece-wise linear transformation. The ratio of output to input pixel size isevaluated once for each panel of the piece-wise linear approximation to theMapping, and is assumed to be constant for all output pixels in the panel. Thedynamic default is TRUE if rebinning, and FALSE if resampling (see ParameterREBIN). etc. ). the name of a text file, preceded by an up-arrow character ^.Each line in the text file should contain a comma-separated list of elements, each ofwhich can in turn be an NDF name (with optional wild-cards, etc. ), or another filespecification (preceded by an up-arrow). Comments can be included in the file bycommencing lines with a hash character #. If the value supplied for this parameter ends with a minus sign -, then you arere-prompted for further input until a value is given which does not end with a hyphen.All the NDFs given in this way are concatenated into a single group. INSITU =_LOGICAL (Read) If INSITU is set to TRUE, then no output NDFs are created.Instead, the pixel origin of each input NDF is modified in order to align theinput NDFs with the reference NDF (which is a much faster operation than a fullresampling). This can only be done if the mapping from input pixel co-ordinates toreference pixel co-ordinates is a simple integer pixel shift of origin. If thisis not the case an error will be reported when the input is processed (whathappens then is controlled by the ABORT parameter). Also, in-situ alignmentis only possible if null values are supplied for LBND and UBND. LBND() = _INTEGER (Read) An array of values giving the lower pixel-index boundon each axis for the output NDFs. The number of values supplied should equalthe number of axes in the reference NDF. The given values are used for alloutput NDFs. If a null value (!) is given for this parameter or for ParameterUBND, then separate default values are calculated for each output NDF whichresult in the output NDF just encompassing the corresponding input NDF. Thesuggested defaults are the lower pixel-index bounds from the reference NDF (see Parameter REF). MAXPIX = _INTEGER (Read) A value which specifies an initialscale size in pixels for the adaptive algorithm which approximates non-linear Mappings with piece-wise linear transformations. If MAXPIX is larger than anydimension of the region of the output grid being used, a first attempt will be madeto approximate the Mapping by a linear transformation over the entire outputregion. If a smaller value is used, the output region will first be dividedinto subregions whose size does not exceed MAXPIX pixels in any dimension,and then attempts will be made at approximation. METHOD = LITERAL (Read) The method to use when sampling the input pixel values (if resampling),or dividing an input pixel value up between a group of neighbouring outputpixels (if rebinning). For details of these schemes, see the descriptions ofroutines AST_RESAMPLEx and AST_REBINx in SUN/210 . METHOD can take the followingvalues. Bilinear –- When resampling, the output pixel values are calculated by bi-linearinterpolation among the four nearest pixels values in the input NDF. When rebinning,the input pixel value is divided up bi-linearly between the four nearest output pixels.Produces smoother output NDFs than the nearest-neighbour scheme, but is marginallyslower. Nearest –- When resampling, the output pixel values are assigned the value of thesingle nearest input pixel. When rebinning, the input pixel value is assignedcompletely to the single nearest output pixel. Sinc –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsincmo class=MathClass-open(#x3C0;xmo class=MathClass-close)" style="position:relative;" tabindex="0" id="MathJax-Element-3-Frame" class="MathJax" sinc ( π x ) sinc(πx) kernel, where span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLx" style="position:relative;" tabindex="0" id="MathJax-Element-4-Frame" class="MathJax" x x is the pixel offset from the interpolation point (resampling) or transformed input pixel centre(rebinning), and span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsincmo class=MathClass-open(zmo class=MathClass-close)mo class=MathClass-rel=mo class=qopnamesinmo class=MathClass-open(zmo class=MathClass-close)mo class=MathClass-bin/z" style="position:relative;" tabindex="0" id="MathJax-Element-5-Frame" class="MathJax" sinc ( z ) = sin ( z ) / z sinc(z)=sin(z)/z .Use of this scheme is not recommended. SincSinc –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsincmo class=MathClass-open(#x3C0;xmo class=MathClass-close)mstyle class=textmtext class=textrm mathvariant=normalsincmo class=MathClass-open(k#x3C0;xmo class=MathClass-close)" style="position:relative;" tabindex="0" id="MathJax-Element-6-Frame" class="MathJax" sinc ( π x ) sinc ( k π x ) sinc(πx)sinc(kπx) kernel. A valuable general-purpose scheme, intermediate in its visual effect on NDFsbetween the bi-linear and nearest-neighbour schemes. SincCos –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsincmo class=MathClass-open(#x3C0;xmo class=MathClass-close)mo class=qopnamecosmo class=MathClass-open(k#x3C0;xmo class=MathClass-close)" style="position:relative;" tabindex="0" id="MathJax-Element-7-Frame" class="MathJax" sinc ( π x ) cos ( k π x ) sinc(πx)cos(kπx) kernel. Gives similar results to the Sincsinc scheme. SincGauss –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsincmo class=MathClass-open(#x3C0;xmo class=MathClass-close)emo class=MathClass-bin#x2212;kx2" style="position:relative;" tabindex="0" id="MathJax-Element-8-Frame" class="MathJax" sinc ( π x ) e − k x 2 sinc(πx)e−kx2 kernel. Good results can be obtained by matching the FWHM of the envelope function tothe point-spread function of the input data (see Parameter PARAMS). Somb –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsombmo class=MathClass-open(#x3C0;xmo class=MathClass-close)" style="position:relative;" tabindex="0" id="MathJax-Element-9-Frame" class="MathJax" somb ( π x ) somb(πx) kernel, where span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLx" style="position:relative;" tabindex="0" id="MathJax-Element-10-Frame" class="MathJax" x x is the pixel offset from the interpolation point (resampling) or transformed input pixel centre (rebinning), and span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsombmo class=MathClass-open(zmo class=MathClass-close)mo class=MathClass-rel=2mo class=MathClass-bin#x2217;J1mo class=MathClass-open(zmo class=MathClass-close)mo class=MathClass-bin/z" style="position:relative;" tabindex="0" id="MathJax-Element-11-Frame" class="MathJax" somb ( z ) = 2 ∗ J 1 ( z ) / z somb(z)=2∗J1(z)/z ( span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLJ1" style="position:relative;" tabindex="0" id="MathJax-Element-12-Frame" class="MathJax" J 1 J1 isthe first-order Bessel function of the first kind. This scheme is similar to the Sincscheme. SombCos –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmstyle class=textmtext class=textrm mathvariant=normalsombmo class=MathClass-open(#x3C0;xmo class=MathClass-close)mo class=qopnamecosmo class=MathClass-open(k#x3C0;xmo class=MathClass-close)" style="position:relative;" tabindex="0" id="MathJax-Element-13-Frame" class="MathJax" somb ( π x ) cos ( k π x ) somb(πx)cos(kπx) kernel. This scheme is similar to the SincCos scheme. Gauss –- Uses the span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLemo class=MathClass-bin#x2212;kx2" style="position:relative;" tabindex="0" id="MathJax-Element-14-Frame" class="MathJax" e − k x 2 e−kx2 kernel. The FWHM of the Gaussian is given by Parameter PARAMS(2), and the point atwhich to truncate the Gaussian to zero is given by Parameter PARAMS(1). All methods propagate variances from input to output, but the variance estimatesproduced by interpolation schemes other than nearest neighbour need to be treated withcare since the spatial smoothing produced by these methods introduces correlations inthe variance estimates. Also, the degree of smoothing produced varies across the NDF.This is because a sample taken at a pixel centre will have no contributionsfrom the neighbouring pixels, whereas a sample taken at the corner of a pixelwill have equal contributions from all four neighbouring pixels, resultingin greater smoothing and lower noise. This effect can produce complex Moirépatterns in the output variance estimates, resulting from the interferenceof the spatial frequencies in the sample positions and in the pixel centrepositions. For these reasons, if you want to use the output variances, you aregenerally safer using nearest-neighbour interpolation. The initial defaultis SincSinc. OUT = NDF (Write) A group of output NDFscorresponding one-for-one with the list of input NDFs given for Parameter IN.This should be given as a comma-separated list, in which each list element canbe: an NDF name. If the name contains an asterisk character span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-bin#x2217;" style="position:relative;" tabindex="0" id="MathJax-Element-15-Frame" class="MathJax" ∗ ∗ , the name of thecorresponding input NDF (without directory or file suffix) is substituted for the asterisk (forinstance, span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-bin#x2217;" style="position:relative;" tabindex="0" id="MathJax-Element-16-Frame" class="MathJax" ∗ ∗ _alcauses the output NDF name to be formed by appending the string _al to thecorresponding input NDF name). Input NDF names can also be edited by including originaland replacement strings between vertical bars after the NDF name (for instance, span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-bin#x2217;" style="position:relative;" tabindex="0" id="MathJax-Element-17-Frame" class="MathJax" ∗ ∗ _al span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-rel|" style="position:relative;" tabindex="0" id="MathJax-Element-18-Frame" class="MathJax" | | b4 span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-rel|" style="position:relative;" tabindex="0" id="MathJax-Element-19-Frame" class="MathJax" | | B1 span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-rel|" style="position:relative;" tabindex="0" id="MathJax-Element-20-Frame" class="MathJax" | | causes any occurrence of the string B4 in the input NDF name to be replaced by thestring B1 before appending the string _al to the result). the name of a text file, preceded by an up-arrow character ^.Each line in the text file should contain a comma-separated list of elements, each ofwhich can in turn be an NDF name (with optional editing, etc. ), or another file specification (preceded by an up-arrow). Comments can be included in the file bycommencing lines with a hash character #. If the value supplied for this parameter ends with a hyphen -, then you arere-prompted for further input until a value is given which does not end with hyphen.All the NDFs given in this way are concatenated into a single group. This parameter is only accessed if the INSITU parameter is FALSE. PARAMS( 2 ) =_DOUBLE (Read) An optional array which consists of additional parametersrequired by the Sinc, SincSinc, SincCos, SincGauss, Somb, SombCos and Gaussmethods. PARAMS(1) is required by all the above schemes. It is used to specify how many pixelsare to contribute to the interpolated result on either side of the interpolation orbinning point in each dimension. Typically, a value of 2 is appropriate and the minimumallowed value is 1 ( i.e. one pixel on each side). A value of zero or fewerindicates that a suitable number of pixels should be calculated automatically. PARAMS(2) is required only by the Gauss, SombCos, SincSinc, SincCos, and SincGaussschemes. For the SombCos, SincSinc and SincCos schemes, it specifies the number ofpixels at which the envelope of the function goes to zero. The minimum value is 1.0,and the run-time default value is 2.0. For the Gauss and SincGauss scheme,it specifies the full-width at half-maximum (FWHM) of the Gaussian envelopemeasured in output pixels. The minimum value is 0.1, and the run-time defaultis 1.0. On astronomical NDFs and spectra, good results are often obtained byapproximately matching the FWHM of the envelope function, given by PARAMS(2), tothe point-spread function of the input data. REF = NDF (Read) The NDF to which all the inputNDFs are to be aligned. If a null value is supplied for this parameter, thefirst NDF supplied for Parameter IN is used. UBND() = _INTEGER (Read) Anarray of values giving the upper pixel-index bound on each axis for the outputNDFs. The number of values supplied should equal the number of axes in thereference NDF. The given values are used for all output NDFs. If a null value(!) is given for this parameter or for Parameter LBND, then separate defaultvalues are calculated for each output NDF which result in the output NDF justencompassing the corresponding input NDF. The suggested defaults are the upperpixel-index bounds from the reference NDF (see Parameter REF). WLIM = _REAL(Read) This parameter is only used if REBIN is set TRUE. It specifies theminimum number of good pixels which must contribute to an output pixel forthe output pixel to be valid. Note, fractional values are allowed. A null (!)value causes a very small positive value to be used resulting in output pixelsbeing set bad only if they receive no significant contribution from any inputpixel. Examples: wcsalign image1 image1_al ref=image2 accept Thisexample resamples the NDF called image1 so that it is aligned with the NDFcall image2, putting the output in image1_al. The output image has the same pixel-index bounds as image2 and inherits WCS information from image2. wcsalignm51 span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-bin#x2217;" style="position:relative;" tabindex="0" id="MathJax-Element-22-Frame" class="MathJax" ∗ ∗ span role="presentation" data-mathml="math display=inline xmlns=http://www.w3.org/1998/Math/MathMLmo class=MathClass-bin#x2217;" style="position:relative;" tabindex="0" id="MathJax-Element-23-Frame" class="MathJax" ∗ ∗ _al lbnd=!accept This example resamples all the NDFs with names starting with the string m51 inthe current directory so that they are aligned with the first input NDF. The output NDFshave the same names as the input NDFs, but extended with the string _al. Each output NDFis just big enough to contain all the pixels in the corresponding input NDF. wcsalign ^in.lis ^out.lislbnd=! accept This example is like the previous example, except that the namesof the input NDFs are read from the text file in.lis, and the names of thecorresponding output NDFs are read from text file out.lis. Choice of Algorithm The algorithm used to produce the output image is determined by the REBINparameter, and is based either on resampling the output image or rebinning the inputimage. The resampling algorithm steps through every pixel in the output image, samplingthe input image at the corresponding position and storing the sampled inputvalue in the output pixel. The method used for sampling the input image isdetermined by the METHOD parameter. The rebinning algorithm steps through everypixel in the input image, dividing the input pixel value between a group ofneighbouring output pixels, incrementing these output pixel values by theirallocated share of the input pixel value, and finally normalising each outputvalue by the total number of contributing input values. The way in which theinput sample is divided between the output pixels is determined by the METHODparameter. Both algorithms produce an output in which the each pixel value is the weighted mean ofthe near-by input values, and so do not alter the mean pixel values associatedwith a source, even if the pixel size changes. Thus the total data sum in asource will change if the input and output pixel sizes differ. However, ifthe CONSERVE parameter is set TRUE, the output values are scaled by the ratioof the output to input pixel size, so that the total data sum in a source ispreserved. A difference between resampling and rebinning is that resampling guarantees to fill theoutput image with good pixel values (assuming the input image is filled with good inputpixel values), whereas holes can be left by the rebinning algorithm if the output imagehas smaller pixels than the input image. Such holes occur at output pixels whichreceive no contributions from any input pixels, and will be filled with the valuezero in the output image. If this problem occurs the solution is probably tochange the width of the pixel spreading function by assigning a larger valueto PARAMS(1) and/or PARAMS(2) (depending on the specific METHOD value beingused). Both algorithms have the capability to introduce artefacts into the output image. Thesehave various causes described below. Particularly sharp features in the input can cause rings around the corresponding features in the output image. This can be minimised by suitable settings for the METHODand PARAMS parameters. In general such rings can be minimised by using a widerinterpolation kernel (if resampling) or spreading function (if rebinning), at the costof degraded resolution. The approximation of the Mapping using a piece-wise linear transformation (controlledby Parameter ACC) can produce artefacts at the joints between the panels of theapproximation. They are caused by the discontinuities between the adjacent panels ofthe approximation, and can be minimised by reducing the value assigned to the ACCparameter. Notes: WCS information (including the current co-ordinate Frame) is propagated from thereference NDF to all output NDFs. QUALITY is propagated from input to output only if Parameter METHOD is set to Nearestand REBIN is set to FALSE. Related Applications KAPPA: WCSFRAME , REGRID ; CCDPACK : TRANNDF . Implementation Status: This routine correctly processes the DATA, VARIANCE , LABEL , TITLE , UNITS , WCS , and HISTORY components of the input NDFs (see the METHOD parameter for notes on theinterpretation of output variances). Processing of bad pixels and automatic quality masking are supported. All non-complex numeric data types can be handled. If REBIN is TRUE, the datatype will be converted to one of _INTEGER, _DOUBLE or _REAL for processing. ←Prev KAPPA –- Kernel Application Package Next→ TOC ↑
2273 次阅读|0 个评论
[转载]Cohen's kappa
menke 2015-9-28 22:47
Cohen's kappa coefficient is a statistical measure ofinter-rater agreement or inter-annotator agreement for qualitative(categorical) items. It is generally thought to be a more robustmeasure than simple percent agreement calculation since κ takesinto account the agreement occurring by chance. Some researchershave expressed concern over κ's tendency to take the observedcategories' frequencies as givens, which can have the effect ofunderestimating agreement for a category that is also commonlyused; for this reason, κ is considered an overly conservativemeasure of agreement.Others contest the assertion that kappa takes into accountchance agreement. To do this effectively would require an explicitmodel of how chance affects rater decisions. The so-called chanceadjustment of kappa statistics supposes that, when not completelycertain, raters simply guess—a very unrealistic scenario. Cohen's kappa measures the agreement between tworaters who each classify N items into C mutually exclusive categories. The first mentionof a kappa-like statistic is attributed to Galton (1892) The equation for κis: img src="http://upload.wikimedia.org/math/4/d/1/4d1492e453801f7f1a6aff4d603d8d8b.png" alt="kappa = frac{Pr(a) - Pr(e)}{1 - Pr(e)}, !" title=" Cohen's kappa" / where Pr( a ) is the relative observedagreement among raters, and Pr( e ) is the hypotheticalprobability of chance agreement, using the observed data tocalculate the probabilities of each observer randomly saying eachcategory. If the raters are in complete agreement then κ = 1. Ifthere is no agreement among the raters other than what would beexpected by chance (as defined by Pr( e )), κ = 0. The seminal paper introducing kappa as a newtechnique was published by JacobCohen in the journal Educational and PsychologicalMeasurement in 1960. A similar statistic, called pi ,was proposed by Scott (1955). Cohen's kappa and Scott'spi differ in terms of how Pr( e ) iscalculated. Note that Cohen's kappa measures agreementbetween two raters only. For a similar measure of agreementused when there are more than two raters, see Fleiss (1971). The Fleiss kappa, however, is amulti-rater generalization of Scott'spi statistic, not Cohen's kappa. Supposethat you were analyzing data related to people applying for agrant. Each grant proposal was read by two people and each readereither said Yes or No to the proposal. Suppose the data were asfollows, where rows are reader A and columns are readerB: B B Yes No A Yes 20 5 A No 10 15 Notethat there were 20 proposals that were granted by both reader A andreader B, and 15 proposals that were rejected by both readers.Thus, the observed percentage agreement is Pr( a )=(20+15)/50= 0.70. ReaderA said Yes to 25 applicants and No to 25 applicants. Thusreader A said Yes 50% of the time. ReaderB said Yes to 30 applicants and No to 20 applicants. Thusreader B said Yes 60% of the time. Tocalculate Pr( e ) (the probability of random agreement) wenote that: Therefore the probability that both of them would say Yesrandomly is 0.50*0.60=0.30 and the probability that both of themwould say No is 0.50*0.40=0.20. Thus the overall probability ofrandom agreement is Pr(e) = 0.3+0.2 = 0.5. So now applying our formula for Cohen's Kappa we get: img alt="kappa = frac{Pr(a) - Pr(e)}{1 - Pr(e)} = frac{0.70-0.50}{1-0.50} =0.40 !" src="http://upload.wikimedia.org/math/c/3/3/c338484db942bdddd457200712ce7e20.png" style="border-top-style:none;border-right-style:none;border-bottom-style:none;border-left-style:none;vertical-align:middle" title=" Cohen's kappa" / (Extractedfrom Wikipedia, http://en.wikipedia.org/wiki/Cohen's_kappa ,just for learning)
个人分类: 知识点|1 次阅读|0 个评论
希望,在前方(十九)
panpine 2015-7-4 17:08
Dear friend: 见信好! 这是我写给你的第一封信,你一定很奇怪,为什么我会突然给你写信?这样吧,你去泡杯咖啡,坐下来听我慢慢和你说。 那天中午吃饭的时候,我想到前一天你说“不太好”,然后匆匆下了线,当下我的脑子里就出现了一副画面:灰色的天空飘着三级小雨,你走在东环二路立交桥的人行道上,没有打伞,你穿的是那件红色的Kappa套衫,手插在裤兜里。你看着左手边的桥栏,觉着和我们老家的清江桥很像,心上竟一下子涌出几汪乡愁。大大小小有几辆汽车从你身边驶过,“嗖、嗖”的响声,在路边掀开一道道水浪。事实上,你刚刚从医院里出来,得知自己得了乳腺癌,只是年轻的你完全没有准备好下一步要怎么做。 我洗完碗筷,坐在书房里,打开“格林”最新款的“乡之韵”系列空调,猜测着你到底发生了什么事情,可是到最后我得出这样一个结论,不管发生了什么事情,只要身体健康,吃得下饭,睡得着觉,那么一切都只会是过眼云烟。 算一算,我们认识12年了,这段时间里有很多鲜活而且珍贵的记忆。你知道的,人一旦长大,就会给自己设定很多条款、规则、界限,不能做很多小时候想也不想就可以做的事情,就好象现在,我们都会很听话地工作,休闲的活动从以前的山洞大冒险变为了如今优雅的逛街,大城市里的霓虹灯成了我们最常注意和逗留的地方。我们懂得了“种豆得豆,种瓜得瓜”的道理,也不会再心存侥幸或者偷偷钻进班主任的办公室修改考试成绩了。 你看,生活越来越美好,可是我们怀恋的却是从前的日子。 就写到这吧,希望你原谅我上述恶劣的想象,并且相信自己可以生活地更加好一些。因为不管在哪里,都会有这么几个朋友和你像Kappa——你喜欢穿的运动品牌一样,“背靠着背”,支撑着彼此一起走下去。 Best wishes! 芷加 晨
1571 次阅读|0 个评论
常用字母
robinmartin 2012-12-5 19:08
α.Α.alpha β.Β.beta γ.Γ.gamma δ.Δ.delta ε.Ε.epsilon ζ.Ζ.zeta η.Η.eta θ.Θ.theta ι.Ι.iota κ.Κ.kappa λ.Λ.lambda μ.Μ.mu ν.Ν.nu ξ.Ξ.xi ο.Ο.omicron π.Π.pi ρ.Ρ.rho σ.Σ.sigma τ.Τ.tau υ.Υ.upsilon 以后加latex写法吧
个人分类: 习惯决定成绩|240 次阅读|0 个评论
灭绝方程的近似解(2)
gzchengzhi 2012-5-19 22:47
  上篇博文中,求解还可以适当进行改进。   设不考虑衰减因素,即e 1 =e 2 =0,精确解为: \   如果c 1 , e 1 , c 2 都很小,但是e 2 足够大,则e 2 t项将对B(t)产生影响,此时尝试着将上篇博文中的公式(7)代入方程(3),得到: \   则: \ \ \   如果: \   则: \   可以看出,在t比较小的时候,B曲线相当于B 0 叠加上一个3次方指数增长的曲线,这显示出一个振荡上升的现象。但是在t足够大时,B的振荡基本消失,并最终以指数方式快速上升。   还有一个重要的条件是,A不能小于零,因此当A0时,A=0,此时,方程(3)变为: \ \   这比允许A 2 为负数要小很多,指数式快速增长效应也消失了。
2582 次阅读|0 个评论

Archiver|手机版|科学网 ( 京ICP备07017567号-12 )

GMT+8, 2024-5-1 23:48

Powered by ScienceNet.cn

Copyright © 2007- 中国科学报社

返回顶部