随笔分类 - 机器学习笔记
PRML学习过程中的一些公式推导及程序实现
摘要:template <class T1, class T2>double ManhattanDistance(std::vector<T1> &inst1, std::vector<T2> &inst2) { if(inst1.size() != inst2.size()) { std::cout<<
阅读全文
摘要:template <class DataType1, class DataType2>double EuclideanDistance(std::vector<DataType1> &inst1, std::vector<DataType2> &inst2) { if(inst1.size() !=
阅读全文
摘要:正态分布3σ原则,把3倍方差之外的点设想为噪声数据来排除。 归一化,将数据经过处理之后限定到一定的范围内,一般都会将数据限定到[0,1]。 #include <iostream>#include <string>#include <vector>#include <algorithm>#includ
阅读全文
摘要:We can estimate the weight values for our training data using stochastic gradient descent. Stochastic gradient descent requires two parameters: Learni
阅读全文
摘要:#include <iostream>#include <string>#include <fstream>#include <sstream>#include <vector>#include <cmath>template <typename DataType>double sigmoid(Da
阅读全文
摘要:At each step the weight vector is moved in the direction of the greatest rate of decrease of the error function, and so this approach is known as grad
阅读全文
摘要:We turn next to the task of finding a weight vector w which minimizes the chosen function E(w). Because there is clearly no hope of finding an anlytic
阅读全文