{"rsdb":{"rid":"179525","subhead":"","postdate":"0","aid":"130294","fid":"91","uid":"1","topic":"1","content":"
\n\u672c\u6587\u65e8\u5728\u6f14\u793arpart\u5305\u7684\u51b3\u7b56\u6811\u5206\u7c7b\u7528\u6cd5\uff0c\u4ee5\u53ca\u5229\u7528rpart.plot\u5bf9\u7ed3\u679c\u8fdb\u884c\u53ef\u89c6\u5316\u3002\u51b3\u7b56\u6811\uff08\u5206\u7c7b\u6811\uff09\u662f\u4e00\u79cd\u5341\u5206\u5e38\u7528\u7684\u5206\u7c7b\u65b9\u6cd5\uff0c\u662f\u4e00\u79cd\u76d1\u7ba1\u5b66\u4e60\uff1b\u6240\u8c13\u76d1\u7ba1\u5b66\u4e60\u5c31\u662f\u7ed9\u5b9a\u4e00\u5806\u6837\u672c\uff0c\u6bcf\u4e2a\u6837\u672c\u90fd\u6709\u4e00\u7ec4\u5c5e\u6027\u548c\u4e00\u4e2a\u7c7b\u522b\uff0c\u8fd9\u4e9b\u7c7b\u522b\u662f\u4e8b\u5148\u786e\u5b9a\u7684\uff0c\u90a3\u4e48\u901a\u8fc7\u5b66\u4e60\u5f97\u5230\u4e00\u4e2a\u5206\u7c7b\u5668\uff0c\u8fd9\u4e2a\u5206\u7c7b\u5668\u80fd\u591f\u5bf9\u65b0\u51fa\u73b0\u7684\u5bf9\u8c61\u7ed9\u51fa\u6b63\u786e\u7684\u5206\u7c7b\u3002\u8fd9\u6837\u7684\u673a\u5668\u5b66\u4e60\u5c31\u88ab\u79f0\u4e4b\u4e3a\u76d1\u7763\u5b66\u4e60\u3002<\/p> \n <\/blockquote> \n
\u6d4b\u8bd5\u6570\u636e\u9009\u7528MushroomDataSet(\u8611\u83c7\u6570\u636e\u96c6)\uff0c\u5176\u6570\u636e\u5c5e\u6027\u5982\u4e0b\uff1a<\/h3> \n
Attribute Information:<\/p> \n
\n
- cap-shape: bell=b,conical=c,convex=x,flat=f, knobbed=k,sunken=s<\/li> \n
- cap-surface: fibrous=f,grooves=g,scaly=y,smooth=s<\/li> \n
- cap-color: brown=n,buff=b,cinnamon=c,gray=g,green=r,pink=p,purple=u,red=e,white=w,yellow=y<\/li> \n
- bruises?: bruises=t,no=f<\/li> \n
- odor: almond=a,anise=l,creosote=c,fishy=y,foul=f, musty=m,none=n,pungent=p,spicy=s<\/li> \n
- gill-attachment: attached=a,descending=d,free=f,notched=n<\/li> \n
- gill-spacing: close=c,crowded=w,distant=d<\/li> \n
- gill-size: broad=b,narrow=n<\/li> \n
- gill-color: black=k,brown=n,buff=b,chocolate=h,gray=g,green=r,orange=o,pink=p,purple=u,red=e, white=w,yellow=y<\/li> \n
- stalk-shape: enlarging=e,tapering=t<\/li> \n
- stalk-root: bulbous=b,club=c,cup=u,equal=e, rhizomorphs=z,rooted=r,missing=?<\/li> \n
- stalk-surface-above-ring: fibrous=f,scaly=y,silky=k,smooth=s<\/li> \n
- stalk-surface-below-ring: fibrous=f,scaly=y,silky=k,smooth=s<\/li> \n
- stalk-color-above-ring: brown=n,buff=b,cinnamon=c,gray=g,orange=o,pink=p,red=e,white=w,yellow=y<\/li> \n
- stalk-color-below-ring: brown=n,buff=b,cinnamon=c,gray=g,orange=o,pink=p,red=e,white=w,yellow=y<\/li> \n
- veil-type: partial=p,universal=u<\/li> \n
- veil-color: brown=n,orange=o,white=w,yellow=y<\/li> \n
- ring-number: none=n,one=o,two=t<\/li> \n
- ring-type: cobwebby=c,evanescent=e,flaring=f,large=l,none=n,pendant=p,sheathing=s,zone=z<\/li> \n
- spore-print-color: black=k,brown=n,buff=b,chocolate=h,green=r,orange=o,purple=u,white=w,yellow=y<\/li> \n
- population: abundant=a,clustered=c,numerous=n, scattered=s,several=v,solitary=y<\/li> \n
- habitat: grasses=g,leaves=l,meadows=m,paths=p, urban=u,waste=w,woods=d
data\u6570\u636e\u4e0b\u8f7d\u5730\u5740\u53c2\u89c1\u5173\u8054\u89c4\u5219-R\u8bed\u8a00\u5b9e\u73b0\u4e00\u6587\u3002<\/li> \n <\/ol> \n\u4ee3\u7801<\/h2> \n
library(rpart)\nlibrary(rpart.plot)\ndata =read.csv(file.choose(),head=F)\nstr(data_ms)\n\ntable(data_ms$X1)\n\n e p \n4208 3916 \n\nprop.table(table(data_ms$X1))\n\n e p \n0.5179714 0.4820286 \n\nprop.table(table(data_ms$X1,data_ms$X2),2)\n\n b c f k s x\n e 0.8938053 0.0000000 0.5063452 0.2753623 1.0000000 0.5328228\n p 0.1061947 1.0000000 0.4936548 0.7246377 0.0000000 0.4671772\n\nfit <- rpart(X1 ~.,\n data=data_ms,\n method="class")\n#\u5206\u7c7b\u7ed3\u679c\u53ef\u89c6\u5316 \nrpart.plot(reg, type=4, extra=1,shadow.col="gray", box.col="green",\n border.col="blue", split.col="red",split.cex=1.2,main="\u51b3\u7b56\u6811")<\/code><\/pre> \n
<\/p> \n
\u53ef\u4ee5\u770b\u51fa\uff0c\u8611\u83c7\u6570\u636e\u66f4\u9002\u5408\u901a\u8fc7\u51b3\u7b56\u6811\u7b97\u6cd5\u8fdb\u884c\u5206\u7c7b\u5904\u7406\uff0c\u5206\u7c7b\u89c4\u5219\u8bc4\u5224\u8611\u83c7\u6709\u6bd2\u4e0e\u5426\u6e05\u6670\u660e\u4e86\u3002<\/p> \n
\u53cd\u9988\u4e0e\u5efa\u8bae<\/h3> \n
\n
- \u4f5c\u8005\uff1aShangFR<\/a><\/li> \n
- \u90ae\u7bb1\uff1ashangfr@foxmail.com<\/a><\/li> \n <\/ul> \n<\/div>","orderid":"0","title":"\u51b3\u7b56\u6811\u5206\u7c7b","smalltitle":"","mid":"0","fname":"R\u8bed\u8a00","special_id":"0","bak_id":"0","info":"0","hits":"6174","pages":"1","comments":"0","posttime":"2017-10-10 12:10:42","list":"1507608642","username":"admin","author":"","copyfrom":"","copyfromurl":"","titlecolor":"","fonttype":"0","titleicon":"0","picurl":"https:\/\/www.cppentry.com\/upload_files\/article\/91\/1_0gvue__.png","ispic":"1","yz":"1","yzer":"","yztime":"0","levels":"0","levelstime":"0","keywords":"\u51b3\u7b56\u6811<\/A> \u5206\u7c7b<\/A>","jumpurl":"","iframeurl":"","style":"","template":"a:3:{s:4:\"head\";s:0:\"\";s:4:\"foot\";s:0:\"\";s:8:\"bencandy\";s:0:\"\";}","target":"0","ip":"113.108.110.181","lastfid":"0","money":"0","buyuser":"","passwd":"","allowdown":"","allowview":"","editer":"","edittime":"0","begintime":"0","endtime":"0","description":"\u51b3\u7b56\u6811\u5206\u7c7b","lastview":"1713847280","digg_num":"8766","digg_time":"0","forbidcomment":"0","ifvote":"0","heart":"","htmlname":"","city_id":"0"},"page":"1"}