it1002
BigData
、Jamson
微信:anything_studio
展开
-
Spark基于ALS推荐算法实现商品推荐实战Demo(Java版/Scala版)
Spark基于ALS推荐算法实现商品推荐实战Demo(Java版/Scala版) 一、数据集准备 1,1,5 1,2,3.5 1,4,1.2 1,6,0 2,1,4.5 2,2,3.6 2,3,4.9 3,3,5.0 3,4,2.0 3,5,5.0 3,6,1.9 4,2,3.3 4,5,4.6 4,6,0 5,2,2.5 5,3,4.2 5,4,3.7 二、代码部分 Java版本 ALSRe...原创 2018-12-18 13:41:48 · 4945 阅读 · 1 评论 -
Spark基于LogisticRegression逻辑回归实现英文垃圾邮件分类(Java版/Scala版)
Spark基于LogisticRegression逻辑回归实现英文垃圾邮件分类(Java版/Scala版) 中英文邮件分词有所不同,若需要中文垃圾邮件分类请移步我上一篇博客Spark基于NaiveBayes朴素贝叶斯算法实现中文垃圾邮件分类实战(Java / Scala) 此次测试的数据集大概格式如下: spam You'll not rcv any more msgs from the chat...原创 2018-12-17 23:43:17 · 1554 阅读 · 0 评论 -
Spark基于NaiveBayes朴素贝叶斯算法实现中文垃圾邮件分类实战(Java + Scala)
Spark基于NaiveBayes朴素贝叶斯算法实现中文垃圾邮件分类实战(Java + Scala) 网上很少能找到Spark millib系列算法对纯中文垃圾邮件分类的demo,此Demo做了Java + Scala的混合调用,若迫切需要Java版本的可私信,有时间的时候我会写一个纯Java版本的。 主要分为以下几个过程: 一、数据集下载 数据集来源于网络,具体地址我忘记了,所以分享在网盘,自...原创 2018-12-15 13:04:23 · 3336 阅读 · 2 评论 -
spark NaiveBayes朴素贝叶斯分类算法入门demo(Java版/Scala版)
spark NaiveBayes朴素贝叶斯分类算法入门demo(Java版/Scala版) 一、Java版 BayesJava.java package top.it1002.spark.ml; import org.apache.spark.SparkConf; import org.apache.spark.SparkContext; import org.apache.spark.ap...原创 2018-12-13 17:42:09 · 812 阅读 · 1 评论 -
spark Logistic回归算法入门demo(Java版/Scala版)
spark Logistic回归算法入门demo(Java版/Scala版) 一、Java版 LogisticRegressionWithSGDJava.java package top.it1002.spark.ml; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaRDD; import o...原创 2018-12-13 13:27:50 · 1255 阅读 · 0 评论 -
Spark KMeans算法入门Demo(Java版/Scala版)
Spark KMeans算法入门Demo(Java版/Scala版) 一、Java版本 KmeansJavaDemo.java package top.it1002.spark.ml; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaRDD; import org.apache.spark.api...原创 2018-12-12 22:30:09 · 2079 阅读 · 1 评论 -
SparkSQL随机DataFrame/DataSet数据源query查询用户数据(Java版/Scala版)
SparkSQL随机DataFrame/DataSet数据源query查询用户数据(Java版/Scala版) SparkSQL入门小demo,主要操作是构造DataFrame/Dataset,以及通过它们去执行Sql 一、以下为Java版本的Demo Java版本(DataSourceJava.java、App.java) DataSourceJava.java package top.it10...原创 2018-12-11 22:19:51 · 733 阅读 · 0 评论 -
Spark系列之Scala/Java版Streaming-netcat-WordCount
Spark系列之Scala/Java版Streaming-netcat-WordCount 一、引入maven依赖: <?xml version="1.0" encoding="UTF-8"?> <project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:x原创 2018-12-09 22:11:02 · 285 阅读 · 0 评论 -
Spark系列之Scala版WordCount
Spark系列之Scala版WordCount 该教程思路与我之前写的Java版本WordCount思路一样,但是对比起来,Scala的代码简洁很多,毕竟Spark是Scala语言写出来,而Scala又是Java的再封装化的脚本语言,所以自然会节省很多代码,具体还有很多知识点,需要我们慢慢去学习 还是直接上代码,有不足的地方望谅解 主要写了两种词频形式 package top.it1002.s...原创 2018-12-01 19:29:58 · 1018 阅读 · 0 评论 -
Spark系列之Java版WordCount
Spark系列之Java版WordCount 这几天开始入门spark,代码方面写的不好望谅解 本来想用java的lambda表达式写简略一点的,但是初期也不是很懂,慢慢改进 package top.it1002.scala.wordcount; import org.apache.spark.SparkConf; import org.apache.spark.api.java.JavaPai...原创 2018-12-01 18:09:08 · 606 阅读 · 0 评论