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

  • 大小: 5KB
    文件類型: .cpp
    金幣: 1
    下載: 0 次
    發(fā)布日期: 2021-01-06
  • 語言: C/C++
  • 標(biāo)簽: 貝葉斯??

資源簡介

機器學(xué)習(xí)貝葉斯學(xué)習(xí)器的經(jīng)典算法,關(guān)于是否去打網(wǎng)球的源代碼

資源截圖

代碼片段和文件信息

//樸素貝葉斯學(xué)習(xí)器算法c語言代碼實現(xiàn)

#include?“stdio.h“

//天氣類型
enum?enum_outlook
{
sunny?=?0
overcast?=?1
rain?=?2
}_outlook;

//溫度類型
enum?enum_temperature
{
hot?=?0
mild?=?1
cool?=?2
}_temperature;

//濕度類型
enum?enum_humidity
{
high?=?0
normal?=?1
}_humidity;

//風(fēng)強度類型
enum?enum_wind
{
weak?=?0
strong?=?1
}_wind;

//目標(biāo)類型
enum?enum_targetAttribute
{
yes?=?0
no?=?1
}_targetAttribute;

//訓(xùn)練實例
#define?TRAIN_NUM?14??????//定義14個訓(xùn)練實例
#define?ATTR_NUM?4????????//每個訓(xùn)練實例有4個屬性
int?trainSample[][ATTR_NUM?+?1]?=?{
{
sunnyhothighweakno
}
{
sunnyhothighstrongno
}
{
overcasthothighweakyes
}
{
rainmildhighweakyes
}
{
raincoolnormalweakyes
}
{
raincoolnormalstrongno
}
{
overcastcool

評論

共有 條評論