故事背景

  在我们的日常生活中,人们已经习惯了看电影。但是,每个人的偏好是不同的,有的人可能喜欢战争片,有人可能更喜欢艺术片,而有的人则可能喜欢爱情片,等等。现在,我们收集了一些的客户和电影的相关信息,目的是找出客户对特定影片的评分,从而预测出客户有可能喜爱的电影并推荐给客户。本次的大数据处理,使用了单词统计、基于用户的协同过滤算法等。

分析预测技术

分析工具:基于Hadoop的MapReduce

数据预处理:利用单词统计将一部分重复的、无用的数据过滤掉

算法:基于用户的协同过滤算法

数据可视化:使用了echart的柱状图和平行坐标图

基于用户的协同过滤算法

  根据其他用户的观点产生对目标用户的推荐列表。即如果用户对一些项的评分比较相似,则他们对其他项的评分也相似。协同过滤推荐系统使用统计技术搜素目标用户的若干最近邻居,然后根基最近邻居对项的评分预测目标用户对未评分项的评分,选择预测评分最高的前若干项作为推荐结果反馈给用户

实现:

  • 收集可以代表用户兴趣的信息
  • 最近邻搜索,计算两个用户的相似度

    余弦相似度:用户i和用户j之间的相识度

            

  • 生成预测结果

    可以通过用户U与最近邻集合NBS中项目的评分得到

案例

根据电影的基本信息和用户对电影的评价来向用户推荐电影

收集数据:十万级的用户电影评分数据,来源于最新的MovieLens

http://www.datatang.com/data/44295/

根据movies.dat中的数据,通过单词统计,分析大众对不同种类电影的喜好

package org.bigdata.util;import java.io.IOException;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

