自定义博客皮肤VIP专享

*博客头图:

格式为PNG、JPG,宽度*高度大于1920*100像素,不超过2MB,主视觉建议放在右侧,请参照线上博客头图

请上传大于1920*100像素的图片!

博客底图:

图片格式为PNG、JPG,不超过1MB,可上下左右平铺至整个背景

栏目图:

图片格式为PNG、JPG,图片宽度*高度为300*38像素,不超过0.5MB

主标题颜色:

RGB颜色,例如:#AFAFAF

Hover:

RGB颜色,例如:#AFAFAF

副标题颜色:

RGB颜色,例如:#AFAFAF

自定义博客皮肤

-+
  • 博客(88)
  • 收藏
  • 关注

原创 Spark SQL 实现 group_concat

Spark SQL 实现 group_concat环境:Spark 2.0.1 以下貌似需要至少Spark 1.6支持,未实测(网友yanshichuan1反馈spark 1.5.1同样支持,感谢)表结构及内容:+-------+---+| name|age|+-------+---+|Michael| 29|| Andy| 30|| Justin| 19|| Justin| ...

2018-07-11 02:09:47 3406

转载 DataFrame 的函数

DataFrame 的函数Action 操作1、 collect() ,返回值是一个数组,返回dataframe集合所有的行2、 collectAsList() 返回值是一个Java类型的数组,返回dataframe集合所有的行3、 count() 返回一个number类型的,返回dataframe集合的行数4、 describe(cols: String*) 返回一个通过数学计算的类表值(cou...

2018-07-11 01:54:43 2706

转载 spark 实现列转行

1、列转行行转列和列转行是我们常用的功能,假如我们有如下的csv文件:+---+----+---------+|id |name|address |+---+----+---------+|1 |a |add1,add2||2 |b |add3 ||3 |c |add4 ||4 |d |add5 |+---+----+--------...

2018-07-11 01:34:29 5392

转载 scala dataframe udf 函数总结

工作中需要对dataframe 写出非常复杂的处理函数使用udf 对单个函数进行处理,使之可以对整列数据进行处理。示例一: 对两列数据求cos(x,y)这个是实际应用的代码两个问题1.dataframe 里面的数据是vector格式的,进行处理需要处理成Array格式的2.对dataframe 进行两列处理,需要用UDF处理,udf函数的输入是两个同类型列def cosineDistence(ve...

2018-07-10 23:10:23 4682

转载 【Scikit-Learn 中文文档】无监督学习: 寻求数据表示 - 关于科学数据处理的统计学习教程 - scikit-learn 教程 | ApacheCN

无监督学习: 寻求数据表示聚类: 对样本数据进行分组可以利用聚类解决的问题对于 iris 数据集来说,我们知道所有样本有 3 种不同的类型,但是并不知道每一个样本是那种类型:此时我们可以尝试一个 clustering task(聚类任务) 聚类算法: 将样本进行分组,相似的样本被聚在一起,而不同组别之间的样本是有明显区别的,这样的分组方式就是 clusters(聚类

2017-12-06 20:48:06 519

转载 【Scikit-Learn 中文文档】模型选择:选择估计量及其参数 - 关于科学数据处理的统计学习教程 - scikit-learn 教程 | ApacheCN

模型选择:选择估计量及其参数分数和交叉验证分数如我们所见,每一个估计量都有一个可以在新数据上判定拟合质量(或预期值)的 score 方法。越大越好.>>>>>> from sklearn import datasets, svm>>> digits = datasets.load_digits()>>> X_digits = digits.data>>> y_

2017-12-06 20:44:03 350

转载 【Scikit-Learn 中文文档】监督学习:从高维观察预测输出变量 - 关于科学数据处理的统计学习教程 - scikit-learn 教程 | ApacheCN

监督学习:从高维观察预测输出变量监督学习解决的问题监督学习 在于学习两个数据集的联系:观察数据 X 和我们正在尝试预测的额外变量 y (通常称“目标”或“标签”), 而且通常是长度为 n_samples 的一维数组。scikit-learn 中所有监督的 估计量  都有一个用来拟合模型的 fit(X, y) 方法,和根据给定的没有标签观察值 X 返回预测的带标签的 

2017-12-06 17:40:02 493

转载 【Scikit-Learn 中文文档】机器学习: scikit-learn 中的设置以及预估对象 - 关于科学数据处理的统计学习教程 - scikit-learn 教程 | ApacheCN

机器学习: scikit-learn 中的设置以及预估对象数据集Scikit-learn可以从一个或者多个数据集中学习信息,这些数据集合可表示为2维阵列,也可认为是一个列表。列表的第一个维度代表 样本 ,第二个维度代表 特征 (每一行代表一个样本,每一列代表一种特征)。样例: iris 数据集(鸢尾花卉数据集)>>>>>> from sklearn im

2017-12-06 17:36:05 613

转载 【Scikit-Learn 中文文档】使用 scikit-learn 介绍机器学习 - scikit-learn 教程 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/tutorial/basic/tutorial.html英文文档: http://sklearn.apachecn.org/en/stable/tutorial/basic/tutorial.html官方文档: http://scikit-lear

2017-12-06 17:32:26 416

转载 【Scikit-Learn 中文文档】预测延迟 / 预测吞吐量 / 技巧和窍门 - 计算性能 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/computational_performance.html英文文档: http://sklearn.apachecn.org/en/stable/modules/computational_performance.html官方文档

2017-12-06 17:31:35 447

转载 【Scikit-Learn 中文文档】大规模计算的策略: 更大量的数据 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/user_guide.html英文文档: http://sklearn.apachecn.org/en/stable/user_guide.html官方文档: http://scikit-learn.org/stable/GitHub:

2017-12-06 17:30:29 448

转载 【Scikit-Learn 中文文档】数据集加载工具 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/datasets/index.html英文文档: http://sklearn.apachecn.org/en/stable/datasets/index.html官方文档: http://scikit-learn.org/stable/

2017-12-06 17:29:41 567

转载 【Scikit-Learn 中文文档】预测目标 (y) 的转换 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/preprocessing_targets.html英文文档: http://sklearn.apachecn.org/en/stable/modules/preprocessing_targets.html官方文档: http:/

2017-12-06 17:28:29 217

转载 【Scikit-Learn 中文文档】内核近似 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/kernel_approximation.html英文文档: http://sklearn.apachecn.org/en/stable/modules/kernel_approximation.html官方文档: http://s

2017-12-06 17:27:18 410

转载 【Scikit-Learn 中文文档】随机投影 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/random_projection.html英文文档: http://sklearn.apachecn.org/en/stable/modules/random_projection.html官方文档: http://scikit-

2017-12-04 01:38:12 484

转载 【Scikit-Learn 中文文档】无监督降维 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/unsupervised_reduction.html英文文档: http://sklearn.apachecn.org/en/stable/modules/unsupervised_reduction.html官方文档: http

2017-12-04 01:36:53 257

转载 【Scikit-Learn 中文文档】预处理数据 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/preprocessing.html英文文档: http://sklearn.apachecn.org/en/stable/modules/preprocessing.html官方文档: http://scikit-learn.or

2017-12-04 01:35:54 256

转载 【Scikit-Learn 中文文档】特征提取 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/feature_extraction.html英文文档: http://sklearn.apachecn.org/en/stable/modules/feature_extraction.html官方文档: http://sciki

2017-12-04 01:33:41 729

转载 【Scikit-Learn 中文文档】Pipeline(管道)和 FeatureUnion(特征联合): 合并的评估器 - 数据集转换 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/pipeline.html英文文档: http://sklearn.apachecn.org/en/stable/modules/pipeline.html官方文档: http://scikit-learn.org/stable/

2017-12-04 01:31:55 283

转载 【Scikit-Learn 中文文档】模型持久化 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/model_persistence.html英文文档: http://sklearn.apachecn.org/en/stable/modules/model_persistence.html官方文档: http://scikit-

2017-12-04 01:30:54 231

转载 【Scikit-Learn 中文文档】模型评估: 量化预测的质量 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/model_evaluation.html英文文档: http://sklearn.apachecn.org/en/stable/modules/model_evaluation.html官方文档: http://scikit-le

2017-12-04 01:29:51 475

转载 【Scikit-Learn 中文文档】验证曲线: 绘制分数以评估模型 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/learning_curve.html英文文档: http://sklearn.apachecn.org/en/stable/modules/learning_curve.html官方文档: http://scikit-learn.

2017-12-04 01:28:19 467

转载 【Scikit-Learn 中文文档】模型持久化 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/model_persistence.html英文文档: http://sklearn.apachecn.org/en/stable/modules/model_persistence.html官方文档: http://scikit-

2017-12-04 01:27:29 192

转载 【Scikit-Learn 中文文档】模型评估: 量化预测的质量 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/model_evaluation.html英文文档: http://sklearn.apachecn.org/en/stable/modules/model_evaluation.html官方文档: http://scikit-le

2017-12-04 01:25:58 430

转载 【Scikit-Learn 中文文档】优化估计器的超参数 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/grid_search.html英文文档: http://sklearn.apachecn.org/en/stable/modules/grid_search.html官方文档: http://scikit-learn.org/st

2017-12-03 20:48:05 273

转载 【Scikit-Learn 中文文档】交叉验证 - 模型选择和评估 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/cross_validation.html英文文档: http://sklearn.apachecn.org/en/stable/modules/cross_validation.html官方文档: http://scikit-le

2017-12-03 20:46:54 329

转载 【Scikit-Learn 中文文档】神经网络模型(无监督)- 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/neural_networks_unsupervised.html英文文档: http://sklearn.apachecn.org/en/stable/modules/neural_networks_unsupervised.html

2017-12-03 20:45:23 2656

转载 【Scikit-Learn 中文文档】密度估计 - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/density.html英文文档: http://sklearn.apachecn.org/cn/stable/modules/density.html官方文档: http://scikit-learn.org/stable/

2017-12-03 20:43:53 232

转载 【Scikit-Learn 中文文档】新异类和异常值检测 - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/outlier_detection.html英文文档: http://sklearn.apachecn.org/en/stable/modules/outlier_detection.html官方文档: http://scikit-

2017-12-03 20:42:43 342

转载 【Scikit-Learn 中文文档】协方差估计 / 经验协方差 / 收敛协方差 / 稀疏逆协方差 / Robust 协方差估计 - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/covariance.html英文文档: http://sklearn.apachecn.org/en/stable/modules/covariance.html官方文档: http://scikit-learn.org/stab

2017-12-03 20:41:10 3958

转载 【Scikit-Learn 中文文档】分解成分中的信号(矩阵分解问题) - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/decomposition.html英文文档: http://sklearn.apachecn.org/en/stable/modules/decomposition.html官方文档: http://scikit-learn.or

2017-12-03 20:40:20 308

转载 【Scikit-Learn 中文文档】双聚类 - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/biclustering.html英文文档: http://sklearn.apachecn.org/en/stable/modules/biclustering.html官方文档: http://scikit-learn.org/

2017-12-03 20:39:15 208

转载 【Scikit-Learn 中文文档】聚类 - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/clustering.html英文文档: http://sklearn.apachecn.org/en/stable/modules/clustering.html官方文档: http://scikit-learn.org/stab

2017-12-03 20:37:48 481

转载 【Scikit-Learn 中文文档】流形学习 - 监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/manifold.html英文文档: http://sklearn.apachecn.org/en/stable/modules/manifold.html官方文档: http://scikit-learn.org/stable/

2017-12-03 20:36:22 366

转载 【Scikit-Learn 中文文档】高斯混合模型 - 无监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/mixture.html英文文档: http://sklearn.apachecn.org/en/stable/modules/mixture.html官方文档: http://scikit-learn.org/stable/

2017-11-29 23:26:38 1141

转载 【Scikit-Learn 中文文档】神经网络模块(监督的)- 监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/0.19.0/modules/neural_networks_supervised.html英文文档: http://sklearn.apachecn.org/en/0.19.0/modules/neural_networks_supervised.html官方

2017-11-29 23:25:25 250

转载 【Scikit-Learn 中文文档】概率校准 - 监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/0.19.0/modules/calibration.html英文文档: http://sklearn.apachecn.org/en/0.19.0/modules/calibration.html官方文档: http://scikit-learn.org/st

2017-11-29 23:24:25 235

转载 【Scikit-Learn 中文文档】半监督学习 - 监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/label_propagation.html英文文档: http://sklearn.apachecn.org/en/stable/modules/label_propagation.html官方文档: http://scikit-

2017-11-29 23:23:02 236

转载 【Scikit-Learn 中文文档】特征选择 - 监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/feature_selection.html英文文档: http://sklearn.apachecn.org/en/stable/modules/feature_selection.html官方文档: http://scikit-

2017-11-29 23:22:06 192

转载 【Scikit-Learn 中文文档】多类和多标签算法 - 监督学习 - 用户指南 | ApacheCN

中文文档: http://sklearn.apachecn.org/cn/stable/modules/multiclass.html英文文档: http://sklearn.apachecn.org/en/stable/modules/multiclass.html官方文档: http://scikit-learn.org/stable/

2017-11-29 23:21:11 619

空空如也

空空如也

TA创建的收藏夹 TA关注的收藏夹

TA关注的人

提示
确定要删除当前文章?
取消 删除