有了关键词列表和关键词的词频后,我们接下来就可以着手准备训练数据集,以下是训练集的定义:
表名:seo_train |
表中文名:热词训练集表 |
字段名称 | 字段类型 | 字段解释 |
keywords | varchar(100) | 关键词 |
rw_url | varchar(1000) | 关键词所在url |
title_score | decimal(8,4) | 在title中出现的次数 |
keyword_score | decimal(8,4) | 在keywords中出现的次数 |
description_score | decimal(8,4) | 在description中出现的次数 |
other_score | decimal(8,4) | 在网页其他地方出现的次数 |
rw_position | int | url基于该关键的排名 |
Create table seo_train(keywords varchar(100), rw_url varchar(1000),title_score decimal(8,4), keyword_score decimal(8,4) , description_score decimal(8,4) , other_score decimal(8,4) ,rw_position int) character set utf8mb4 collate utf8mb4_bin;
相关数据的生成逻辑如下:
keywords字段基于表relative_hotwords中的keywords;
rw_url字段基于表relative_web中的rw_url
title_score、keyword_score、description_score、other_score字段从web_detail表的web_html字段中提取获得
rw_position字段基于keywords关键词从百度搜索中抓取。
由于表relative_hotwords的记录数较多,达到了4.7万,为了提高效率,对词做了过滤,筛选了6千个搜索热度排名高的词。搜索热度排名基于百度指数。
通过剔除重复的,最终我们获得表seo_train的数据量是7341条。
此处代码略,未完待续……
分享到:
相关推荐
机器学习入门与实战(scikit-learn和Keras)课件—决策树.pdf机器学习入门与实战(scikit-learn和Keras)课件—决策树.pdf机器学习入门与实战(scikit-learn和Keras)课件—决策树.pdf机器学习入门与实战(scikit-learn和...
Machine Learning with PyTorch and Scikit-Learn-Packt (2022)
机器学习技法6 - 4 - Machine Learning in Action (12-59).mp4
机器学习、深度学习的学习路径及知识总结-machine-learning-deep-learning-notes
Human-in-the-Loop Machine Learning lays out methods for humans and machines to work together effectively. Summary Most machine learning systems that are deployed in the world today learn from human ...
machine-learning-ex4 吴恩达 机器学习 课程习题代码
机器学习 - MachineLearning - ML、深度学习 - DeepLearning - DL、自然语言处理 NLP
AiLearning: 机器学习 - MachineLearning - ML、深度学习 - DeepLearning - DL、自然语言处理 NLP
斯坦福公开课machine learning机器学习第七周SVM编程作业ex6
Machine-Learning-Algorithms-from-Scratch, 从零开始实现机器学习算法 Machine-Learning-Algorithms-from-Scratch从零开始实现机器学习算法。目前实现的算法:简单线性回归。数据集:来自Quandl的股票数据逻辑回归...
机器学习实战_Machine_Learning_in_Action.pdf
基于Python的机器学习(Python-Real World Machine Learning)-2016年最新英文原版,0积分——全书983页,内容很丰富。 What this learning path covers? Module 1, Python Machine Learning Cookbook, teaches you...
机器学习实战:基于Scikit-Learn、Keras和TensorFlow 机器学习实战:基于Scikit-Learn、Keras和TensorFlow 机器学习实战:基于Scikit-Learn、Keras和TensorFlow 机器学习实战:基于Scikit-Learn、Keras和TensorFlow ...
Machine-Learning-From-Scratch常用机器学习的算法简洁实现
梁劲机器学习笔记-全面简单Getting Started With MachineLearning (all in one)_部分2。详细、明了地介绍了机器学习中的相关概念、数学知识和各种经典算法。以浅显易懂的方式去讲解它,降低大家的学习门槛。因为文件...
斯坦福机器学习编程作业machine-learning-ex1,Linear Regression,线性回归题目,满分,2015最新作业答案
Hands-on-Machine-Learning-with-Scikit-learn, Keras & Tensorflow英文书
Scikit-Learn与Tensorflow机器学习实用指南的英文影印版,高清可搜索,有书签。