- 博客(92)
- 收藏
- 关注
原创 Python用time模块看程序的时间
文章目录前言代码总结前言有时候写程序的时候不知道是不是本次运行的,所以需要看一下档期的时间,可以python的time模块完成,操作见下面的代码代码代码如下(示例):import timeprint(time.strftime('%Y-%m-%d %H:%M:%S', time.localtime()))程序运行结果如下:2022-04-21 16:13:15总结(如果您发现我写的有错误,欢迎在评论区批评指正)...
2022-04-21 16:19:05
1091
原创 git常用操作
文章目录前言git删除文件或者文件夹删除文件删除整个文件夹总结前言git常用的操作举例git删除文件或者文件夹删除文件删除某个文件(比如test.txt文件):git rm 文件名名称git rm test.txt删除整个文件夹删除整个文件夹好像还不行,要加个r在本地仓库删除指定文件夹 git rm -r 文件夹/然后git commit -m “备注”然后git push这样不仅本地没有了 gitee上面也没有了总结如果您发现我写的有错误,欢迎在评论区批评指正!...
2022-01-24 16:07:53
401
原创 Python鼠标拖动曲线(matplotlib)
文章目录前言一、效果预览二、代码2.读入数据总结前言用matplotlib制作一个鼠标拖动点移动改变曲线形状的效果一、效果预览二、代码最近时间精力有限,不能程序每一步都写的很详细,以下是全部代码,带有一定的注释:import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsimport warningswarnings.filterwarnings('ignore')
2021-11-19 20:50:44
6703
8
原创 爬取百度百科周星驰页面电影名称并生成词云图
文章目录前言代码总结前言数据是很重要的,爬虫是获取数据的一个很有用的方式代码最近时间精力有限,代码注释部分见gitee链接:爬取百度百科周星驰页面电影名称并生成词云图总结如果您发现我写的有错误,欢迎在评论区批评指正!...
2021-09-07 21:58:33
546
原创 爬取许嵩歌曲名称并生成词云图
文章目录前言代码总结前言数据是非常有用的,爬虫是获取数据的一种方式代码最近时间精力有限,步骤过程放在如下的链接中:爬取许嵩歌曲名称并生成词云图总结(如果您发现我写的有错误,欢迎在评论区批评指正)...
2021-09-07 21:11:36
308
原创 np.where()的使用
文章目录前言np.where()的使用总结前言np.where这个函数还是很强大的np.where()的使用(最近时间精力有限,下面的gitee链接有讲解)np.where()的用法讲解与举例总结如果您发现我写的有错误,欢迎在评论区批评指正!...
2021-08-16 19:29:50
245
原创 pycharm运行按钮栏从右上角挪到左上角
文章目录前言安装好的pycharm默认运行程序的按钮栏在界面的左上角View-Apperance-Toolbar变回右上角了总结前言有时候pycharm的运行按钮在界面的左上角,这样操作不是很方便,可以通过下面的方法移动到右上角。安装好的pycharm默认运行程序的按钮栏在界面的左上角View-Apperance-Toolbar变回右上角了总结如果您发现我写的有错误,欢迎在评论区批评指正!...
2021-07-16 09:42:52
4853
13
原创 python怎么把一个文件夹内的文件复制到另外一个文件夹
文章目录一、pandas是什么?二、使用步骤1.引入库2.读入数据总结一、pandas是什么?二、使用步骤1.引入库代码如下(示例):import numpy as npimport pandas as pdimport matplotlib.pyplot as pltimport seaborn as snsimport warningswarnings.filterwarnings('ignore')import sslssl._create_default_https_co
2021-06-28 12:31:58
13888
1
原创 PCA降维可视化举例
文章目录前言1、生成一群二维点并画在坐标轴上2、PCA降维3、平移回去PCA和原来点共同显示总结前言横看成岭侧成峰,远近高低各不同。PCA降维的作用是降低数据的维度,同时让最小的维度得到最大原数据的信息,也就是降维后的点方差最大。本文通过一群点从二维降到一维可视化PCA的效果1、生成一群二维点并画在坐标轴上import matplotlib.pyplot as pltimport numpy as npimport pandas as pd#先生成一群点 然后画出来datax=np.ra
2021-06-12 00:26:42
3427
4
原创 一个大的dataframe通过某一列的值分成几个小的dataframe
文章目录前言一、分步骤一步到位总结前言有时候希望根据dataframe某一列的值分成几个小的dataframe,可以通过如下的方式进行操作。一、分步骤import pandas as pdimport numpy as nppd.set_option('display.max_rows', 8)#行数设置为10000#读取数据data=pd.read_csv("data.csv")datadata['label'].value_counts()#可以看到label有三类0,1,-.
2021-06-01 11:53:22
5280
11
原创 dataframe交换某两行(多行)的数据
文章目录前言例1例2总结前言有时候想更换dataframe数据中某两行(多行)的位置,这个时候可以通过如下方法实现例1import pandas as pddf = pd.DataFrame([[1,2],[3,4]],columns=['a','b'],index=['c','d'])df a bc 1 2d 3 4df=df.reindex(['d','c'])df a bd 3 4c 1 2这样就完成了更换例2import pandas as pddf =.
2021-06-01 11:09:39
5135
原创 C++分别用结构体和数组实现简单的链表
文章目录前言1机构体总结前言程序=数据结构+算法。本文通过两种简单的方式实现链表这种基础的数据结构。1机构体#include <iostream>using namespace std;struct Node{ Node(int data) :data(data), next(NULL) {} int data; Node *next;};int main(){ Node *head = new Node(1); head->next = new Node
2021-04-01 12:24:09
365
原创 资金流入流出预测(下):时序规则rule_based介绍以及比赛应用
文章目录前言比赛介绍时序规则rule_based介绍ARIMA局限性rule_based介绍资金流入流出预测应用1读取数据2数据预处理2.1给数据添加时间维度2.2选取平稳数列3RuleBased模型3.1计算周期因子3.2统计频次3.3按照rule_based方式计算预测结果4输出结果与提交总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human in
2021-03-29 02:49:11
1163
原创 资金流入流出预测(上)(阿里云天池大赛)
文章目录前言比赛介绍采用不同的模型预测以及结果分数prophet模型1数据加载2数据探索与预处理2.1数据特征探索2.2按照时间聚合目标值total_purchase_amt和total_redeem_amt2.3目标值可视化2.4准备目标值3模型训练与预测3.1模型导入与拟合3.2模型预测3.3预测结果可视化3.4预测结果提交还有其他的不同的模型 (待续)总结前言什么是AI?The theory and development of computer systems able to perform
2021-03-27 14:01:36
1466
原创 风控评分卡模型介绍与案列实战
文章目录前言风控评分卡模型介绍步骤简介其他评估指标KSPSI案列实战1读取数据2数据探索与预处理2.1标签的分布情况探索与可视化2.2缺失值的补全2.3数据分箱3计算WOE与IV值4根据计算结果再探索一下数据5WOE编码6开始用逻辑回归来进行建模6.1筛选特征6.2数据集切分6.3模型训练与评估7做评分卡模型8评分卡效果测试预览总结前言什么是AI?The theory and development of computer systems able to perform tasks normally
2021-03-26 12:42:44
902
原创 WOE编码与IV值介绍与应用(以数据集GiveMeSomeCredit风控模型开发为例)
文章目录前言WOE编码与IV值介绍简介计算举例数据集GiveMeSomeCredit风控模型开发(特征处理与逻辑回归建模部分)1读取数据2数据探索与预处理2.1标签的分布情况探索与可视化2.2缺失值的补全2.3数据分箱3计算WOE与IV值4根据计算结果再探索一下数据5WOE编码6开始用逻辑回归来进行建模6.1筛选特征6.2数据集切分6.3模型训练与评估总结前言什么是AI?The theory and development of computer systems able to perform tas
2021-03-26 01:58:40
778
原创 规划问题简介与ortools求解简单线性规划问题举例
文章目录前言规划问题简介ortools求解简单线性规划问题举例总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)规划问题简介看到线性规划问题,有没有让你想起峥嵘的高中岁月?高考数学大题第4题,一般就是卷子
2021-03-24 11:34:15
1000
原创 Project:智能供应链
文章目录前言项目介绍智能供应链(一)1读取数据2数据探索3数据预处理与可视化分析3.1合并字段与处理缺失值3.2字段之间相关性可视化3.3按照不同的Market,Order R,Category Name对销售额度进行分析Sales per customer并且可视化3.4按照不同的时间维度对销售额进行分析3.5用户RFM分层管理3.6不同地区的支付情况分析与可视化3.7对负收益的订单进行数据分析3.8欺诈订单分析(支付方式、地区、哪些人欺诈订单较多)4文件转存为pkl格式智能供应链(二)1导入数据2数据探
2021-03-23 16:40:39
1401
2
原创 以鸢尾花分类三个模型(LR、SVC、RF)融合硬投票与软投票
文章目录前言1软投票与硬投票区别2鸢尾花分类举例2.1硬投票2.1软投票总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)1软投票与硬投票区别2鸢尾花分类举例2.1硬投票from sklearn.dat
2021-03-21 14:00:39
1696
原创 xgboost与lightgbm模型融合做天池比赛二手车价格预测
文章目录前言什么是模型融合?xgboost与lightgbm模型融合做天池比赛二手车价格预测总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)什么是模型融合?xgboost与lightgbm模型融合做天池比
2021-03-21 12:24:09
1860
原创 使用遗传算法求解旅行商问题(TSP)
文章目录前言问题描述步骤总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)问题描述如果使用机器学习的话,没有lable和经验,所以使用不了。如果使用暴力穷举,第一个城市有50个选择,下一个有49个,再下一个
2021-03-20 13:45:10
459
原创 遗传算法简介与举例
文章目录前言遗传算法简介使用举例总结前言很多优化问题,用机器学习是搞定不了的,这个时候需要用到一些启发式算法比如遗传算法。遗传算法简介使用举例(最近时间精力有限,代码步骤见gitee):遗传算法简介与举例总结(如果您发现我写的有错误,欢迎在评论区批评指正)...
2021-03-20 13:22:30
190
原创 Networkx工作职位和影响力分析机器可视化以及能力描述的薪资预
文章目录前言思路步骤代码步骤总结前言如果给定了职位和能力的描述,能不能通过之前已有的数据大致估算薪资视频呢?思路步骤基于能力描述的薪资预测:• 数据集:抓取了4512个职位的能力描述,薪资Step1,数据加载Step2,可视化,使用NetworkxStep3, 提取文本特征 TFIDFStep4,回归分析,使用KNN回归,朴素贝叶斯回归,训练能力和薪资匹配模型Step5,基于指定的能力关键词,预测薪资test = ‘测试 北京 3年 专科’test2 = ‘测试 北京 4年 专科’
2021-03-20 12:27:35
164
原创 RFM分层管理(以智能供应链数据为例)
文章目录前言RFM概念举例总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)RFM概念主要是根据消费间隔、消费频率、消费金额来对用户分类管理,然后做出不同的对待策略。举例(最近时间精力有限,代码步骤注解
2021-03-18 20:40:14
245
原创 帕累托法则举例
文章目录前言帕累托法则简介简单举例总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)帕累托法则简介简单举例(最近时间精力有限,具体代码注解见gitee):帕累托法则举例总结(如果您发现我写的有错误,欢
2021-03-18 10:11:02
1453
原创 Numpy与Pytorch搭建网络对boston房价预测
前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)梯度下降法其实神经网络的训练最基础的原理还是梯度下降法,目的就是让模型更准确,误差更小。千里之行,始于足下,梯度下降法不可小觑,前几天写过一篇优快云:梯度下降法公
2021-03-16 16:37:09
1259
原创 文本标签数量、句子长度分布以及词频统计与关键词词云(以中文酒店评论预料为例)
文章目录前言任务描述代码步骤总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)任务描述给定一个数据集,包含了客户对于酒店的评价的语句以及lable(0,1分别代表负面和正面评价),用sns,wordcloud
2021-03-15 02:17:43
1624
原创 卷积、池化输出大小计算公式以及TF卷积NN实现mnist数字识别
文章目录前言卷积输出大小计算公式池化输出大小计算公式总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)卷积输出大小计算公式如果已知输入图片的形状,卷积核的数量,卷积核大小,以及移动步长,那么输出图片的形状如何
2021-03-14 14:46:36
351
原创 tensorflow全连接网络Mnist手写数字识别
文章目录前言代码步骤总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)代码步骤(最近时间精力有限,具体代码步骤见gitee,有详细的注解):tensorflow全连接网络Mnist手写数字识别总结(如果您
2021-03-14 10:31:01
225
原创 梯度下降法公式推导(不用泰勒展开式)
文章目录前言公式推导总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)公式推导其实不用泰勒展开式也是可以简单方便的得出梯度下降法的结论的,在高数书本(同济)的微分的定义里就有讲到(我看的是同济7版第113页和
2021-03-13 02:02:46
633
原创 DeepWalk、Node2vec对美国大学生足球队进行Embedding
文章目录前言什么是Graph EmbeddingDeepWalkNode2Vec总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)什么是Graph EmbeddingDeepWalk举例(最近
2021-03-11 20:19:24
336
原创 使用PageRank分析希拉里邮件往来中的关键人物
文章目录前言任务简介代码过程总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)任务简介如果你是法官,你会怎么捋清楚这些邮件里面的人的错综复杂的关系,而且怎么挑出哪些人是比较重要的,哪些比较菜鸟可以忽略呢?可
2021-03-10 22:15:24
735
原创 PageRank工具使用案列:ABCD四个顶点简单有向图可视化
文章目录前言图论基本知识(出链、入链、影响力推导、转移矩阵、等级泄漏(Rank Leak)、等级沉没(Rank Sink)、随机浏览模型)等知识后续有机会补充简单有向图可视化举例PageRank工具使用举例总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data t
2021-03-10 21:03:45
721
原创 prophet页面访问流量预测、高铁乘客数量预测、沪市指数预测
文章目录前言ARIMA模型不足prophet模型原理与工具页面访问流量预测案例JetRail高铁的乘客数量预测沪市指数预测总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)ARIMA模型不足prophet
2021-03-10 01:22:05
911
2
原创 时序分析预测tsa、ARMA、ARIMA、LSTM应用举例
文章目录前言什么是时间序列模型应用举例tsa对沪市指数进行分析ARMA进行时间序列分析ARMA沪市指数预测ARIMA沪市指数预测LSTM沪市指数预测总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)什么是时间序
2021-03-09 17:13:27
1249
原创 MinHash、MinHashLSH、MinHashLSHForest、MinHashLSHEnsemble、Simhash举例
文章目录前言原理简介与举例MinHashMinHashLSHMinHashLSHForestMinHashLSHEnsembleSimhash总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)原理简介与举例M
2021-03-07 22:32:59
537
原创 GBDT、LR、RF及其组合分类效果对比
文章目录前言代码过程总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)代码过程(最近时间精力有限,请见谅,后期有时间会补充完整原理和过程,具体代码过程见gitee):GBDT、LR、RF及其组合分类效果对比
2021-03-06 16:32:30
785
原创 Wide&Deep模型对movielens进行评分预测
文章目录前言代码过程总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)代码过程(最近时间精力有限,代码过程见gitee):Wide&Deep模型对movielens进行评分预测总结(如果您发现我写
2021-03-06 16:28:31
663
1
原创 KNNBasic、KNNWithMeans、KNNWithZScore、KNNBaseline分别对MovieLens数据集进行协同过滤
文章目录前言KNNBasicKNNWithMeansKNNWithZScoreKNNBaseline总结前言什么是AI?The theory and development of computer systems able to perform tasks normally requiring human intelligence.(–Oxford Dictionary)Using data to solve problems.(–cy)KNNBasic(具体代码过程见gitee):KNNBa
2021-03-06 01:16:55
1690
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人