图的存在,让数据变得形象化.无论多么复杂的东西,都是简单的组合. import matplotlib.pyplot as plt import numpy as np dict = {'A': 40, 'B': 70, 'C': 30, 'D': 85} for i, key in enumerate(dict):#Circulate both index and value(Here is key) plt.bar(i, dict[key], color='r', width=0.2) plt
1.梯度上升优化 1). 伪代码: 所有回归系数初始化为1-------------------weights = ones((colNum,1)) 重复r次: 计算整个数据集的梯度gradient 使用alpha*gradient更新回归系数的向量 返回回归系数weights 2). 迭代r次的代码: for k in range(r): #heavy on matrix operations h = sigmoid(dataMatrix*weights) #matrix mult error
# -*- coding: utf-8 -*- """ Created on Sun Oct 4 15:57:46 2015 @author: keithguofan """ import random from PIL import Image,ImageDraw,ImageFont import math,string class RandomChar(): @staticmethod def Unicode(): val = random.