Python之groupby详解

# -*- coding: utf-8 -*-"""Created on Sat Jun 30 10:09:47 2018测试分组groupby@author: zhen"""from pandas import DataFrame"""d...

Python实现排列组合详解

# -*- coding: utf-8 -*-"""Created on Sat Jun 30 11:49:56 2018 @author: zhen"""#===============测试排列组合==================i...

Python使用np.c_和np.r_实现数组转换成矩阵详解

# -*- coding: utf-8 -*-"""Created on Sat Jun 30 14:49:22 2018 @author: zhen""" import numpy as npa = np.array([[1,2,3]...

Python数据清洗基本流程详解

# -*- coding: utf-8 -*-"""Created on Wed Jul 4 18:40:55 2018 @author: zhen""" import pandas as pdimport numpy as np# 创...

Python机器学习入门详解

# NumPy Python科学计算基础包 import numpy as np # 导入numpy库并起别名为npnumpy_array = np.array([[1,3,5],[2,4,6]])print(numpy_array)...

Python鸢尾花分类实现详解

#coding:utf-8from sklearn.datasets import load_irisfrom sklearn.model_selection import train_test_splitfrom sklearn.neig...

使用线性回归推导函数实现线性回归详解

import numpy as np  # 导入科学技术框架 import matplotlib.pyplot as plt  # 导入画图工具# 随机生成100个数据[0, 3)之间,rand是随机均匀分布[0, 1...

使用sklearn机器学习库实现线性回归详解

import numpy as np  # 导入科学技术框架import matplotlib.pyplot as plt  # 导入画图工具from sklearn.linear_model import Linear...

Python实现批量梯度下降算法详解

# -*- coding: UTF-8 -*-import numpy as npimport math# 定义基础变量learning_rate = 0.1n_iterations = 10000m = 100x = 2 * np.ran...

Python之随机梯度下降详解

实现:# -*- coding: UTF-8 -*-""" 练习使用随机梯度下降算法"""import numpy as npimport math__author__ = 'zhen'# 生成测试数据x = 2 * np.rando...