-
樸素貝葉斯(Naive Bayes, NB)算法是機器學(xué)習(xí)領(lǐng)域中常用的一種基于概率的分類算法,非常簡單有效。k近鄰法(k-Nearest Neighbor, kNN)[30,31]又稱為基于實例(Example-based, instance-bases)的算法,其基本思想相當(dāng)直觀:Rocchio法來源于信息檢索系統(tǒng),后來最早由Hull在1994年應(yīng)用于分類[74],從那以后,Rocchio方法就在文本分類中廣泛應(yīng)用起來。
標簽:
Naive
Bayes
NB
貝葉斯
上傳時間:
2014-01-03
上傳用戶:wxhwjf
-
AutomaticPropertiesDefaultValues
Article_src.zip
PropertyInfo[] props = o.GetType().GetProperties(BindingFlags.Public | BindingFlags.NonPublic | BindingFlags.instance | BindingFlags.Static)
for (int i = 0 i < props.Length i++)
{
PropertyInfo prop = props[i]
if (prop.GetCustomAttributes(true).Length > 0)
{
object[] defaultValueAttribute = prop.GetCustomAttributes(typeof(DefaultValueAttribute), true)
if (defaultValueAttribute != null)
{
DefaultValueAttribute dva = defaultValueAttribute[0] as DefaultValueAttribute
if(dva != null)
prop.SetValue(o, dva.Value, null)
}
標簽:
AutomaticPropertiesDefaultValues
PropertyInfo
Article_src
GetPropert
上傳時間:
2014-11-22
上傳用戶:xaijhqx
-
ofdm信道特性
Channel transmission simulator
Channel transmission simulator
%
% inputs:
% sig2 - noise variance
% Mt - number of Tx antennas
% Mr - number of Rx antennas
% x - vector of complex input symbols (for MIMO, this is a matrix, where each column
% is the value of the antenna outputs at a single time instance)
% H - frequency selective channel - represented in block-Toeplitz form for MIMO transmission
% N - number of symbols transmitted in OFDM frame
%
% outputs:
% y - vector of channel outputs (matrix for MIMO again, just like x matrix)
% create noise vector sequence (each row is a different antenna, each column is a
% different time index) note: noise is spatially and temporally white
標簽:
transmission
simulator
Channel
inputs
上傳時間:
2016-07-22
上傳用戶:kelimu
-
THE DESIGN PATTERNS JAVA COMPANION
1. Creational Patterns 17
The Factory Pattern 18
How a Factory Works 18
Sample Code 18
The Two Derived Classes 19
Building the Factory 20
Factory Patterns in Math Computation 22
When to Use a Factory Pattern 24
Thought Questions 25
The Abstract Factory Pattern 26
A GardenMaker Factory 26
How the User Interface Works 28
Consequences of Abstract Factory 30
Thought Questions 30
The Singleton Pattern 31
Throwing the Exception 32
Creating an instance of the Class 32
Static Classes as Singleton Patterns 33
Creating Singleton Using a Static Method 34
標簽:
Creational
COMPANION
PATTERNS
Patterns
上傳時間:
2013-12-20
上傳用戶:xwd2010
-
This articles shows how to retrieve a list of PCs on the local network which are running MS SQL Server, and gets information about the instances, such as server name, instance name, version, and databases.
標簽:
articles
retrieve
network
running
上傳時間:
2014-01-04
上傳用戶:獨孤求源
-
// 學(xué)生管理.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "resource.h"
#define MAX_LOADSTRING 100
// Global Variables:
Hinstance hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(Hinstance hinstance);
BOOL Initinstance(Hinstance, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
struct person
{
char name[10];
int ID;
int cj_yw;
int cj_sx;
struct person* next;
struct person* pro;
}per;
int APIENTRY WinMain(Hinstance hinstance,
Hinstance hPrevinstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hinstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hinstance, IDC_MY, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hinstance);
// Perform application initialization:
if (!Initinstance (hinstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hinstance, (LPCTSTR)IDC_MY);
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(Hinstance hinstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hinstance = hinstance;
wcex.hIcon = LoadIcon(hinstance, (LPCTSTR)IDI_MY);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_MY;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hinstance, (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
}
//
// FUNCTION: Initinstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL Initinstance(Hinstance hinstance, int nCmdShow)
{
HWND hWnd;
hInst = hinstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hinstance, NULL);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
RECT rt;
GetClientRect(hWnd, &rt);
DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
標簽:
計算器
學(xué)生
上傳時間:
2016-12-29
上傳用戶:767483511
-
// 學(xué)生管理.cpp : Defines the entry point for the application.
//
#include "stdafx.h"
#include "resource.h"
#define MAX_LOADSTRING 100
// Global Variables:
Hinstance hInst; // current instance
TCHAR szTitle[MAX_LOADSTRING]; // The title bar text
TCHAR szWindowClass[MAX_LOADSTRING]; // The title bar text
// Foward declarations of functions included in this code module:
ATOM MyRegisterClass(Hinstance hinstance);
BOOL Initinstance(Hinstance, int);
LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
LRESULT CALLBACK About(HWND, UINT, WPARAM, LPARAM);
struct person
{
char name[10];
int ID;
int cj_yw;
int cj_sx;
struct person* next;
struct person* pro;
}per;
int APIENTRY WinMain(Hinstance hinstance,
Hinstance hPrevinstance,
LPSTR lpCmdLine,
int nCmdShow)
{
// TODO: Place code here.
MSG msg;
HACCEL hAccelTable;
// Initialize global strings
LoadString(hinstance, IDS_APP_TITLE, szTitle, MAX_LOADSTRING);
LoadString(hinstance, IDC_MY, szWindowClass, MAX_LOADSTRING);
MyRegisterClass(hinstance);
// Perform application initialization:
if (!Initinstance (hinstance, nCmdShow))
{
return FALSE;
}
hAccelTable = LoadAccelerators(hinstance, (LPCTSTR)IDC_MY);
// Main message loop:
while (GetMessage(&msg, NULL, 0, 0))
{
if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
}
return msg.wParam;
}
//
// FUNCTION: MyRegisterClass()
//
// PURPOSE: Registers the window class.
//
// COMMENTS:
//
// This function and its usage is only necessary if you want this code
// to be compatible with Win32 systems prior to the 'RegisterClassEx'
// function that was added to Windows 95. It is important to call this function
// so that the application will get 'well formed' small icons associated
// with it.
//
ATOM MyRegisterClass(Hinstance hinstance)
{
WNDCLASSEX wcex;
wcex.cbSize = sizeof(WNDCLASSEX);
wcex.style = CS_HREDRAW | CS_VREDRAW;
wcex.lpfnWndProc = (WNDPROC)WndProc;
wcex.cbClsExtra = 0;
wcex.cbWndExtra = 0;
wcex.hinstance = hinstance;
wcex.hIcon = LoadIcon(hinstance, (LPCTSTR)IDI_MY);
wcex.hCursor = LoadCursor(NULL, IDC_ARROW);
wcex.hbrBackground = (HBRUSH)(COLOR_WINDOW+1);
wcex.lpszMenuName = (LPCSTR)IDC_MY;
wcex.lpszClassName = szWindowClass;
wcex.hIconSm = LoadIcon(wcex.hinstance, (LPCTSTR)IDI_SMALL);
return RegisterClassEx(&wcex);
}
//
// FUNCTION: Initinstance(HANDLE, int)
//
// PURPOSE: Saves instance handle and creates main window
//
// COMMENTS:
//
// In this function, we save the instance handle in a global variable and
// create and display the main program window.
//
BOOL Initinstance(Hinstance hinstance, int nCmdShow)
{
HWND hWnd;
hInst = hinstance; // Store instance handle in our global variable
hWnd = CreateWindow(szWindowClass, szTitle, WS_OVERLAPPEDWINDOW,
CW_USEDEFAULT, 0, CW_USEDEFAULT, 0, NULL, NULL, hinstance, NULL);
if (!hWnd)
{
return FALSE;
}
ShowWindow(hWnd, nCmdShow);
UpdateWindow(hWnd);
return TRUE;
}
//
// FUNCTION: WndProc(HWND, unsigned, WORD, LONG)
//
// PURPOSE: Processes messages for the main window.
//
// WM_COMMAND - process the application menu
// WM_PAINT - Paint the main window
// WM_DESTROY - post a quit message and return
//
//
LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
int wmId, wmEvent;
PAINTSTRUCT ps;
HDC hdc;
TCHAR szHello[MAX_LOADSTRING];
LoadString(hInst, IDS_HELLO, szHello, MAX_LOADSTRING);
switch (message)
{
case WM_COMMAND:
wmId = LOWORD(wParam);
wmEvent = HIWORD(wParam);
// Parse the menu selections:
switch (wmId)
{
case IDM_ABOUT:
DialogBox(hInst, (LPCTSTR)IDD_ABOUTBOX, hWnd, (DLGPROC)About);
break;
case IDM_EXIT:
DestroyWindow(hWnd);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
break;
case WM_PAINT:
hdc = BeginPaint(hWnd, &ps);
// TODO: Add any drawing code here...
RECT rt;
GetClientRect(hWnd, &rt);
DrawText(hdc, szHello, strlen(szHello), &rt, DT_CENTER);
EndPaint(hWnd, &ps);
break;
case WM_DESTROY:
PostQuitMessage(0);
break;
default:
return DefWindowProc(hWnd, message, wParam, lParam);
}
return 0;
}
// Mesage handler for about box.
LRESULT CALLBACK About(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam)
{
switch (message)
{
case WM_INITDIALOG:
return TRUE;
case WM_COMMAND:
if (LOWORD(wParam) == IDOK || LOWORD(wParam) == IDCANCEL)
{
EndDialog(hDlg, LOWORD(wParam));
return TRUE;
}
break;
}
return FALSE;
}
標簽:
學(xué)生 計算器
上傳時間:
2016-12-29
上傳用戶:767483511
-
Human Factors and Systems Interaction aims to address the main issues of concern
within systems interface with a particular emphasis on the system lifecycle
development and implementation of interfaces and the general implications of
virtual, augmented and mixed reality with respect to human and technology
interaction. Human Factors and Systems Interaction is, in the first instance, affected
by the forces shaping the nature offuture computing and systems development
標簽:
Interactions
Advances
Factors
System
Human
and
in
上傳時間:
2020-06-10
上傳用戶:shancjb
-
Artificial Intelligence (AI) has undoubtedly been one of the most important buz-
zwords over the past years. The goal in AI is to design algorithms that transform com-
puters into “intelligent” agents. By intelligence here we do not necessarily mean an
extraordinary level of smartness shown by superhuman; it rather often involves very
basic problems that humans solve very frequently in their day-to-day life. This can
be as simple as recognizing faces in an image, driving a car, playing a board game, or
reading (and understanding) an article in a newspaper. The intelligent behaviour ex-
hibited by humans when “reading” is one of the main goals for a subfield of AI called
Natural Language Processing (NLP). Natural language 1 is one of the most complex
tools used by humans for a wide range of reasons, for instance to communicate with
others, to express thoughts, feelings and ideas, to ask questions, or to give instruc-
tions. Therefore, it is crucial for computers to possess the ability to use the same tool
in order to effectively interact with humans.
標簽:
Embeddings
Processing
Language
Natural
in
上傳時間:
2020-06-10
上傳用戶:shancjb
-
An Arduino core for the ATmega328, ATmega168, ATmega88, ATmega48 and ATmega8, all running a [custom version of Optiboot for increased functionality](#write-to-own-flash). This core requires at least Arduino IDE v1.6.2, where v1.8.5+ is recommended. <br/>
**This core gives you two extra IO pins if you're using the internal oscillator!** PB6 and PB7 is mapped to [Arduino pin 20 and 21](#pinout).<br/>
If you're into "generic" AVR programming, I'm happy to tell you that all relevant keywords are being highlighted by the IDE through a separate keywords file. Make sure to test the [example files](https://github.com/MCUdude/MiniCore/tree/master/avr/libraries/AVR_examples/examples) (File > Examples > AVR C code examples). Try writing a register name, <i>DDRB</i> for instance, and see for yourself!
標簽:
MiniCore
上傳時間:
2021-02-22
上傳用戶: