91av视频/亚洲h视频/操亚洲美女/外国一级黄色毛片 - 国产三级三级三级三级

  • 大小: 731KB
    文件類型: .rar
    金幣: 2
    下載: 0 次
    發布日期: 2021-07-23
  • 語言: 其他
  • 標簽:

資源簡介

該實驗的的數據源是Wine recognition data,這是對在意大利同一地區生產的三種不同品種的酒,做大量分析所得出的數據。這些數據包括了三種酒中13種不同成分的數量。13種成分分別為:Alcohol,Malic acid,Ash,Alcalinity of ash,Magnesium,Total phenols,Flavanoids,Nonflavanoid phenols,Proanthocyanins,Color intensity,Hue,OD280/OD315 of diluted wines,Proline。在 “wine.data”文件中,每行代表一種酒的樣本,共有178個樣本;一共有14列,其中,第一列為類標志屬性,共有三類,分別記為“1”,“2”,“3”;后面的13列為每個樣本的對應屬性的樣本值。其中第1類有59個樣本,第2類有71個樣本,第3類有48個樣本。 由于數據源文件中的每個樣本的數據都是完整的,沒有空缺值等,所以我沒有對該數據源文件進行數據的清理工作。

資源截圖

代碼片段和文件信息

//?NaiveBayes.cpp?:?定義控制臺應用程序的入口點。
//

#include?“stdafx.h“
#include?
#include?
#include?
#include?
using?namespace?std;

const?int?Attr_NUM?=?35;//屬性個數
const?int?Class_NUM?=?19;//類別個數

const?int?Max_Attr_val?=?8;//屬性中取值的最大個數,該任務中為屬性date:0~6,若包括?,共8個
const?int?Max_CName_len?=?50;//最長類別名的長度

class?CNaiveBayes
{
private:
char?Class_name_vector[Class_NUM][Max_CName_len];//類別名向量

double?Pv[Class_NUM];//Pv[vj]表示概率P(vj)
int?Atrr_val_num[Attr_NUM];//每個屬性值的取值個數
double?P[Attr_NUM][Max_Attr_val][Class_NUM];//P[ai][x][vj]表示概率P(ai=x|vj),即vj類中,屬性ai=x的頻率
int?result_matrix[Class_NUM][Class_NUM];//結果矩陣,行表示真實類,列表示預測類
double?Precision[Class_NUM];//各個類別正確率
double?Recall[Class_NUM];//各個類別召回率
double?F_Measure[Class_NUM];//各個類別F值
public:
CNaiveBayes();
void?Train();//訓練,并將訓練結果——概率矩陣寫入文件
int?Classifytest();//讀入訓練結果測試

int?Search_CName_Vector(char*?fstring);//在Class_name_vector中搜索類名含在fstring中的類別號返回
int?Max_pro(double*?pro_vectorconst?int?num);
};