public class classify {private static class classifyMapper extends Mapper<LongWritable,Text,Text,IntWritable>{@Overrideprotected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, IntWritable>.Context context)throws IOException, InterruptedException {String[] strs = value.toString().split("::");            String[] classes = strs[2].split("\\|");for(String str : classes){context.write(new Text(str),new IntWritable(1));}}}private static class classifyReducer extends Reducer<Text,IntWritable,Text,IntWritable>{@Overrideprotected void reduce(Text value, Iterable<IntWritable> datas,Reducer<Text, IntWritable, Text, IntWritable>.Context context) throws IOException, InterruptedException {int count = 0;for(IntWritable data : datas){count  = count + data.get();}context.write(value,new IntWritable(count));}}public static void main(String[] args) throws Exception{Configuration cfg = HadoopCfg.getCfg();Job job = Job.getInstance(cfg);job.setJobName("classify Count");job.setJarByClass(classify.class);job.setMapperClass(classifyMapper.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(IntWritable.class);job.setReducerClass(classifyReducer.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(IntWritable.class);FileInputFormat.addInputPath(job,new Path("/input/movies.dat"));FileOutputFormat.setOutputPath(job,new Path("/output/"));System.exit( job.waitForCompletion(true)?0:1);}
}

数据预处理:对ratings.dat中的数据j进行预处理,过滤出评分在4以上的数据

——>

package org.bigdata.util;import java.io.IOException;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.IntWritable;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;

public class favor {private static class favorMapper extends Mapper<LongWritable,Text,Text,IntWritable>{@Overrideprotected void map(LongWritable key, Text value, Mapper<LongWritable, Text, Text, IntWritable>.Context context)throws IOException, InterruptedException {String[] strs = value.toString().split(",");    //int mvote =  (Float.valueOf(strs[2])).intValue();int mvote =  (Float.valueOf(strs[2])).intValue();if(mvote >= 3){context.write(new Text(strs[1]+"\t"+strs[0]+"\t"+strs[2]),new IntWritable(1));}}}private static class favorReducer extends Reducer<Text,IntWritable,Text,IntWritable>{@Overrideprotected void reduce(Text value, Iterable<IntWritable> datas,Reducer<Text, IntWritable, Text, IntWritable>.Context context) throws IOException, InterruptedException {int count = 0;for(IntWritable data : datas){count  = count + data.get();}context.write(value,new IntWritable(count));}}public static void main(String[] args) throws Exception{Configuration cfg = HadoopCfg.getCfg();Job job = Job.getInstance(cfg);job.setJobName("favor Count");job.setJarByClass(favor.class);job.setMapperClass(favorMapper.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(IntWritable.class);job.setReducerClass(favorReducer.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(IntWritable.class);FileInputFormat.addInputPath(job,new Path("/select/"));FileOutputFormat.setOutputPath(job,new Path("/output/"));System.exit( job.waitForCompletion(true)?0:1);}
}

数据处理:对过滤后的数据使用基于用户的协同过滤算法进行预测分析

主函数:

package com;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.util.ToolRunner;public class UserCF {public static void main(String[] args) throws Exception {ToolRunner.run(new Configuration(), new UserCF1(), args); ToolRunner.run(new Configuration(), new UserCF2(), args); ToolRunner.run(new Configuration(), new UserCF3(), args); ToolRunner.run(new Configuration(), new UserCF4(), args); ToolRunner.run(new Configuration(), new UserCF5(), args); ToolRunner.run(new Configuration(), new UserCF6(), args);
    }
}

将评过相同电影的用户关联起来

package com;import java.io.IOException;
import java.util.ArrayList;
import java.util.List;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.bigdata.util.HadoopCfg;public class UserCF1 extends Configured implements Tool {public static class Mapper1 extendsMapper<LongWritable, Text, Text, Text> {public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException {
//            只获取文本中的用户编号、电影编号、评分String[] values = value.toString().split("\t");//电影编号作为Keycontext.write(new Text(values[1]), new Text(values[0]+"\t"+values[2]));}}public static class Reducer1 extendsReducer<Text, Text, Text, Text> {public void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {List<String> tmp_list = new ArrayList<String>();for(Text tmp:values){tmp_list.add(tmp.toString());}for(int i=0;i<tmp_list.size();i++){String []tmp1 =tmp_list.get(i).split("\t");int tmp11 = (Float.valueOf(tmp1[1])).intValue();int down1 = tmp11 * tmp11;for(int j=0;j<tmp_list.size();j++){String []tmp2 =tmp_list.get(j).split("\t");int tmp21 = (Float.valueOf(tmp2[1])).intValue();int up = tmp11 * tmp21;int down2 = tmp21 * tmp21;//评过同一电影的用户关联起来context.write(new Text(tmp1[0]+" "+tmp2[0]), new Text(up+" "+down1+" "+down2));}}}}@Overridepublic int run(String[] arg0) throws Exception {// TODO Auto-generated method stubConfiguration conf = HadoopCfg.getCfg();Job job = Job.getInstance(conf, "UserCF1");job.setJarByClass(UserCF1.class);job.setMapperClass(Mapper1.class);job.setReducerClass(Reducer1.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(Text.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);job.setInputFormatClass(TextInputFormat.class);job.setOutputFormatClass(TextOutputFormat.class);FileInputFormat.addInputPath(job, new Path("/userCF/train"));Path table_path = new Path("/userCF/tmp");FileSystem.get(conf).delete(table_path, true);FileOutputFormat.setOutputPath(job, table_path);job.waitForCompletion(true);return 0;}
}

余弦相似性算法

package com;import java.io.IOException;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.bigdata.util.HadoopCfg;public class UserCF2 extends Configured implements Tool {public static class Mapper2 extendsMapper<LongWritable, Text, Text, Text> {public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException {String[] values = value.toString().split("\t");String[] tmp = values[0].split(" ");    //用户context.write(new Text(tmp[0]+"\t"+tmp[1]), new Text(values[1]));}}public static class Reducer2 extendsReducer<Text, Text, Text, Text> {public void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {int up=0;int down1=0;int down2=0;float simi=0;for(Text tmp:values){String[] tmp_list = tmp.toString().split(" ");up=up+Integer.parseInt(tmp_list[0]);down1=down1+Integer.parseInt(tmp_list[1]);down2=down2+Integer.parseInt(tmp_list[2]);}//余弦相似性float down = (int)Math.sqrt(down1)*(int)Math.sqrt(down2);simi=up/down;context.write(key, new Text(simi+" si"));}}@Overridepublic int run(String[] arg0) throws Exception {// TODO Auto-generated method stubConfiguration conf = HadoopCfg.getCfg();Job job = Job.getInstance(conf, "UserCF2");job.setJarByClass(UserCF2.class);job.setMapperClass(Mapper2.class);job.setReducerClass(Reducer2.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(Text.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);job.setInputFormatClass(TextInputFormat.class);job.setOutputFormatClass(TextOutputFormat.class);FileInputFormat.addInputPath(job, new Path("/userBase/tmp"));Path table_path = new Path("/userBase/simi");FileSystem.get(conf).delete(table_path, true);FileOutputFormat.setOutputPath(job, table_path);job.waitForCompletion(true);return 0;}
}

将已评过电影的评分和用户相似度关联起来

package com;import java.io.IOException;
import java.util.ArrayList;
import java.util.List;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.bigdata.util.HadoopCfg;public class UserCF3 extends Configured implements Tool {public static class Mapper3 extendsMapper<LongWritable, Text, Text, Text> {public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException {String[] values = value.toString().split("\t");//用户1 用户2,相似度context.write(new Text(values[0]), new Text(values[1]+"\t"+values[2]));}}public static class Reducer3 extendsReducer<Text, Text, Text, Text> {public void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {List<String> user_list = new ArrayList<String>();List<String> item_list = new ArrayList<String>();for(Text tmp:values){String []tmp1=tmp.toString().split("\t");String []tmp2= tmp1[1].split(" ");//判断到底是哪个文件中的数据if(tmp2.length==2){user_list.add(tmp1[0]+"\t"+tmp2[0]);}else{item_list.add(tmp1[0]+"\t"+tmp2[0]);}}//将评分和相似度关联起来for(int i=0;i<user_list.size();i++){String []tmp1 = user_list.get(i).split("\t");for(int j=0;j<item_list.size();j++){String []tmp2 = item_list.get(j).split("\t");context.write(new Text(tmp1[0]+" "+tmp2[0]), new Text(tmp1[1]+" "+tmp2[1]));}}}}@Overridepublic int run(String[] arg0) throws Exception {// TODO Auto-generated method stubConfiguration conf = HadoopCfg.getCfg();Job job = Job.getInstance(conf, "UserCF1");job.setJarByClass(UserCF3.class);job.setMapperClass(Mapper3.class);job.setReducerClass(Reducer3.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(Text.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);job.setInputFormatClass(TextInputFormat.class);job.setOutputFormatClass(TextOutputFormat.class);FileInputFormat.addInputPath(job, new Path("/userCF/train"));FileInputFormat.addInputPath(job, new Path("/userCF/simi"));Path table_path = new Path("/userCF/tmp2");FileSystem.get(conf).delete(table_path, true);FileOutputFormat.setOutputPath(job, table_path);job.waitForCompletion(true);return 0;}
}

预测用户对所有电影的所有评分

package com;import java.io.IOException;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.bigdata.util.HadoopCfg;
//预测评分
public class UserCF4 extends Configured implements Tool {public static class Mapper4 extendsMapper<LongWritable, Text, Text, Text> {public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException {String[] values = value.toString().split("\t");String [] tmp = values[0].split(" ");context.write(new Text(tmp[0]+"\t"+tmp[1]), new Text(values[1]));}}public static class Reducer4 extendsReducer<Text, Text, Text, Text> {public void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {double up=0;double down=0;for(Text tmp:values){String []tmp1 = tmp.toString().split(" ");up = up + Double.parseDouble(tmp1[0])*Double.parseDouble(tmp1[1]);down = down +Math.abs(Double.parseDouble(tmp1[0]));} double score = up/down;context.write(key, new Text(score+""));}}@Overridepublic int run(String[] arg0) throws Exception {// TODO Auto-generated method stubConfiguration conf = HadoopCfg.getCfg();Job job = Job.getInstance(conf, "UserCF2");job.setJarByClass(UserCF4.class);job.setMapperClass(Mapper4.class);job.setReducerClass(Reducer4.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(Text.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);job.setInputFormatClass(TextInputFormat.class);job.setOutputFormatClass(TextOutputFormat.class);FileInputFormat.addInputPath(job, new Path("/userCF/tmp2"));Path table_path = new Path("/userCF/score");FileSystem.get(conf).delete(table_path, true);FileOutputFormat.setOutputPath(job, table_path);job.waitForCompletion(true);return 0;}
}

检测实际用户的评分与预测的偏差

package com;import java.io.IOException;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.bigdata.util.HadoopCfg;public class UserCF5 extends Configured implements Tool {public static class Mapper5 extendsMapper<LongWritable, Text, Text, Text> {public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException {String[] values = value.toString().split("\t");context.write(new Text(values[0]+"\t"+values[1]), new Text(values[2]));}}public static class Reducer5 extendsReducer<Text, Text, Text, Text> {public void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {int i=0;double tmp1=0,tmp2=0;for(Text tmp:values){   if(i==0){tmp1=Double.parseDouble(tmp.toString());}else{tmp2=Double.parseDouble(tmp.toString());}i++;} if(i==2){context.write(new Text("mae"), new Text(Math.abs(tmp1-tmp2)+""));}}}@Overridepublic int run(String[] arg0) throws Exception {// TODO Auto-generated method stubConfiguration conf = HadoopCfg.getCfg();Job job = Job.getInstance(conf, "UserCF5");job.setJarByClass(UserCF5.class);job.setMapperClass(Mapper5.class);job.setReducerClass(Reducer5.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(Text.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);job.setInputFormatClass(TextInputFormat.class);job.setOutputFormatClass(TextOutputFormat.class);FileInputFormat.addInputPath(job, new Path("/userCF/score/part-r-00000"));FileInputFormat.addInputPath(job, new Path("/userCF/test"));Path table_path = new Path("/userCF/tmp3");FileSystem.get(conf).delete(table_path, true);FileOutputFormat.setOutputPath(job, table_path);job.waitForCompletion(true);return 0;}
}

package com;import java.io.IOException;import org.apache.hadoop.conf.Configuration;
import org.apache.hadoop.conf.Configured;
import org.apache.hadoop.fs.FileSystem;
import org.apache.hadoop.fs.Path;
import org.apache.hadoop.io.LongWritable;
import org.apache.hadoop.io.Text;
import org.apache.hadoop.mapreduce.Job;
import org.apache.hadoop.mapreduce.Mapper;
import org.apache.hadoop.mapreduce.Reducer;
import org.apache.hadoop.mapreduce.lib.input.FileInputFormat;
import org.apache.hadoop.mapreduce.lib.input.TextInputFormat;
import org.apache.hadoop.mapreduce.lib.output.FileOutputFormat;
import org.apache.hadoop.mapreduce.lib.output.TextOutputFormat;
import org.apache.hadoop.util.Tool;
import org.bigdata.util.HadoopCfg;public class UserCF6 extends Configured implements Tool {public static class Mapper6 extendsMapper<LongWritable, Text, Text, Text> {public void map(LongWritable key, Text value, Context context)throws IOException, InterruptedException {String[] values = value.toString().split("\t");context.write(new Text(values[0]), new Text(values[1]));}}public static class Reducer6 extendsReducer<Text, Text, Text, Text> {public void reduce(Text key, Iterable<Text> values, Context context)throws IOException, InterruptedException {int num=0;double sum=0;for(Text tmp:values){   sum=sum + Double.parseDouble(tmp.toString());num = num +1;}     context.write(new Text("mae"), new Text(sum/num+""));}}@Overridepublic int run(String[] arg0) throws Exception {// TODO Auto-generated method stubConfiguration conf = HadoopCfg.getCfg();Job job = Job.getInstance(conf, "UserCF2");job.setJarByClass(UserCF6.class);job.setMapperClass(Mapper6.class);job.setReducerClass(Reducer6.class);job.setMapOutputKeyClass(Text.class);job.setMapOutputValueClass(Text.class);job.setOutputKeyClass(Text.class);job.setOutputValueClass(Text.class);job.setInputFormatClass(TextInputFormat.class);job.setOutputFormatClass(TextOutputFormat.class);FileInputFormat.addInputPath(job, new Path("/userCF/tmp3"));Path table_path = new Path("/userCF/MAE");FileSystem.get(conf).delete(table_path, true);FileOutputFormat.setOutputPath(job, table_path);job.waitForCompletion(true);return 0;}
}

数据可视化:将结果转为json数据,通过echart中的柱状图和平行坐标图数据可视化

http://echarts.baidu.com/demo.html#mix-zoom-on-value

http://echarts.baidu.com/demo.html#parallel-aqi

结论与启示

  • 通过Hadoop的MapReduce的基于用户的协同过滤算法对数据进行了分析预测

  • 通过柱状图可以知道大众对喜剧片、动作片、爱情片更为喜爱

  • 通过平行坐标图可以得知人们通过电影的评分可以关联起来,通过数据分析推荐可以更为快捷地找到自己喜欢的影片

  • 我们正处于大数据的时代,通过分析预测,我们将更加了解自己及需求

问题

在本次的数据处理过程中,由于数据有些庞大,在处理的过程中,产生了大量的中间文件,将Hadoop中的存储空间占了很大一部分导致不能正常运行完成。(为什么这么说呢?如果一个人评价了10000部影片,那么只要看过其中一部影片的用户就会和这位用户产生关联,就要计算他没看过的其他的所有影片的可能的评价,这样用户越多电影越多就会发生数据大爆炸)

通过网上查找资料,占据的内存太多,几乎没有空余的空间存储。需要采用Hadoop的datanode多磁盘空间处理,增加磁盘,通过hdfs-site.xml中的dfs.datanode.data.dir配置项通过分号分割将新添加的磁盘添加到datanode中。

http://www.makaidong.com/%E5%8D%9A%E5%AE%A2%E5%9B%AD%E6%8E%92%E8%A1%8C/20013.shtml

http://www.zhihu.com/question/19985195

  

转载于:https://www.cnblogs.com/sker/p/5605006.html

基于用户电影评价的分析预测相关推荐

  1. 基于用户标签的活跃人群特征分析_基于用户行为模型的客流量分析与预测

    基于用户行为模型的客流量分析与预测① 程求江 1,2, 彭艳兵 2 [摘 要] 摘 要:为了预测无线城市接入中商圈的短时客流量 , 通过分析顾客 购物行为模式 , 提出了一种基于停留时间和区间活跃度的 ...

  2. 网站数据分析:基于用户细分的比较分析

    从网站的用户层面,我们根据用户访问的行为特征将用户细分成各种类型,因为用户行为各异,行为统计指标各异,分析的角度各异,所以如果要对用户做细 分,可以从很多角度根据各种规则实现各种不同的分类,看到过有些 ...

  3. 基于Qt实现的股票分析预测软件,实现外排序功能,创建索引,加快数据获取,根据股票的年月和代码进行k线图展示,热力图展示,相关系数计算,最后价格预测和股票价格曲线展示。

    资源下载地址 https://download.csdn.net/download/qq_40335674/87857061 基于Qt实现的股票分析预测软件,实现外排序功能,程序加载数据内存限制不超过 ...

  4. python实现豆瓣电影评价感情分析

    先上图:(资源链接蓝奏云:https://zyjblogs.lanzous.com/iGjjfe2jyaj) 1.词云图 2.评价星级饼图 3.简报(好评率,最好评价,最差评价) 最好评价:很好看的! ...

  5. 基于不平衡数据集的中风分析预测

    摘要:近些年来随着社会人口老龄化及城镇化步伐进一步加快,城市居民不太健康的生活形式盛 行,心脑血管病症的凶险要素明显增多,我国中风的患病率具有明显增长.然而中风的诱使因素 多,临床诊断复杂,且尚未有有 ...

  6. 基于 LSTM 电影评论情感分析

    0.前言 RNN网络因为使用了单词的序列信息,所以准确率要比前向传递神经网络要高. 网络结构: 首先,将单词传入 embedding层,之所以使用嵌入层,是因为单词数量太多,使用嵌入式词向量来表示单词 ...

  7. python协同过滤电影推荐_python实现基于用户的协同过滤算法(CF)——以电影评价数据(ml-100k)为例...

    程序简介 项目以ml-100k电影评分数据集为输入,实现了基于用户的协同过滤算法,最后预测的MAE为0.84,因为经过优化,10万条评分数据运行时间不超过2分钟 协同过滤算法(CF)基于对用户历史行为 ...

  8. 朴素贝叶斯算法实现 豆瓣Top250电影评价的情感分析与预测。​

    前言 本文使用朴素贝叶斯算法实现 豆瓣Top250电影评价的情感分析与预测. 最近在学习自然语言正负面情感的处理问题,但是绝大部分能搜索到的实践都是Kggle上IMDB影评的情感分析. 所以在这里我就 ...

  9. 【大数据分析专业毕设之基于python爬虫的电影票房大数据预测分析+大屏可视化分析

    [大数据分析专业毕设之基于python爬虫的电影票房大数据预测分析+大屏可视化分析-哔哩哔哩https://b23.tv/saIKtBH flask web框架,数据使用requests模块爬取数据, ...

最新文章

  1. apk源码查看工具_如何查看Linux命令工具的源码?
  2. 关于java中nextline读取空白行的问题
  3. java输出一副扑克牌_JAVA编一副扑克牌
  4. 苹果CMS10|粉色视频站模版|YMYS007|魅力社
  5. Activiti工作流(三)——流程变量
  6. 粘包问题以及解决方法
  7. java swing 列表框_Java开发笔记(一百三十一)Swing的列表框
  8. mssql数据库基本语句总结(2)
  9. 物业费管理系统c语言作业,c语言物业管理系统.doc
  10. matlab峰值提取,如何从MATLAB中的自相关数据中提取峰值?
  11. OSEK network management
  12. silvaco超晶格仿真学习笔记
  13. linux防火墙查看状态firewall、iptable
  14. Android ORC文字识别之识别身份证号等(附源码)
  15. TF学习——TF之TensorFlow Slim:TensorFlow Slim的简介、安装、使用方法之详细攻略
  16. 组件的文件跟组件清单中的验证信息不匹配
  17. 解决百度ueditor富文本编辑器不能插入视频的问题/src掉链/src清空,不能显示视频
  18. java计算机毕业设计H5女娲宫旅游网站设计与实现MyBatis+系统+LW文档+源码+调试部署
  19. [sensorhub]MT6752/32平台sensor hub KK和L版本配置方法
  20. uniapp H5 百度统计

热门文章

  1. 为什么游戏模型不如原画好看?
  2. java jmf播放视频_使用JMF实现java视频播放器
  3. 【软件测试技术期末复习选择题】
  4. 201809 CCF
  5. R语言绘制山脊图 ggridge,如何给每个山脊添加自定义垂直线?
  6. c语言fgetc函数作用,C语言fputc()和fgetc()函数
  7. 开机提示:one of your disks needs to be checked解决方法
  8. 虚拟机Linux忘记root密码的解决办法
  9. 关于 Macbook 外接显示器模糊问题
  10. Maya---骨骼的创建