原创 Large scale machine learning in Python

class AdalineSGD(object): def __init__(self, eta=0.01, n_iter=10, shuffle=True, random_state=None): self

原创 Handwritten digit recognition with ANNs

digits_ann .py : import cv2 import cPickle import numpy as np import gzip def load_data(): mnist = gzip.open('mn

原创 CAMShift_OpenCV_Python

Reference to 《learning opencv3 computer vision with python》 import numpy as np import cv2 cap = cv2.VideoCapture(0)

原创 MotionDetect_OpenCV_Python

Reference to 《learning opencv3 computer vision with python》 import cv2 import numpy as np camera = cv2.VideoCapture(

原创 Training a perceptron via scikit-learn

1. Load Data import numpy as np from sklearn import datasets iris = datasets.load_iris() X = iris.data[:, [2, 3]] y =

原创 Applying Machine Learning to Sentiment Analysis

1. Obtaining the IMDb movie review dataset : A compressed archive of the movie review dataset  ---- http://ai.stanford.

原创 Learning Best Practices for Model Evaluation and Hyperparameter Tuning

1.  Streamlining workflows with pipelines  1.1 Loading the Breast Cancer Wisconsin dataset from distutils.version imp

原创 Learning with ensembles

The goal behind ensemble methods is to combine different classifers into a meta-classifer that has a better generalizat

原创 獲取路徑下所有文件

#include <iostream> #include <stdlib.h> #include <Windows.h> #include <string> #include <vector> #include <io.h> using

原创 Code實現註冊系統服務

主要用到三個Functions: #define RegOpenKeyEx RegOpenKeyExARegOpenKeyExA( _In_ HKEY hKey, _In_opt_ LPCSTR lpSubKey,

原创 Using kernel principal component analysis for nonlinear mappings

Take a look at a kernelized version of PCA, or kernel PCA, which relates to the concepts of kernel SVM. Using kernel P

原创 Leveraging weak learners via adaptive boosting(AdaBoost)

In this section about ensemble methods, we discuss boosting with a special focus on its most common implementation, Ada

原创 Console 模式與Windows模式互換

有時候Project需要將console模式與windows模式互換。 大致有二點改動: 1.程序入口。 int main(int argc, char **argv)   <------>int  wWinMain(HINSTANCE,

原创 make_unique的使用

關於make_unique的構造及使用例程,MSDN的講解非常詳細 (https://msdn.microsoft.com/zh-cn/library/dn439780.aspx ) 使用過程中,我的理解主要有這麼幾個關鍵點: 1.  m

原创 Evaluating and tuning the ensemble classifer

1. Compute the ROC curves from the test set to check if the MajorityVoteClassifier generalizes well to unseen data . f