CNaiveBayes::CNaiveBayes()
{
char?Class_name[Class_NUM][Max_CName_len]?=?{“diaporthe-stem-canker““charcoal-rot““rhizoctonia-root-rot““phytophthora-rot““brown-stem-rot“
“powdery-mildew““downy-mildew““brown-spot““bacterial-blight““bacterial-pustule“
“purple-seed-stain““anthracnose““phyllosticta-leaf-spot““alternarialeaf-spot““frog-eye-leaf-spot“
“diaporthe-pod-&-stem-blight““cyst-nematode““2-4-d-injury““herbicide-injury“
};
for?(int?i=0;?i {
strcpy(Class_name_vector[i]Class_name[i]);
}
//初始化類別概率向量
for?(int?i?=?0;?i? {
Pv[i]?=?1.0/Class_NUM;
}
Atrr_val_num[0]?=?7+1;//data
Atrr_val_num[1]?=?2+1;//plant-stand
Atrr_val_num[2]?=?3+1;//precip
Atrr_val_num[3]?=?3+1;//temp
Atrr_val_num[4]?=?2+1;//hail
Atrr_val_num[5]?=?4+1;//crop-hist
Atrr_val_num[6]?=?4+1;//area-damaged
Atrr_val_num[7]?=?3+1;//severity
Atrr_val_num[8]?=?3+1;//seed-tmt
Atrr_val_num[9]?=?3+1;//germination
Atrr_val_num[10]?=?2+1;//plant-growth
Atrr_val_num[11]?=?2+1;//leaves
Atrr_val_num[12]?=?3+1;//leafspots-halo
Atrr_val_num[13]?=?3+1;//leafspots-marg
Atrr_val_num[14]?=?3+1;//leafspot-size
Atrr_val_num[15]?=?2+1;//leaf-shread
Atrr_val_num[16]?=?2+1;//leaf-malf
Atrr_val_num[17]?=?3+1;//leaf-mild
Atrr_val_num[18]?=?2+1;//stem
Atrr_val_num[19]?=?2+1;//lodging
Atrr_val_num[20]?=?4+1;//stem-cankers
Atrr_val_num[21]?=?4+1;//canker-lesion
Atrr_val_num[22]?=?2+1;//fruiting-bodies
Atrr_val_num[23]?=?3+1;//‘external?decay‘
Atrr_val_num[24]?=?2+1;//mycelium
Atrr_val_num[25]?=?3+1;//int-discolor
Atrr_val_num[26]?=?2+1;//sclerotia
Atrr_val_num[27]?=?4+1;//fruit-pods
Atrr_val_num[28]?=?5+1;//‘fruit?spots‘
Atrr_val_num[29]?=?2+1;//seed
Atrr_val_num[30]?=?2+1;//mold-growth
Atrr_val_num[31]?=?2+1;//seed-discolor
Atrr_val_num[32]?=?2+1;//seed-size
Atrr_val_num[33]?=?2+1;//shriveling
Atrr_val_num[34]?=?

?屬性????????????大小?????日期????時間???名稱
-----------?---------??----------?-----??----

?????文件??????65536??2011-03-28?15:06??分類器程序\NaiveBayes\debug\NaiveBayes.exe

?????文件?????423760??2011-03-28?15:06??分類器程序\NaiveBayes\debug\NaiveBayes.ilk

?????文件?????551936??2011-03-28?15:06??分類器程序\NaiveBayes\debug\NaiveBayes.pdb

?????文件??????12382??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\BuildLog.htm

?????文件?????????67??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\mt.dep

?????文件????????403??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\NaiveBayes.exe.embed.manifest

?????文件????????468??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\NaiveBayes.exe.embed.manifest.res

?????文件????????385??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\NaiveBayes.exe.intermediate.manifest

?????文件??????71937??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\NaiveBayes.obj

?????文件????1048576??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\NaiveBayes.pch

?????文件??????10997??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\stdafx.obj

?????文件?????175104??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\vc80.idb

?????文件?????258048??2011-03-28?15:06??分類器程序\NaiveBayes\NaiveBayes\Debug\vc80.pdb

?????文件???????9501??2009-01-02?16:32??分類器程序\NaiveBayes\NaiveBayes\NaiveBayes.cpp

?????文件???????4496??2011-03-28?20:52??分類器程序\NaiveBayes\NaiveBayes\NaiveBayes.vcproj

?????文件???????1405??2011-03-29?15:28??分類器程序\NaiveBayes\NaiveBayes\NaiveBayes.vcproj.ANDY.Administrator.user

?????文件???????1427??2011-03-28?21:57??分類器程序\NaiveBayes\NaiveBayes\NaiveBayes.vcproj.PC2011030613WJE.Administrator.user

?????文件???????1421??2009-01-02?16:32??分類器程序\NaiveBayes\NaiveBayes\NaiveBayes.vcproj.SKYHEARTBABY.skyheart.user

?????文件????????968??2008-12-28?21:39??分類器程序\NaiveBayes\NaiveBayes\ReadMe.txt

?????文件??????34012??2008-11-22?10:16??分類器程序\NaiveBayes\NaiveBayes\soybean-large-test.arff

?????文件??????28083??2008-11-22?10:16??分類器程序\NaiveBayes\NaiveBayes\soybean-large-train.arff

?????文件????????215??2008-12-28?21:39??分類器程序\NaiveBayes\NaiveBayes\stdafx.cpp

?????文件????????276??2008-12-28?21:39??分類器程序\NaiveBayes\NaiveBayes\stdafx.h

?????文件????1100800??2011-03-29?15:28??分類器程序\NaiveBayes\NaiveBayes.ncb

?????文件????????895??2008-12-28?21:39??分類器程序\NaiveBayes\NaiveBayes.sln

????..A..H.?????15360??2011-03-29?15:28??分類器程序\NaiveBayes\NaiveBayes.suo

?????文件??????46080??2008-12-31?15:05??分類器程序\貝葉斯分類器實驗報告.doc

?????目錄??????????0??2011-04-07?12:34??分類器程序\NaiveBayes\NaiveBayes\Debug

?????目錄??????????0??2011-04-07?12:34??分類器程序\NaiveBayes\debug

?????目錄??????????0??2011-04-07?12:34??分類器程序\NaiveBayes\NaiveBayes

............此處省略5個文件信息

評論

共有 條評論