[{"data":1,"prerenderedAt":4488},["ShallowReactive",2],{"blog-taxonomies":3,"blog-stats":507,"post-分布式处理与计算\u002F分布式处理与计算spark系统与scala语言":1083},[4,11,16,21,25,29,36,39,44,47,52,58,63,66,71,76,80,84,87,93,96,101,105,110,113,117,122,127,132,136,141,143,146,151,155,157,162,165,169,173,176,179,183,186,190,193,197,200,205,208,211,214,219,222,228,234,237,239,245,249,253,256,260,266,271,276,281,283,287,290,293,298,301,304,306,308,311,314,316,318,321,327,332,337,342,347,352,354,356,358,361,365,367,369,371,374,376,378,381,386,390,393,396,400,404,407,411,413,415,417,421,423,425,428,431,433,435,437,439,441,443,446,448,450,454,456,459,461,463,465,467,469,471,473,477,483,486,488,491,493,495,497,499,501,503,505],{"category":5,"tags":6},"笔记",[7,8,9,10],"QQ","插件","LiteLoader","美化",{"category":12,"tags":13},"其他",[14,15,10],"博客","IP签名",{"category":17,"tags":18},"杂谈",[19,20],"互联网","观点",{"category":5,"tags":22},[14,23,24],"GitHub","数据可视化",{"category":5,"tags":26},[14,27,28],"访问统计","不蒜子",{"category":30,"tags":31},"工具",[32,33,34,35],"Python","爬虫","选课脚本","广州大学",{"category":5,"tags":37},[38,5],"数学分析",{"category":40,"tags":41},"算法",[42,40,43],"数据结构","线性表",{"category":40,"tags":45},[42,46],"复习",{"category":5,"tags":48},[49,50,51],"高等代数","线性代数","知识点",{"category":5,"tags":53},[14,54,55,56,57],"Typora","PicGo","图床","Markdown",{"category":30,"tags":59},[60,61,62],"Jupyter","工具配置","中文",{"category":30,"tags":64},[65,61,10],"VSCode",{"category":30,"tags":67},[68,69,70,35],"路由器","OpenWrt","校园网",{"category":12,"tags":72},[73,74,75],"网络协议","Wireshark","DEVP2P",{"category":5,"tags":77},[73,74,78,79],"Lua","解码器",{"category":5,"tags":81},[82,5,83],"常微分方程","数学",{"category":5,"tags":85},[86,5,83],"概率论",{"category":30,"tags":88},[89,90,91,92],"Docker","WSL","Windows","磁盘清理",{"category":30,"tags":94},[32,33,95,35],"课程表",{"category":5,"tags":97},[14,98,99,100],"Hexo","Gitalk","评论系统",{"category":5,"tags":102},[14,103,98,104],"Obsidian","写作工具",{"category":12,"tags":106},[107,108,109],"课题研究","泊松分布","参数估计",{"category":12,"tags":111},[107,108,109,112],"组会",{"category":12,"tags":114},[109,115,108,116],"IM模型","统计学",{"category":17,"tags":118},[119,120,121],"软考","网络规划","信息系统项目管理",{"category":30,"tags":123},[124,125,126],"Arch Linux","AppImage","Linux",{"category":5,"tags":128},[129,130,131],"编程语言","计算机科学","内存管理",{"category":5,"tags":133},[134,135],"Canvas","前端",{"category":5,"tags":137},[14,138,139,140],"GitHub Actions","Vite","部署",{"category":5,"tags":142},[135],{"category":5,"tags":144},[135,145],"系统设计",{"category":5,"tags":147},[135,148,149,150],"安全","XSS","CSRF",{"category":152,"tags":153},"项目",[134,154],"PixiJS",{"category":152,"tags":156},null,{"category":40,"tags":158},[42,159,160,161],"栈","队列","JavaScript",{"category":40,"tags":163},[42,164,161],"哈希表",{"category":5,"tags":166},[167,161,168],"ES6","Set",{"category":40,"tags":170},[40,171,172],"动态规划","背包问题",{"category":40,"tags":174},[40,175],"滑动窗口",{"category":40,"tags":177},[42,178,161],"链表",{"category":40,"tags":180},[40,181,161,182],"ACM","面试",{"category":40,"tags":184},[40,161,185],"数据类型转换",{"category":40,"tags":187},[42,188,178,189],"顺序表","TypeScript",{"category":5,"tags":191},[135,154,134,192],"渲染",{"category":5,"tags":194},[135,195,134,196],"富文本编辑","wangEditor",{"category":40,"tags":198},[199,40,178],"力扣",{"category":5,"tags":201},[202,203,204,91],"DNS","加密","网络安全",{"category":5,"tags":206},[135,207],"Axios",{"category":5,"tags":209},[135,207,189,210],"接口封装",{"category":5,"tags":212},[135,213,145],"JWT",{"category":152,"tags":215},[134,216,217,154,218],"画布","React","项目开发",{"category":17,"tags":220},[221],"日志",{"category":5,"tags":223},[224,225,226,227],"Neo4j","图数据库","中心度分析","PageRank",{"category":12,"tags":229},[230,231,232,233],"论文","机器学习","随机森林","保险欺诈",{"category":5,"tags":235},[236],"人工智能",{"category":5,"tags":238},[231,40,32],{"category":12,"tags":240},[241,242,243,244],"共识算法","最长链","区块链","算法设计",{"category":5,"tags":246},[161,247,248,135],"闭包","作用域",{"category":5,"tags":250},[14,138,251,252],"RSS","自动化",{"category":30,"tags":254},[89,90,91,255],"安装",{"category":30,"tags":257},[258,91,259],"MSYS2","开发环境",{"category":5,"tags":261},[262,263,264,265],"团队协作","Git","Commit规范","代码审查",{"category":30,"tags":267},[268,269,270],"oh-my-posh","终端美化","CLI",{"category":5,"tags":272},[273,274,275],"上下文工程","Agent","RAG",{"category":5,"tags":277},[278,279,280],"前端工程化","技术选型","工程基建",{"category":5,"tags":282},[275],{"category":5,"tags":284},[285,286],"SDD","规格驱动开发",{"category":5,"tags":288},[289],"neovim",{"category":5,"tags":291},[292],"技术写作",{"category":5,"tags":294},[295,32,296,89,297],"FastAPI","后端","工程实践",{"category":152,"tags":299},[274,300],"Harness Engineering",{"category":5,"tags":302},[303],"RFC",{"category":152,"tags":305},[274,300,275],{"category":152,"tags":307},[274],{"category":40,"tags":309},[199,40,161,310],"两数之和",{"category":40,"tags":312},[199,40,161,313],"双指针",{"category":40,"tags":315},[199,40,161,178],{"category":40,"tags":317},[199,40,161,175],{"category":40,"tags":319},[199,40,161,320],"回溯",{"category":5,"tags":322},[323,324,325,326],"分布式处理与计算","Spark","Scala","RDD",{"category":5,"tags":328},[323,329,330,331],"线性回归","逻辑回归","监督学习",{"category":5,"tags":333},[323,334,335,336],"数值优化","牛顿法","收敛性",{"category":5,"tags":338},[323,339,340,341],"PCA","数据降维","正则化",{"category":5,"tags":343},[323,344,345,346],"聚类","层次聚类","K-Means",{"category":5,"tags":348},[323,349,350,351],"随机模拟","统计推断","EM算法",{"category":5,"tags":353},[24],{"category":5,"tags":355},[24],{"category":5,"tags":357},[24],{"category":40,"tags":359},[42,360],"图论",{"category":40,"tags":362},[42,363,364],"树","二叉树",{"category":40,"tags":366},[42,160],{"category":40,"tags":368},[42],{"category":40,"tags":370},[42,159],{"category":40,"tags":372},[42,40,373],"复杂度分析",{"category":40,"tags":375},[42,43,178],{"category":40,"tags":377},[42,43,188],{"category":40,"tags":379},[42,380],"基础概念",{"category":17,"tags":382},[383,384,385],"随记","照片","高中",{"category":17,"tags":387},[383,388,389],"团建","战地",{"category":17,"tags":391},[383,392],"生活",{"category":17,"tags":394},[383,395],"文学",{"category":17,"tags":397},[383,398,399],"SCP","模因",{"category":17,"tags":401},[383,402,403],"画集","艺术",{"category":17,"tags":405},[14,406,383],"写作",{"category":17,"tags":408},[383,409,410],"音乐","摇滚",{"category":17,"tags":412},[383,392],{"category":17,"tags":414},[383,409],{"category":17,"tags":416},[383,35,392],{"category":17,"tags":418},[383,419,420],"同人","手书",{"category":17,"tags":422},[383,392],{"category":17,"tags":424},[383,392],{"category":17,"tags":426},[383,427],"植物",{"category":17,"tags":429},[383,430],"读书",{"category":17,"tags":432},[383,392],{"category":17,"tags":434},[383,392],{"category":17,"tags":436},[383,392],{"category":17,"tags":438},[383,392],{"category":17,"tags":440},[383,392],{"category":17,"tags":442},[383,392],{"category":17,"tags":444},[14,445,383],"一周年",{"category":17,"tags":447},[383,392],{"category":17,"tags":449},[383,392],{"category":17,"tags":451},[35,452,453],"开源组织","SITE-193",{"category":17,"tags":455},[383,392],{"category":17,"tags":457},[383,458],"年末",{"category":17,"tags":460},[383,392],{"category":17,"tags":462},[383,392],{"category":17,"tags":464},[14,17],{"category":17,"tags":466},[383,392],{"category":17,"tags":468},[383,392],{"category":17,"tags":470},[383,392],{"category":17,"tags":472},[383,392],{"category":17,"tags":474},[383,475,476],"游戏","Control",{"category":30,"tags":478},[479,480,481,482],"Quadim","图像处理","四叉树","Rust",{"category":17,"tags":484},[14,485],"上线纪念",{"category":17,"tags":487},[383,395],{"category":30,"tags":489},[203,490],"测试",{"category":17,"tags":492},[383],{"category":17,"tags":494},[383,392],{"category":17,"tags":496},[383],{"category":5,"tags":498},[40],{"category":5,"tags":500},[40],{"category":5,"tags":502},[40],{"category":5,"tags":504},[40],{"category":5,"tags":506},[40],[508,512,516,520,524,528,532,536,540,544,548,552,556,560,564,568,572,576,579,583,587,590,594,598,602,606,610,614,618,622,626,630,634,638,642,646,650,654,658,662,666,670,674,678,682,686,690,694,698,702,706,710,714,718,722,726,730,734,738,742,746,750,754,758,762,766,770,774,778,782,786,790,794,798,801,805,809,813,817,821,825,829,833,837,841,845,849,853,857,861,865,869,873,877,881,885,889,893,897,901,904,907,911,915,919,923,927,930,934,938,942,946,950,954,957,961,965,969,973,977,981,984,988,992,996,1000,1004,1007,1011,1015,1019,1023,1027,1031,1035,1039,1043,1047,1051,1055,1059,1063,1067,1071,1075,1079],{"path":509,"words":510,"published":511,"date":156},"\u002Fposts\u002F2024\u002F2024-06-25-liteloaderqqnt",1296,"2024-06-25 11:03:08",{"path":513,"words":514,"published":515,"date":156},"\u002Fposts\u002F2024\u002F2024-06-26-ip签名",0,"2024-06-26 22:53:53",{"path":517,"words":518,"published":519,"date":156},"\u002Fposts\u002F2024\u002F2024-06-29-何加盐中文互联网正在加速崩塌",4853,"2024-06-29 00:47:13",{"path":521,"words":522,"published":523,"date":156},"\u002Fposts\u002F2024\u002F2024-07-12-github-chart",270,"2024-07-12 20:02:50",{"path":525,"words":526,"published":527,"date":156},"\u002Fposts\u002F2024\u002F2024-07-14-访客数统计",192,"2024-07-24 01:34:28",{"path":529,"words":530,"published":531,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-广大选课脚本",110,"2024-07-26 01:34:28",{"path":533,"words":534,"published":535,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-数学分析笔记其二",14,"2024-07-26 23:54:02",{"path":537,"words":538,"published":539,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-数据结构复习其二",12856,"2024-07-26 02:48:08",{"path":541,"words":542,"published":543,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-数据结构复习相关",32856,"2024-07-26 02:24:14",{"path":545,"words":546,"published":547,"date":156},"\u002Fposts\u002F2024\u002F2024-07-26-线性代数与空间解析几何知识点全汇总",6110,"2024-07-26 03:27:55",{"path":549,"words":550,"published":551,"date":156},"\u002Fposts\u002F2024\u002F2024-07-31-typora-picgo-兰空图床打造markdown写作环境",311,"2024-07-31 12:56:23",{"path":553,"words":554,"published":555,"date":156},"\u002Fposts\u002F2024\u002F2024-09-02-jupyter配置中文",441,"2024-09-02 23:49:05",{"path":557,"words":558,"published":559,"date":156},"\u002Fposts\u002F2024\u002F2024-09-02-自定义vscode背景图片",100,"2024-09-02 23:39:00",{"path":561,"words":562,"published":563,"date":156},"\u002Fposts\u002F2024\u002F2024-09-03-制作gzhu校园网路由器",1423,"2024-09-03 23:43:18",{"path":565,"words":566,"published":567,"date":156},"\u002Fposts\u002F2024\u002F2024-09-26-09-25-2024",136,"2024-09-26 00:49:26",{"path":569,"words":570,"published":571,"date":156},"\u002Fposts\u002F2024\u002F2024-11-04-创建一个网络包解码器分析devp2p协议",1943,"2024-11-04 16:45:19",{"path":573,"words":574,"published":575,"date":156},"\u002Fposts\u002F2024\u002F2025-03-09-2024一些笔记常微分",16,"2024-12-09 22:51:00",{"path":577,"words":574,"published":578,"date":156},"\u002Fposts\u002F2024\u002F2025-03-09-2024一些笔记概率论","2025-03-09 22:51:00",{"path":580,"words":581,"published":582,"date":156},"\u002Fposts\u002F2025\u002F2025-03-01-windows下释放docker占用的wsl空间",164,"2025-03-01 13:54:15",{"path":584,"words":585,"published":586,"date":156},"\u002Fposts\u002F2025\u002F2025-03-01-爬虫实战-爬取广州大学课程表",774,"2025-03-01 14:55:48",{"path":588,"words":530,"published":589,"date":156},"\u002Fposts\u002F2025\u002F2025-04-03-hexo集成gitalk的问题","2025-04-03 14:26:34",{"path":591,"words":592,"published":593,"date":156},"\u002Fposts\u002F2025\u002F2025-09-22-记一次配置obsidian配合hexo写博客",92,"2025-09-22 16:47:52",{"path":595,"words":596,"published":597,"date":156},"\u002Fposts\u002F2025\u002F2025-10-24-10-20课题",204,"2025-10-24 08:15:01",{"path":599,"words":600,"published":601,"date":156},"\u002Fposts\u002F2025\u002F2025-11-02-组会朝花夕拾",501,"2025-11-02 18:56:59",{"path":603,"words":604,"published":605,"date":156},"\u002Fposts\u002F2025\u002F2025-11-05-基于随机加权推断模型im的参数估计算法",481,"2025-11-05 20:51:41",{"path":607,"words":608,"published":609,"date":156},"\u002Fposts\u002F2025\u002F2025-11-09-关于软考高项网规",884,"2025-11-09 19:54:52",{"path":611,"words":612,"published":613,"date":156},"\u002Fposts\u002F2025\u002F2025-11-17-arch-linux运行appimage相关",365,"2025-11-17 09:59:59",{"path":615,"words":616,"published":617,"date":156},"\u002Fposts\u002F2025\u002F2025-11-19-相关概念",2058,"2025-11-19 11:06:20",{"path":619,"words":620,"published":621,"date":156},"\u002Fposts\u002F2025\u002F2025-11-21-web可视化实践canvas",6393,"2025-11-21 14:50:48",{"path":623,"words":624,"published":625,"date":156},"\u002Fposts\u002F2025\u002F2025-11-22-使用-github-actions-自动部署基于vite的项目到-github-pages",272,"2025-11-23 01:59:24",{"path":627,"words":628,"published":629,"date":156},"\u002Fposts\u002F2025\u002F2025-11-22-关于前端包管理器npmpnpmyarn和bun",4890,"2025-11-22 21:21:15",{"path":631,"words":632,"published":633,"date":156},"\u002Fposts\u002F2025\u002F2025-11-23-undo-redo-机制具体实现",7839,"2025-11-23 19:15:00",{"path":635,"words":636,"published":637,"date":156},"\u002Fposts\u002F2025\u002F2025-11-27-前端安全-关于xss与crsf",1866,"2025-11-28 02:05:25",{"path":639,"words":640,"published":641,"date":156},"\u002Fposts\u002F2025\u002F2025-12-05-现代协同-2d-画布编辑器pixijs-v8",4285,"2025-12-05 02:00:16",{"path":643,"words":644,"published":645,"date":156},"\u002Fposts\u002F2025\u002F2025-12-07-杂谈-课题组系统设计",3710,"2025-12-07 21:09:33",{"path":647,"words":648,"published":649,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-javascript中的数组方法与栈stack和队列queue的实现",474,"2025-11-29 16:58:15",{"path":651,"words":652,"published":653,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于javascript-实现哈希表",189,"2025-11-27 11:31:39",{"path":655,"words":656,"published":657,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于javascript的set方法",332,"2025-12-25 15:26:18",{"path":659,"words":660,"published":661,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于动态规划(背包问题为例)",1238,"2025-11-17 18:24:04",{"path":663,"words":664,"published":665,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于滑动窗口",712,"2025-11-20 15:04:40",{"path":667,"words":668,"published":669,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-关于链表(javascript)",500,"2025-11-25 13:00:48",{"path":671,"words":672,"published":673,"date":156},"\u002Fposts\u002F2025\u002F2025-12-25-面试算法acm模式构建构建输入输出模板",2051,"2025-12-25 23:09:45",{"path":675,"words":676,"published":677,"date":156},"\u002Fposts\u002F2025\u002F2025-12-26-javascript-数字数组字符串的处理",483,"2025-12-26 11:20:25",{"path":679,"words":680,"published":681,"date":156},"\u002Fposts\u002F2025\u002F2025-12-26-javascripttypescript-的顺序表链表实现",446,"2025-12-26 12:16:12",{"path":683,"words":684,"published":685,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-前端画布设计vol-1-实现基础yuan素渲染和状态控制",2136,"2025-12-28 01:23:08",{"path":687,"words":688,"published":689,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-前端画布设计vol-2-实现富文本编辑",1838,"2025-12-28 02:58:47",{"path":691,"words":692,"published":693,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-算法刷题-关于链表操作",2135,"2025-12-27 16:12:42",{"path":695,"words":696,"published":697,"date":156},"\u002Fposts\u002F2025\u002F2025-12-27-配置dnscrypt-proxy实现加密dns服务windows",1899,"2025-11-15 01:06:37",{"path":699,"words":700,"published":701,"date":156},"\u002Fposts\u002F2025\u002F2025-12-28-前端-关于网络请求xhrajaxfetchaxios",7788,"2025-10-28 15:48:46",{"path":703,"words":704,"published":705,"date":156},"\u002Fposts\u002F2025\u002F2025-12-28-前端-接口封装与请求规范axios为例",2373,"2025-12-29 01:01:18",{"path":707,"words":708,"published":709,"date":156},"\u002Fposts\u002F2025\u002F2025-12-28-前端-身份验证管理-基于-jwt-token-的实现",2709,"2025-11-23 22:04:41",{"path":711,"words":712,"published":713,"date":156},"\u002Fposts\u002F2025\u002F2025-12-29-记canvas画布项目开发",6254,"2025-12-29 04:52:15",{"path":715,"words":716,"published":717,"date":156},"\u002Fposts\u002F2025\u002Fabout-site",116,"2025-03-31 16:44:24",{"path":719,"words":720,"published":721,"date":156},"\u002Fposts\u002F2025\u002F使用neo4j图数据科学库gds进行中心度分析",143,"2025-04-02 23:37:24",{"path":723,"words":724,"published":725,"date":156},"\u002Fposts\u002F2026\u002F2026-01-03-论文实训草稿",10445,"2026-01-03 14:10:49",{"path":727,"words":728,"published":729,"date":156},"\u002Fposts\u002F2026\u002F2026-01-06-人工智能导论",11461,"2026-01-07 03:25:49",{"path":731,"words":732,"published":733,"date":156},"\u002Fposts\u002F2026\u002F2026-01-07-机器学习相关算法",82,"2026-01-08 02:28:13",{"path":735,"words":736,"published":737,"date":156},"\u002Fposts\u002F2026\u002F2026-01-16-关于低复杂度最长链共识算法设计",4466,"2026-01-16 10:33:23",{"path":739,"words":740,"published":741,"date":156},"\u002Fposts\u002F2026\u002F2026-01-19-杂记2026-01-19",5754,"2026-01-20 01:03:26",{"path":743,"words":744,"published":745,"date":156},"\u002Fposts\u002F2026\u002F2026-01-22-github-action-自动同步博客到-github-主页",1069,"2026-01-22 16:31:47",{"path":747,"words":748,"published":749,"date":156},"\u002Fposts\u002F2026\u002F2026-03-01-windows-wsl安装docker",257,"2026-03-01 20:55:31",{"path":751,"words":752,"published":753,"date":156},"\u002Fposts\u002F2026\u002F2026-03-14-关于-msys2",701,"2026-03-15 03:05:04",{"path":755,"words":756,"published":757,"date":156},"\u002Fposts\u002F2026\u002F2026-03-28-团队项目协作规范随记",2419,"2026-03-29 05:33:50",{"path":759,"words":760,"published":761,"date":156},"\u002Fposts\u002F2026\u002F2026-03-29-oh-my-posh配置分享",104,"2026-03-29 16:34:43",{"path":763,"words":764,"published":765,"date":156},"\u002Fposts\u002F2026\u002F2026-06-13-从上下文工程到-agent-harness-engineering",8840,"2026-06-13 21:06:20",{"path":767,"words":768,"published":769,"date":156},"\u002Fposts\u002F2026\u002F2026-07-13-简谈前端基建质量标准与ai友好建设",3814,"2026-07-13 21:06:20",{"path":771,"words":772,"published":773,"date":156},"\u002Fposts\u002F2026\u002F2026-07-15-agentic-rag-系统实践",13357,"2026-07-15 21:06:20",{"path":775,"words":776,"published":777,"date":156},"\u002Fposts\u002F2026\u002F2026-07-18-简谈sdd规范驱动开发-copy",4476,"2026-07-18 11:06:20",{"path":779,"words":780,"published":781,"date":156},"\u002Fposts\u002F2026\u002F2026-07-20-个人neovim配置分享",366,"2026-07-22 13:46:50",{"path":783,"words":784,"published":785,"date":156},"\u002Fposts\u002F2026\u002F2026-07-20-关于技术写作-设计文档",6763,"2026-07-20 13:46:50",{"path":787,"words":788,"published":789,"date":156},"\u002Fposts\u002F2026\u002F2026-07-29-fastapi-工程实践随记",3417,"2026-07-29 04:58:34",{"path":791,"words":792,"published":793,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002F2026-06-19-rfc-liskin_code_agent",3563,"2026-06-19 15:18:20",{"path":795,"words":796,"published":797,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002F2026-07-25-rfc-glushkov_ogas",13461,"2026-07-28 23:46:50",{"path":799,"words":800,"published":793,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002F2026-08-03-adr-ogas-arkhiv",2698,{"path":802,"words":803,"published":804,"date":156},"\u002Fposts\u002Frfc_agentic_project\u002Frag\u002F2026-08-12-arkhiv_rag-vol-1",4366,"2026-08-12 15:18:20",{"path":806,"words":807,"published":808,"date":156},"\u002Fposts\u002Fleetcode\u002F2025-12-25-力扣百题速练javascripttypescriptvol-1",3108,"2025-12-25 13:57:08",{"path":810,"words":811,"published":812,"date":156},"\u002Fposts\u002Fleetcode\u002F2025-12-26-力扣百题速练javascripttypescriptvol-2",3185,"2025-12-26 13:57:08",{"path":814,"words":815,"published":816,"date":156},"\u002Fposts\u002Fleetcode\u002F2025-12-28-力扣百题速练javascripttypescriptvol-3",2533,"2025-12-29 02:15:44",{"path":818,"words":819,"published":820,"date":156},"\u002Fposts\u002Fleetcode\u002F2026-01-17-力扣百题速练javascripttypescriptvol-4",3024,"2026-01-17 22:53:01",{"path":822,"words":823,"published":824,"date":156},"\u002Fposts\u002Fleetcode\u002F2026-01-19-力扣百题速练javascripttypescriptvol-5",293,"2026-01-19 15:15:12",{"path":826,"words":827,"published":828,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算spark系统与scala语言",4320,"2026-07-06 14:10:49",{"path":830,"words":831,"published":832,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算分类与回归分析",2081,"2026-07-07 12:40:29",{"path":834,"words":835,"published":836,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算数值优化方法",2182,"2026-07-07 13:50:29",{"path":838,"words":839,"published":840,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算数据降维",1583,"2026-07-07 21:50:29",{"path":842,"words":843,"published":844,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算聚类分析",1882,"2026-07-07 16:50:29",{"path":846,"words":847,"published":848,"date":156},"\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算随机模拟与统计推断",2433,"2026-07-06 22:40:29",{"path":850,"words":851,"published":852,"date":156},"\u002Fposts\u002F数据可视化\u002F2026-06-14-数据可视化-基本图像",10011,"2026-06-14 20:18:20",{"path":854,"words":855,"published":856,"date":156},"\u002Fposts\u002F数据可视化\u002F2026-06-14-数据可视化-概论",10030,"2026-06-14 15:18:20",{"path":858,"words":859,"published":860,"date":156},"\u002Fposts\u002F数据可视化\u002F2026-06-15-数据可视化-可视化库",2032,"2026-06-15 20:18:20",{"path":862,"words":863,"published":864,"date":156},"\u002Fposts\u002F数据结构\u002F2025-09-29-数据结构-图",5451,"2025-04-15 20:48:06",{"path":866,"words":867,"published":868,"date":156},"\u002Fposts\u002F数据结构\u002F2025-09-29-数据结构-树",4211,"2025-04-30 02:19:06",{"path":870,"words":871,"published":872,"date":156},"\u002Fposts\u002F数据结构\u002F2025-09-29-数据结构-队列",921,"2025-04-11 15:30:08",{"path":874,"words":875,"published":876,"date":156},"\u002Fposts\u002F数据结构\u002F关于数据结构的一些想法",456,"2025-04-04 19:13:49",{"path":878,"words":879,"published":880,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-栈",920,"2025-04-18 00:17:37",{"path":882,"words":883,"published":884,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-算法复杂度",2153,"2025-04-05 16:09:55",{"path":886,"words":887,"published":888,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-线性表链表",4572,"2025-04-06 00:24:40",{"path":890,"words":891,"published":892,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-线性表顺序表",4191,"2025-04-05 22:09:59",{"path":894,"words":895,"published":896,"date":156},"\u002Fposts\u002F数据结构\u002F数据结构-绪论",2881,"2025-04-05 11:31:22",{"path":898,"words":899,"published":156,"date":900},"\u002Fposts\u002F杂记\u002F2023-12-26-2023年12月26日",7,"2023-12-26 23:51:33",{"path":902,"words":899,"published":156,"date":903},"\u002Fposts\u002F杂记\u002F2024-01-01-2024团建","2024-01-01 01:51:27",{"path":905,"words":581,"published":156,"date":906},"\u002Fposts\u002F杂记\u002F2024-01-09-随记","2024-01-09 20:50:35",{"path":908,"words":909,"published":156,"date":910},"\u002Fposts\u002F杂记\u002F2024-03-12-花名",5275,"2024-03-12 16:04:23",{"path":912,"words":913,"published":156,"date":914},"\u002Fposts\u002F杂记\u002F2024-04-15-逆模因",1353,"2024-04-15 00:26:16",{"path":916,"words":917,"published":156,"date":918},"\u002Fposts\u002F杂记\u002F2024-05-03-艺作",27,"2024-05-03 00:01:00",{"path":920,"words":921,"published":156,"date":922},"\u002Fposts\u002F杂记\u002F2024-05-21-关于博客",1720,"2024-02-21 23:21:11",{"path":924,"words":925,"published":156,"date":926},"\u002Fposts\u002F杂记\u002F2024-06-20-dnvrc维克多崔专访-2023",2036,"2024-06-20 00:28:39",{"path":928,"words":760,"published":156,"date":929},"\u002Fposts\u002F杂记\u002F2024-06-25-6月25日随记","2024-06-25 12:46:36",{"path":931,"words":932,"published":156,"date":933},"\u002Fposts\u002F杂记\u002F2024-06-25-歌名-想見星星",148,"2024-06-25 22:47:59",{"path":935,"words":936,"published":156,"date":937},"\u002Fposts\u002F杂记\u002F2024-07-11-桂花岗",6,"2024-07-11 00:28:17",{"path":939,"words":940,"published":156,"date":941},"\u002Fposts\u002F杂记\u002F2024-07-15-rolling-bocci",9,"2024-07-15 21:25:56",{"path":943,"words":944,"published":156,"date":945},"\u002Fposts\u002F杂记\u002F2024-07-22-七月九日",34,"2024-07-09 17:54:23",{"path":947,"words":948,"published":156,"date":949},"\u002Fposts\u002F杂记\u002F2024-07-22-六月随记",1052,"2024-07-22 01:03:19",{"path":951,"words":952,"published":156,"date":953},"\u002Fposts\u002F杂记\u002F2024-07-22-石菖蒲",41,"2024-07-10 01:26:05",{"path":955,"words":514,"published":156,"date":956},"\u002Fposts\u002F杂记\u002F2024-07-23-新书","2024-07-23 01:05:49",{"path":958,"words":959,"published":156,"date":960},"\u002Fposts\u002F杂记\u002F2024-07-29-年前",74,"2024-07-29 23:59:07",{"path":962,"words":963,"published":156,"date":964},"\u002Fposts\u002F杂记\u002F2024-07-30-周边",138,"2024-07-30 02:03:23",{"path":966,"words":967,"published":156,"date":968},"\u002Fposts\u002F杂记\u002F2024-07-31-2024-7-31日",185,"2024-07-31 01:21:52",{"path":970,"words":971,"published":156,"date":972},"\u002Fposts\u002F杂记\u002F2024-08-02-八月",1710,"2024-08-30 00:31:02",{"path":974,"words":975,"published":156,"date":976},"\u002Fposts\u002F杂记\u002F2024-09-01-九月",1484,"2024-09-26 16:30:15",{"path":978,"words":979,"published":156,"date":980},"\u002Fposts\u002F杂记\u002F2024-09-08-2024年9月8日",97,"2024-09-08 13:59:36",{"path":982,"words":514,"published":156,"date":983},"\u002Fposts\u002F杂记\u002F2024-09-19-博客站的一周年","2024-09-18 23:36:24",{"path":985,"words":986,"published":156,"date":987},"\u002Fposts\u002F杂记\u002F2024-10-03-十月",1028,"2024-10-31 23:54:27",{"path":989,"words":990,"published":156,"date":991},"\u002Fposts\u002F杂记\u002F2024-11-04-十一月",2134,"2024-11-30 00:04:39",{"path":993,"words":994,"published":156,"date":995},"\u002Fposts\u002F杂记\u002F2024-11-10-gzhu-site-193",80,"2024-11-10 19:19:12",{"path":997,"words":998,"published":156,"date":999},"\u002Fposts\u002F杂记\u002F2024-12-01-十二月",455,"2024-12-30 23:13:47",{"path":1001,"words":1002,"published":156,"date":1003},"\u002Fposts\u002F杂记\u002F2024-12-21-年末",23,"2024-12-21 23:21:49",{"path":1005,"words":522,"published":156,"date":1006},"\u002Fposts\u002F杂记\u002F2025-01-30-一月","2025-01-30 23:44:41",{"path":1008,"words":1009,"published":156,"date":1010},"\u002Fposts\u002F杂记\u002F2025-03-01-二月",224,"2025-02-28 00:11:08",{"path":1012,"words":1013,"published":156,"date":1014},"\u002Fposts\u002F杂记\u002F2025-03-01-博客杂谈",344,"2025-03-01 16:03:18",{"path":1016,"words":1017,"published":156,"date":1018},"\u002Fposts\u002F杂记\u002F2025-03-05-三月",2090,"2025-03-05 19:17:28",{"path":1020,"words":1021,"published":156,"date":1022},"\u002Fposts\u002F杂记\u002F2025-07-10-七月",361,"2025-07-10 22:04:32",{"path":1024,"words":1025,"published":156,"date":1026},"\u002Fposts\u002F杂记\u002F2025-09-21-九月",781,"2025-09-21 20:53:37",{"path":1028,"words":1029,"published":156,"date":1030},"\u002Fposts\u002F杂记\u002F2025-10-09-十月",591,"2025-10-09 00:35:07",{"path":1032,"words":1033,"published":156,"date":1034},"\u002Fposts\u002F杂记\u002Fcontrol",13,"2023-09-25 13:03:59",{"path":1036,"words":1037,"published":156,"date":1038},"\u002Fposts\u002F杂记\u002Fquadim四叉树图像处理",1094,"2023-10-21 11:27:06",{"path":1040,"words":1041,"published":156,"date":1042},"\u002Fposts\u002F杂记\u002Fsuccess",24,"2023-09-22 15:59:07",{"path":1044,"words":1045,"published":156,"date":1046},"\u002Fposts\u002F杂记\u002F三光年",295,"2023-11-18 04:18:40",{"path":1048,"words":1049,"published":156,"date":1050},"\u002Fposts\u002F杂记\u002F加密测试",961,"2023-11-21 14:24:01",{"path":1052,"words":1053,"published":156,"date":1054},"\u002Fposts\u002F杂记\u002F啊啊啊啊啊啊啊",54,"2023-09-20 17:29:33",{"path":1056,"words":1057,"published":156,"date":1058},"\u002Fposts\u002F杂记\u002F杂谈",124,"2023-09-25 23:11:32",{"path":1060,"words":1061,"published":156,"date":1062},"\u002Fposts\u002F杂记\u002F艹",25,"2023-10-21 17:40:43",{"path":1064,"words":1065,"published":1066,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习卷积神经网络",3168,"2026-06-07 11:23:08",{"path":1068,"words":1069,"published":1070,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习循环神经网络",2348,"2026-06-07 11:33:08",{"path":1072,"words":1073,"published":1074,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习改进学习方法",3360,"2026-06-07 10:13:08",{"path":1076,"words":1077,"published":1078,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习深度生成模型",2727,"2026-06-07 11:43:08",{"path":1080,"words":1081,"published":1082,"date":156},"\u002Fposts\u002F神经网络\u002F神经网络与深度学习神经网络基础",3205,"2026-06-07 10:03:08",{"id":1084,"title":1085,"abbrlink":1086,"body":1087,"category":5,"cover":4477,"date":156,"description":4478,"extension":4479,"mathjax":4480,"meta":4481,"navigation":4480,"path":826,"published":828,"readingMinutes":534,"seo":4484,"stem":4485,"sticky":156,"swiper_index":156,"tags":4486,"updated":156,"words":827,"__hash__":4487},"posts\u002Fposts\u002F分布式处理与计算\u002F分布式处理与计算：Spark系统与Scala语言.md","分布式处理与计算：Spark系统与Scala语言","b0d66ec2",{"type":1088,"value":1089,"toc":4406},"minimark",[1090,1095,1100,1104,1107,1122,1125,1128,1133,1136,1139,1142,1145,1148,1151,1154,1158,1161,1164,1167,1178,1181,1184,1187,1191,1195,1198,1201,1204,1207,1217,1220,1226,1237,1240,1348,1368,1371,1377,1399,1402,1408,1411,1417,1421,1427,1430,1436,1455,1459,1465,1468,1511,1514,1518,1522,1552,1559,1563,1597,1603,1607,1612,1702,1706,1756,1765,1788,1793,1799,1803,1812,1816,1846,1850,1906,1911,1917,1921,1927,1931,1996,2000,2006,2008,2012,2015,2021,2024,2174,2180,2183,2265,2271,2274,2280,2286,2289,2305,2357,2363,2367,2372,2400,2517,2523,2526,2532,2535,2622,2628,2631,2637,2640,2646,2769,2775,2779,2785,2789,2794,2800,2805,2811,2813,2816,2903,2907,3042,3045,3088,3091,3188,3191,3282,3286,3363,3365,3369,3376,3379,3482,3485,3570,3573,3648,3651,3697,3700,3810,3813,3911,3913,3985,3989,4064,4067,4073,4180,4222,4226,4267,4269,4273,4283,4286,4338,4341,4348],[1091,1092,1094],"h1",{"id":1093},"spark系统与scala语言","Spark系统与Scala语言",[1096,1097,1099],"h2",{"id":1098},"spark-系统","Spark 系统",[1101,1102,1103],"p",{},"Spark 是一个基于内存的、分布式的、超大号的数据处理“操作系统”。",[1101,1105,1106],{},"它本身不产生数据，也不负责最终的业务展示（不画 UI），它的唯一使命就是：把一堆原本一台电脑根本装不下、算不完的数据，分散到几百上千台电脑上，用最快的速度算出结果。",[1108,1109,1110,1119],"ul",{},[1111,1112,1113,1114,1118],"li",{},"Spark 的四个特点：",[1115,1116,1117],"strong",{},"快速、易用性、通用性、随处运行","。",[1111,1120,1121],{},"应用场景：腾讯广告（大数据精准推荐）、Yahoo（定向广告）、淘宝（相关算法推荐）、优酷土豆（视频推荐）",[1101,1123,1124],{},"Spark 是一个开源的大数据处理引擎，它提供了一整套开发 API，包括流计算和机器学习。它支持批处理和流处理。",[1101,1126,1127],{},"Spark 的一个显著特点是它能够在内存中进行迭代计算，从而加快数据处理速度。尽管 Spark 是用 Scala 开发的，但它也为 Java、Scala、Python 和 R 等高级编程语言提供了开发接口。",[1129,1130,1132],"h3",{"id":1131},"spark组件","Spark组件",[1101,1134,1135],{},"Spark提供了6大组件：",[1101,1137,1138],{},"Spark Core\nSpark SQL\nSpark Streaming\nSpark MLlib\nSpark GraphX",[1101,1140,1141],{},"Spark Core 是 Spark 的基础，它提供了内存计算的能力，是分布式处理大数据集的基础。它将分布式数据抽象为弹性分布式数据集（RDD），并为运行在其上的上层组件提供 API。所有 Spark 的上层组件都建立在 Spark Core 的基础之上。",[1101,1143,1144],{},"Spark SQL 是一个用于处理结构化数据的 Spark 组件。它允许使用 SQL 语句查询数据。Spark 支持多种数据源，包括 Hive 表、Parquet 和 JSON 等。",[1101,1146,1147],{},"Spark Streaming 是一个用于处理动态数据流的 Spark 组件。它能够开发出强大的交互和数据查询程序。在处理动态数据流时，流数据会被分割成微小的批处理，这些微小批处理将会在 Spark Core 上按时间顺序快速执行。",[1101,1149,1150],{},"Spark MLlib 是 Spark 的机器学习库。它提供了常用的机器学习算法和实用程序，包括分类、回归、聚类、协同过滤、降维等。MLlib 还提供了一些底层优化原语和高层流水线 API，可以帮助开发人员更快地创建和调试机器学习流水线。",[1101,1152,1153],{},"Spark GraphX 是 Spark 的图形计算库。它提供了一种分布式图形处理框架，可以帮助开发人员更快地构建和分析大型图形。",[1129,1155,1157],{"id":1156},"spark的优势","Spark的优势",[1101,1159,1160],{},"Spark 有许多优势，其中一些主要优势包括：",[1101,1162,1163],{},"速度：Spark 基于内存计算，能够比基于磁盘的计算快很多。对于迭代式算法和交互式数据挖掘任务，这种速度优势尤为明显。\n易用性：Spark 支持多种语言，包括 Java、Scala、Python 和 R。它提供了丰富的内置 API，可以帮助开发人员更快地构建和运行应用程序。\n通用性：Spark 提供了多种组件，可以支持不同类型的计算任务，包括批处理、交互式查询、流处理、机器学习和图形处理等。\n兼容性：Spark 可以与多种数据源集成，包括 Hadoop 分布式文件系统（HDFS）、Apache Cassandra、Apache HBase 和 Amazon S3 等。\n容错性：Spark 提供了弹性分布式数据集（RDD）抽象，可以帮助开发人员更快地构建容错应用程序。",[1101,1165,1166],{},"下面是一个简单的Word Count的Spark程序：",[1168,1169,1175],"pre",{"className":1170,"code":1172,"language":1173,"meta":1174},[1171],"language-scala","import org.apache.spark.{SparkConf, SparkContext}\n\nobject SparkWordCount {\n    def main (args:Array [String]): Unit = {\n        \u002F\u002FsetMaster(\"local[9]\") 表示在本地运行 Spark 程序，使用 9 个线程。local[*] 表示使用所有可用的处理器核心。\n        \u002F\u002F这种模式通常用于本地测试和开发。\n        val conf = new SparkConf ().setAppName (\"Word Count\").setMaster(\"local[9]\");\n        val sc = new SparkContext (conf);\n        sc.setLogLevel(\"ERROR\")\n\n            val data = List(\"Hello World\", \"Hello Spark\")\n            val textFile = sc.parallelize(data)\n            val wordCounts = textFile.flatMap (line => line.split (\" \")).map (\n            word => (word, 1)).reduceByKey ( (a, b) => a + b)\n            wordCounts.collect().foreach(println)\n    }\n}\n","scala","",[1176,1177,1172],"code",{"__ignoreMap":1174},[1101,1179,1180],{},"程序首先创建了一个 SparkConf 对象，用来设置应用程序名称和运行模式。然后，它创建了一个 SparkContext 对象，用来连接到 Spark 集群。",[1101,1182,1183],{},"接下来，程序创建了一个包含两个字符串的列表，并使用 parallelize 方法将其转换为一个 RDD。然后，它使用 flatMap 方法将每一行文本拆分成单词，并使用 map 方法将每个单词映射为一个键值对（key-value pair），其中键是单词，值是 1。",[1101,1185,1186],{},"最后，程序使用 reduceByKey 方法将具有相同键的键值对进行合并，并对它们的值进行求和。最终结果是一个包含每个单词及其出现次数的 RDD。程序使用 collect 方法将结果收集到驱动程序，并使用 foreach 方法打印出来。",[1096,1188,1190],{"id":1189},"scala语言","Scala语言",[1129,1192,1194],{"id":1193},"scala语言中的数据类型","Scala语言中的数据类型",[1101,1196,1197],{},"整数： Byte（2^8 | -128 到 127） 、 Short （2^16 | -32768 到 32767）、 Int （2^32 | -2147483648 到 2147483647）、 Long(2^64)",[1101,1199,1200],{},"浮点数： Float （单精度32）、 Double （浮点数64）",[1101,1202,1203],{},"字符： Char （字符）、 String （字符串）",[1101,1205,1206],{},"Boolean: true或false",[1101,1208,1209,1210],{},"在具体声明中， '",[1211,1212,1213,1214],"value",{},"' 表示字符， \"",[1211,1215,1216],{},"\" 表示字符串",[1129,1218,1219],{"id":1219},"值与变量声明",[1168,1221,1224],{"className":1222,"code":1223,"language":1173,"meta":1174},[1171],"val \u003CName>[:\u003Ctype>] = \u003Cvalue>   \u002F\u002F 常量（值），不可再赋值\nvar \u003CName>[:\u003Ctype>] = \u003Cvalue>   \u002F\u002F 变量，可再赋值\n",[1176,1225,1223],{"__ignoreMap":1174},[1101,1227,1228,1229,1232,1233,1236],{},"区分 ",[1176,1230,1231],{},"val","（不可变）和 ",[1176,1234,1235],{},"var","（可变）",[1129,1238,1239],{"id":1239},"数组结构",[1241,1242,1243,1265],"table",{},[1244,1245,1246],"thead",{},[1247,1248,1249,1253,1256,1259,1262],"tr",{},[1250,1251,1252],"th",{},"结构",[1250,1254,1255],{},"特点",[1250,1257,1258],{},"声明",[1250,1260,1261],{},"取值",[1250,1263,1264],{},"下标",[1266,1267,1268,1302,1328],"tbody",{},[1247,1269,1270,1274,1281,1286,1292],{},[1271,1272,1273],"td",{},"元组 Tuple",[1271,1275,1276,1277,1280],{},"可存",[1115,1278,1279],{},"不同","类型",[1271,1282,1283],{},[1176,1284,1285],{},"var a = (1, 2, 3)",[1271,1287,1288,1291],{},[1176,1289,1290],{},"a._1","（=1）",[1271,1293,1294,1297,1298,1301],{},[1115,1295,1296],{},"从 1 开始","（",[1176,1299,1300],{},"._","）",[1247,1303,1304,1307,1310,1315,1320],{},[1271,1305,1306],{},"数组 Array",[1271,1308,1309],{},"相同类型、固定长度",[1271,1311,1312],{},[1176,1313,1314],{},"var b = Array(1, 2, 3)",[1271,1316,1317,1291],{},[1176,1318,1319],{},"b(0)",[1271,1321,1322,1297,1325,1301],{},[1115,1323,1324],{},"从 0 开始",[1176,1326,1327],{},"(*)",[1247,1329,1330,1333,1336,1341,1346],{},[1271,1331,1332],{},"列表 List",[1271,1334,1335],{},"相同类型",[1271,1337,1338],{},[1176,1339,1340],{},"var c = List(1, 2, 3)",[1271,1342,1343,1291],{},[1176,1344,1345],{},"c(0)",[1271,1347,1324],{},[1349,1350,1351],"blockquote",{},[1101,1352,1353,1354,1357,1358,1361,1362,1357,1365],{},"元组用 ",[1176,1355,1356],{},"._1"," 且",[1115,1359,1360],{},"下标从 1 开始","；数组\u002F列表用 ",[1176,1363,1364],{},"(n)",[1115,1366,1367],{},"下标从 0 开始",[1129,1369,1370],{"id":1370},"字符串表达式",[1168,1372,1375],{"className":1373,"code":1374,"language":1173,"meta":1174},[1171],"\u002F\u002F 1. 字符串拼接\n\"Hello \" + \"World\"              \u002F\u002F = Hello World\n\n\u002F\u002F 2. 字符串内插（s 前缀）\nval item = \"World\"\ns\"Hello $item\"                  \u002F\u002F = Hello World\ns\"Hello ${item}s\"               \u002F\u002F = Hello Worlds（引用名后接非字用 {}）\ns\"Hello ${item * 3}\"            \u002F\u002F = Hello WorldWorldWorld（{} 内可算式）\n\n\u002F\u002F 3. 格式化（f 前缀 \u002F printf）\nval pi = 3.1415926\nf\"pi = $pi%3.2f\"                \u002F\u002F = pi = 3.14\n",[1176,1376,1374],{"__ignoreMap":1174},[1101,1378,1297,1379,1382,1383,1386,1387,1390,1391,1394,1395,1398],{},[1176,1380,1381],{},"%3.2f","）：第一个数字 ",[1176,1384,1385],{},"3"," 是整个字符串的最短长度（含小数点），第二个数字 ",[1176,1388,1389],{},"2"," 是保留小数位数；",[1176,1392,1393],{},"f"," 表示浮点数，",[1176,1396,1397],{},"d"," 表示整数。",[1129,1400,1401],{"id":1401},"数值运算与表达式块",[1168,1403,1406],{"className":1404,"code":1405,"language":1173,"meta":1174},[1171],"math.sin(1) + math.cos(1)       \u002F\u002F Double = 1.3817...\n\n\u002F\u002F 表达式块：块中最后一个表达式作为整个块的返回值\nval pi_approx = {\n  val numerator = 355; val denominator = 113f\n  numerator \u002F denominator\n}                               \u002F\u002F Float = 3.141593\n",[1176,1407,1405],{"__ignoreMap":1174},[1129,1409,1410],{"id":1410},"条件表达式",[1168,1412,1415],{"className":1413,"code":1414,"language":1173,"meta":1174},[1171],"\u002F\u002F if \u002F if...else\nif (\u003CBoolean expression>) \u003Cexpression>\nif (\u003CBoolean expression>) \u003Cexpression> else \u003Cexpression>\n\nvar x = 1; var y = 8\nval max = if (x > y) x else y   \u002F\u002F Int = 8\n",[1176,1416,1414],{"__ignoreMap":1174},[1129,1418,1420],{"id":1419},"匹配表达式-match","匹配表达式 match",[1168,1422,1425],{"className":1423,"code":1424,"language":1173,"meta":1174},[1171],"\u003Cexpression> match {\n  case \u003Cpattern> => \u003Cexpression>\n  [case ...]\n}\n\n\u002F\u002F 基本匹配\nval day = \"mon\"\nval kind = day match {\n  case \"mon\" | \"tue\" | \"wed\" | \"thu\" | \"fri\" => \"weekday\"\n  case \"sat\" | \"sun\" => \"weekend\"\n}                               \u002F\u002F = weekday\n\n\u002F\u002F 带守卫条件 if 的匹配\nval score = 95\nscore match {\n  case score if (90 \u003C= score) & (score \u003C 100) => \"A\"\n  case score if (70 \u003C= score) & (score \u003C 90)  => \"B\"\n  case score if (60 \u003C= score) & (score \u003C 70)  => \"C\"\n  case score if score \u003C 60                    => \"F\"\n}                               \u002F\u002F = A\n",[1176,1426,1424],{"__ignoreMap":1174},[1129,1428,1429],{"id":1429},"循环",[1168,1431,1434],{"className":1432,"code":1433,"language":1173,"meta":1174},[1171],"\u002F\u002F 定义数值范围\n1 to 5          \u002F\u002F (1, 2, 3, 4, 5)   —— 包括头尾\n1 until 5       \u002F\u002F (1, 2, 3, 4)      —— 不包括最后一个\n1 to 10 by 2    \u002F\u002F (1, 3, 5, 7, 9)   —— 步长\n\n\u002F\u002F for 循环\nfor (x \u003C- 1 to 7) { print(s\"Day $x \") }       \u002F\u002F Day 1 ... Day 7\n\n\u002F\u002F yield：返回值作为集合返回\nfor (x \u003C- 1 to 7) yield { s\"Day $x \" }         \u002F\u002F Vector(\"Day 1 \", ...)\n\n\u002F\u002F 迭代器哨位（带 if 过滤）\nval threes = for (i \u003C- 1 to 20 if i % 3 == 0) yield i   \u002F\u002F Vector(3,6,9,12,15,18)\n\n\u002F\u002F while \u002F do-while\nvar x = 10; while (x > 0) x -= 1               \u002F\u002F 0\nvar x = 0; do println(s\"x = $x\") while (x > 0) \u002F\u002F 至少执行一次 → x = 0\n",[1176,1435,1433],{"__ignoreMap":1174},[1349,1437,1438],{},[1101,1439,1440,1443,1444,1447,1448,1451,1452],{},[1176,1441,1442],{},"to"," 含尾，",[1176,1445,1446],{},"until"," 不含尾；",[1176,1449,1450],{},"do\u002Fwhile"," 在尾部检查条件，",[1115,1453,1454],{},"至少执行一次",[1129,1456,1458],{"id":1457},"定义方法函数","定义方法\u002F函数",[1168,1460,1463],{"className":1461,"code":1462,"language":1173,"meta":1174},[1171],"def hi = \"hi\"                                   \u002F\u002F 无参\n\ndef hi: String = \"hi\"                           \u002F\u002F 指定返回类型\n\ndef \u003Cid>(\u003Cid>:\u003Ctype>[, ...]): \u003Ctype> = \u003Cexpr>   \u002F\u002F 带参\ndef logit(p: Double): Double = {\n  if (p >= 0 && p \u003C= 1) math.log(p \u002F (1 - p))\n  else throw new Error(s\"logit: parameter $p is out of range\")\n}\n\nval f = (x: Double) => x * x                    \u002F\u002F 匿名函数，f(2) = 4.0\n",[1176,1464,1462],{"__ignoreMap":1174},[1129,1466,1467],{"id":1467},"运算符与特殊符号",[1108,1469,1470,1488],{},[1111,1471,1472,1473,1476,1477,1480,1481,1484,1485,1118],{},"算术：",[1176,1474,1475],{},"+ - * \u002F %","；关系：",[1176,1478,1479],{},"\u003C > == != >= \u003C=","；逻辑：",[1176,1482,1483],{},"&& || !","；赋值：",[1176,1486,1487],{},"= += -= *= \u002F= %=",[1111,1489,1490,1491],{},"特殊符号：\n",[1108,1492,1493,1499,1505],{},[1111,1494,1495,1498],{},[1176,1496,1497],{},":::"," 两个 List 之间连接",[1111,1500,1501,1504],{},[1176,1502,1503],{},"::"," 元素与 List 之间连接",[1111,1506,1507,1510],{},[1176,1508,1509],{},"_"," 在集合中代指每一个元素（通配符）",[1512,1513],"hr",{},[1096,1515,1517],{"id":1516},"spark-编程","Spark 编程",[1129,1519,1521],{"id":1520},"rdd-弹性分布式数据集","RDD 弹性分布式数据集",[1108,1523,1524,1531],{},[1111,1525,1526,1527,1530],{},"RDD（Resilient Distributed Datasets，弹性分布式数据集）：一个提供了许多操作接口的数据集合，和一般数据集不同的是其",[1115,1528,1529],{},"实际数据分布存储于一批机器","（内存或磁盘）中",[1111,1532,1533,1534,1548,1551],{},"RDD 上的两类操作：",[1108,1535,1536,1542],{},[1111,1537,1538,1541],{},[1115,1539,1540],{},"转化 Transformation","：由原有 RDD 创建一个新的 RDD",[1111,1543,1544,1547],{},[1115,1545,1546],{},"行动 Action","：将计算结果返回给驱动器程序，或写入外部存储",[1549,1550],"br",{},"map 函数：将数据集元素进行传递并产生新的RDD数据集的变换（转化）\nreduce 函数：将汇总返回结果的一种行动（行动）",[1349,1553,1554],{},[1101,1555,1556],{},[1115,1557,1558],{},"转化返回的是 RDD，行动返回的是其他数据类型",[1129,1560,1562],{"id":1561},"创建-rdd","创建 RDD",[1241,1564,1565,1575],{},[1244,1566,1567],{},[1247,1568,1569,1572],{},[1250,1570,1571],{},"方法",[1250,1573,1574],{},"作用",[1266,1576,1577,1587],{},[1247,1578,1579,1584],{},[1271,1580,1581],{},[1176,1582,1583],{},"sc.textFile()",[1271,1585,1586],{},"利用读取外部数据集进行创建",[1247,1588,1589,1594],{},[1271,1590,1591],{},[1176,1592,1593],{},"sc.parallelize()",[1271,1595,1596],{},"分发驱动器程序中的对象集合",[1168,1598,1601],{"className":1599,"code":1600,"language":1173,"meta":1174},[1171],"val originalData = sc.textFile(\"FileStore\u002Ftables\u002F03.08data\u002Fscore.txt\")\nval distData = sc.parallelize(List(1, 2, 3, 4, 5))\n",[1176,1602,1600],{"__ignoreMap":1174},[1129,1604,1606],{"id":1605},"转化算子transformation返回-rdd","转化算子（Transformation，返回 RDD）",[1608,1609,1611],"h4",{"id":1610},"map-类算子单-rdd-逐元素逐分区变换","Map 类算子（单 RDD 逐元素\u002F逐分区变换）",[1241,1613,1614,1623],{},[1244,1615,1616],{},[1247,1617,1618,1621],{},[1250,1619,1620],{},"算子",[1250,1622,1574],{},[1266,1624,1625,1638,1651,1668,1682,1692],{},[1247,1626,1627,1632],{},[1271,1628,1629],{},[1176,1630,1631],{},"map(func)",[1271,1633,1634,1635],{},"将原 RDD 每个数据项经 func 转化成新 RDD，",[1115,1636,1637],{},"不改变分区数目",[1247,1639,1640,1645],{},[1271,1641,1642],{},[1176,1643,1644],{},"flatMap()",[1271,1646,1647,1648],{},"对集合中每个元素做 map 操作后再",[1115,1649,1650],{},"扁平化",[1247,1652,1653,1658],{},[1271,1654,1655],{},[1176,1656,1657],{},"mapPartitions(func)",[1271,1659,1660,1661,1664,1665],{},"与 map 类似，但传入函数的操作对象是",[1115,1662,1663],{},"每个分区的 Iterator 集合","，",[1115,1666,1667],{},"不改变分区数量",[1247,1669,1670,1675],{},[1271,1671,1672],{},[1176,1673,1674],{},"filter(func)",[1271,1676,1677,1678,1681],{},"保留 func 返回值为 ",[1176,1679,1680],{},"true"," 的元素，组成新 RDD",[1247,1683,1684,1689],{},[1271,1685,1686],{},[1176,1687,1688],{},"sortBy(fun, ascending=true, numPartitions)",[1271,1690,1691],{},"对标准 RDD 进行排序",[1247,1693,1694,1699],{},[1271,1695,1696],{},[1176,1697,1698],{},"distinct()",[1271,1700,1701],{},"针对重复元素，只保留一个",[1608,1703,1705],{"id":1704},"reduce-类算子多-rdd-集合运算","Reduce 类算子（多 RDD 集合运算）",[1241,1707,1708,1716],{},[1244,1709,1710],{},[1247,1711,1712,1714],{},[1250,1713,1620],{},[1250,1715,1574],{},[1266,1717,1718,1731,1744],{},[1247,1719,1720,1725],{},[1271,1721,1722],{},[1176,1723,1724],{},"intersection()",[1271,1726,1727,1728,1301],{},"找出两个 RDD 的共同元素（",[1115,1729,1730],{},"交集",[1247,1732,1733,1738],{},[1271,1734,1735],{},[1176,1736,1737],{},"subtract()",[1271,1739,1740,1741],{},"获取两个 RDD 之间的",[1115,1742,1743],{},"差集",[1247,1745,1746,1751],{},[1271,1747,1748],{},[1176,1749,1750],{},"cartesian()",[1271,1752,1740,1753],{},[1115,1754,1755],{},"笛卡尔积",[1101,1757,1758,1764],{},[1115,1759,1760,1761,1301],{},"参数说明（",[1176,1762,1763],{},"sortBy","：",[1108,1766,1767,1773,1782],{},[1111,1768,1769,1772],{},[1176,1770,1771],{},"fun: (T) => K","：左边是被排序对象中的每一个元素，右边是返回的用于排序的值。",[1111,1774,1775,1778,1779,1781],{},[1176,1776,1777],{},"ascending","：决定排序后是升序还是降序，默认 ",[1176,1780,1680],{},"（升序）。",[1111,1783,1784,1787],{},[1176,1785,1786],{},"numPartitions","：决定排序后 RDD 的分区个数，默认与排序前相等。",[1101,1789,1790],{},[1115,1791,1792],{},"示例：",[1168,1794,1797],{"className":1795,"code":1796,"language":1173,"meta":1174},[1171],"\u002F\u002FMAP\n\u002F\u002F map：每个元素平方 将原 RDD\n\u002F\u002F每个数据项经 func 转化成新 RDD\nval square = data.map(x => x * x)\nval double = data.map(_.toDouble)   \u002F\u002F 使用通配符 _ 时，不能在函数中出现两次\n\n\u002F\u002F map vs flatMap\nval data = sc.parallelize(List(\"I am learning Spark\", \"I like Spark\"))\ndata.map(_.split(\" \"))\n\u002F\u002F Array[Array[String]] = Array(Array(I, am, learning, Spark), Array(I, like, Spark))\ndata.flatMap(_.split(\" \"))\n\u002F\u002F 对集合中每个元素做 map 操作后再扁平化\n\u002F\u002F Array[String] = Array(I, am, learning, Spark, I, like, Spark)\n\n\u002F\u002F mapPartitions：取出每个分区中大于 3 的值\nval rdd = sc.parallelize(1 to 10)\nval mapPartitionsRDD = rdd.mapPartitions(iter => iter.filter(_ > 3)) \u002F\u002F 对迭代器map\nmapPartitionsRDD.collect   \u002F\u002F Array[Int] = Array(4, 5, 6, 7, 8, 9, 10)\n\n\u002F\u002F sortBy：按元组第二个元素排序\n\u002F\u002F 对标准 RDD 进行排序\nval data = sc.parallelize(List((1, 3), (45, 2), (7, 6)))\nval sort_data = data.sortBy(_._2)         \u002F\u002F Array((45,2), (1,3), (7,6))  升序\nval sort_data = data.sortBy(_._2, false)  \u002F\u002F Array((7,6), (1,3), (45,2))  降序\n\n\u002F\u002F filter：过滤掉小于或等于 2 的元素\n\u002F\u002F 保留 func 返回值为 `true` 的元素，组成新 RDD\nval result = distData.filter(_ > 2)\n\n\u002F\u002F distinct：去重\n\u002F\u002F 针对重复元素，只保留一个\nval data = sc.parallelize(List(1, 2, 2, 3))\nval result = data.distinct()              \u002F\u002F Array[Int] = Array(1, 2, 3)\n\n\u002F\u002F REDUCE\n\n\nval rdd1 = sc.parallelize(Array(\"A\", \"B\", \"C\", \"D\"))\nval rdd2 = sc.parallelize(Array(\"C\", \"D\", \"F\", \"G\"))\n\n\u002F\u002F intersection：两个RDD的交集\nrdd1.intersection(rdd2).collect           \u002F\u002F Array(C, D)\n\n\u002F\u002F subtract：两个RDD的差集\nrdd1.subtract(rdd2).collect               \u002F\u002F Array(A, B)\n\n\u002F\u002F cartesian：两个RDD的笛卡尔积\nval rdd_1 = sc.makeRDD(List(1, 3, 5, 3))\nval rdd_2 = sc.makeRDD(List(2, 4, 5, 1))\nrdd_1.cartesian(rdd_2)\n\u002F\u002F Array((1,2),(1,4),(1,5),(1,1),(3,2),(3,4),(3,5),(3,1),(5,2),(5,4),(5,5),(5,1),(3,2),(3,4),(3,5),(3,1))\n",[1176,1798,1796],{"__ignoreMap":1174},[1129,1800,1802],{"id":1801},"键值对-rddpairrdd","键值对 RDD（PairRDD）",[1349,1804,1805],{},[1101,1806,1807,1808,1811],{},"键值对 RDD 由一组组键值对组成，PairRDD 提供了",[1115,1809,1810],{},"并行操作各个键或跨节点重新进行数据分组","的操作接口。",[1608,1813,1815],{"id":1814},"map-类算子逐元素变换","Map 类算子（逐元素变换）",[1241,1817,1818,1826],{},[1244,1819,1820],{},[1247,1821,1822,1824],{},[1250,1823,1620],{},[1250,1825,1574],{},[1266,1827,1828],{},[1247,1829,1830,1835],{},[1271,1831,1832],{},[1176,1833,1834],{},"mapValues(func)",[1271,1836,1837,1838,1841,1842,1845],{},"类似 map，只对 ",[1176,1839,1840],{},"(Key, Value)"," 中的 ",[1115,1843,1844],{},"Value"," 做 map，不处理 Key",[1608,1847,1849],{"id":1848},"reduce-类算子按键分组聚合","Reduce 类算子（按键分组\u002F聚合）",[1241,1851,1852,1860],{},[1244,1853,1854],{},[1247,1855,1856,1858],{},[1250,1857,1620],{},[1250,1859,1574],{},[1266,1861,1862,1880,1896],{},[1247,1863,1864,1869],{},[1271,1865,1866],{},[1176,1867,1868],{},"groupByKey([numPartitions])",[1271,1870,1871,1872,1875,1876,1879],{},"按键分组，在 ",[1176,1873,1874],{},"(K, V)"," 上调用时返回 ",[1176,1877,1878],{},"(K, Iterable\u003CV>)"," 组成的新 RDD",[1247,1881,1882,1887],{},[1271,1883,1884],{},[1176,1885,1886],{},"reduceByKey(func, [numPartitions])",[1271,1888,1889,1890,1892,1893],{},"按键分组后聚合，返回 ",[1176,1891,1874],{}," 新 RDD，func 必须是 ",[1176,1894,1895],{},"(V, V) => V",[1247,1897,1898,1903],{},[1271,1899,1900],{},[1176,1901,1902],{},"join(otherDataset, [numPartitions])",[1271,1904,1905],{},"把键值对数据中相同键的值整合起来",[1101,1907,1908],{},[1115,1909,1910],{},"创建与获取键值对：",[1168,1912,1915],{"className":1913,"code":1914,"language":1173,"meta":1174},[1171],"\u002F\u002F 创建键值对 RDD\nval rdd = sc.parallelize(List(\"a\", \"b\", \"c\"))\nval pairRDD = rdd.map((_, 1))    \u002F\u002F Array((a,1), (b,1), (c,1))\n\n\u002F\u002F 获取键 \u002F 值\nval keys = pairRDD.keys          \u002F\u002F Array(a, b, c)\nval values = pairRDD.values      \u002F\u002F Array(1, 1, 1)\n",[1176,1916,1914],{"__ignoreMap":1174},[1101,1918,1919],{},[1115,1920,1792],{},[1168,1922,1925],{"className":1923,"code":1924,"language":1173,"meta":1174},[1171],"\u002F\u002F mapValues：只对 Value 操作\n\u002F\u002F 类似 map，只对 `(Key, Value)` 中的 Value 做 map，不处理 Key\nval result = pairRDD.mapValues((_, 1))\n\u002F\u002F Array[(String, (Int, Int))] = Array((a,(1,1)), (b,(1,1)), (c,(1,1)))\n\n\u002F\u002F groupByKey：按键分组\n\u002F\u002F 按键分组，在 `(K, V)` 上调用时返回 `(K, Iterable\u003CV>)` 组成的新 RDD\nval rdd = sc.parallelize(List(\"a\", \"b\", \"c\", \"c\")).map((_, 1))\nval result = rdd.groupByKey()\n\u002F\u002F Array((a,CompactBuffer(1)), (b,CompactBuffer(1)), (c,CompactBuffer(1, 1)))\n\n\u002F\u002F reduceByKey：统计每个键出现的次数\nval result = rdd.reduceByKey((x, y) => x + y)\n\u002F\u002F Array((a,1), (b,1), (c,2))\n\n\u002F\u002F join：相同键的值整合，只保留两边都有的键  把键值对数据中相同键的值整合起来\nval rdd_1 = sc.parallelize(List((\"K1\",\"V1\"), (\"K2\",\"V2\"), (\"K4\",\"V4\")))\nval rdd_2 = sc.parallelize(List((\"K1\",\"W1\"), (\"K2\",\"W2\"), (\"K3\",\"W3\")))\nrdd_1.join(rdd_2)\n\u002F\u002F Array((K1,(V1,W1)), (K2,(V2,W2)))\n",[1176,1926,1924],{"__ignoreMap":1174},[1129,1928,1930],{"id":1929},"行动算子action返回其他数据类型","行动算子（Action，返回其他数据类型）",[1241,1932,1933,1941],{},[1244,1934,1935],{},[1247,1936,1937,1939],{},[1250,1938,1620],{},[1250,1940,1574],{},[1266,1942,1943,1956,1966,1976,1986],{},[1247,1944,1945,1950],{},[1271,1946,1947],{},[1176,1948,1949],{},"lookup(key)",[1271,1951,1952,1953,1955],{},"作用于 ",[1176,1954,1874],{}," 类型 RDD，返回指定 K 的所有 V 值",[1247,1957,1958,1963],{},[1271,1959,1960],{},[1176,1961,1962],{},"collect()",[1271,1964,1965],{},"返回 RDD 中所有的元素",[1247,1967,1968,1973],{},[1271,1969,1970],{},[1176,1971,1972],{},"count()",[1271,1974,1975],{},"返回 RDD 中元素个数",[1247,1977,1978,1983],{},[1271,1979,1980],{},[1176,1981,1982],{},"first()",[1271,1984,1985],{},"返回 RDD 中第一个元素",[1247,1987,1988,1993],{},[1271,1989,1990],{},[1176,1991,1992],{},"take(num)",[1271,1994,1995],{},"返回 RDD 中前 num 个元素",[1101,1997,1998],{},[1115,1999,1792],{},[1168,2001,2004],{"className":2002,"code":2003,"language":1173,"meta":1174},[1171],"\u002F\u002F lookup：返回指定键的所有值\nrdd.collect                      \u002F\u002F Array((a,1), (b,1), (c,1), (c,1))\nval result = rdd.lookup(\"c\")     \u002F\u002F Seq[Int] = WrappedArray(1, 1)\n\n\u002F\u002F collect \u002F count \u002F first \u002F take\nval data = sc.parallelize(List(1, 2, 3, 4))\ndata.collect()   \u002F\u002F Array(1, 2, 3, 4)\ndata.count()     \u002F\u002F Long = 4\ndata.first()     \u002F\u002F Int = 1\ndata.take(2)     \u002F\u002F Array(1, 2)\n",[1176,2005,2003],{"__ignoreMap":1174},[1512,2007],{},[1096,2009,2011],{"id":2010},"breeze-程序包","Breeze 程序包",[1101,2013,2014],{},"主要是向量与矩阵在运算符上的差异",[1101,2016,2017,2018],{},"Breeze程序包的调用：",[1176,2019,2020],{},"import breeze.linalg._",[1129,2022,2023],{"id":2023},"向量的创建与运算",[1241,2025,2026,2039],{},[1244,2027,2028],{},[1247,2029,2030,2033,2036],{},[1250,2031,2032],{},"操作",[1250,2034,2035],{},"语法",[1250,2037,2038],{},"示例结果",[1266,2040,2041,2053,2066,2079,2092,2109,2122,2135,2148,2161],{},[1247,2042,2043,2046,2051],{},[1271,2044,2045],{},"列向量（默认）",[1271,2047,2048],{},[1176,2049,2050],{},"DenseVector(1, 2, 3)",[1271,2052,2050],{},[1247,2054,2055,2058,2063],{},[1271,2056,2057],{},"行向量",[1271,2059,2060],{},[1176,2061,2062],{},"DenseVector(1, 2, 3).t",[1271,2064,2065],{},"Transpose(DenseVector(1, 2, 3))",[1247,2067,2068,2071,2076],{},[1271,2069,2070],{},"零向量（类型不可缺）",[1271,2072,2073],{},[1176,2074,2075],{},"DenseVector.zeros[Double](n)",[1271,2077,2078],{},"(0.0, 0.0, 0.0, 0.0, 0.0)",[1247,2080,2081,2084,2089],{},[1271,2082,2083],{},"全 1 向量（类型不可缺）",[1271,2085,2086],{},[1176,2087,2088],{},"DenseVector.ones[Double](n)",[1271,2090,2091],{},"(1.0, 1.0, 1.0, 1.0, 1.0)",[1247,2093,2094,2097,2106],{},[1271,2095,2096],{},"常数向量（类型可省）",[1271,2098,2099,2102,2103],{},[1176,2100,2101],{},"DenseVector.fill[Double](5, 2)"," 或 ",[1176,2104,2105],{},"DenseVector.fill(5){2.0}",[1271,2107,2108],{},"(2.0, 2.0, 2.0, 2.0, 2.0)",[1247,2110,2111,2114,2119],{},[1271,2112,2113],{},"整型固定步长",[1271,2115,2116],{},[1176,2117,2118],{},"DenseVector.range(1, 5)",[1271,2120,2121],{},"(1, 2, 3, 4)",[1247,2123,2124,2127,2132],{},[1271,2125,2126],{},"浮点固定步长",[1271,2128,2129],{},[1176,2130,2131],{},"DenseVector.rangeD(1, 5)",[1271,2133,2134],{},"(1.0, 2.0, 3.0, 4.0)",[1247,2136,2137,2140,2145],{},[1271,2138,2139],{},"固定长度",[1271,2141,2142],{},[1176,2143,2144],{},"linspace(1, 5, 7)",[1271,2146,2147],{},"(1.0, 1.67, 2.33, 3.0, 3.67, 4.33, 5.0)",[1247,2149,2150,2153,2158],{},[1271,2151,2152],{},"向量函数",[1271,2154,2155],{},[1176,2156,2157],{},"DenseVector.tabulate(Range\u002Fsize)(func)",[1271,2159,2160],{},"按下标生成",[1247,2162,2163,2166,2171],{},[1271,2164,2165],{},"按元素赋值",[1271,2167,2168],{},[1176,2169,2170],{},":=",[1271,2172,2173],{},"—",[1168,2175,2178],{"className":2176,"code":2177,"language":1173,"meta":1174},[1171],"\u002F\u002F 向量函数：按下标生成\nval a = DenseVector.tabulate(3)(i => i * i)      \u002F\u002F DenseVector(0, 1, 4)\nval a = DenseVector.tabulate(0 to 2)(i => i * i) \u002F\u002F DenseVector(0, 1, 4)\n\n\u002F\u002F 按元素赋值：将向量 a 的元素分别加上其所在位置的指标\nval a = DenseVector(Array(1.0, 2.0, 3.0))        \u002F\u002F DenseVector(1.0, 2.0, 3.0)\na := a + DenseVector((0 to a.length - 1).toArray.map(_.toDouble))\n\u002F\u002F DenseVector(1.0, 3.0, 5.0)\n",[1176,2179,2177],{"__ignoreMap":1174},[1129,2181,2182],{"id":2182},"矩阵的创建",[1241,2184,2185,2193],{},[1244,2186,2187],{},[1247,2188,2189,2191],{},[1250,2190,2032],{},[1250,2192,2035],{},[1266,2194,2195,2205,2215,2225,2235,2245,2255],{},[1247,2196,2197,2200],{},[1271,2198,2199],{},"零矩阵（类型不可缺）",[1271,2201,2202],{},[1176,2203,2204],{},"DenseMatrix.zeros[Double](n, m)",[1247,2206,2207,2210],{},[1271,2208,2209],{},"全 1 矩阵（类型不可缺）",[1271,2211,2212],{},[1176,2213,2214],{},"DenseMatrix.ones[Double](n, m)",[1247,2216,2217,2220],{},[1271,2218,2219],{},"单位矩阵（类型不可缺）",[1271,2221,2222],{},[1176,2223,2224],{},"DenseMatrix.eye[Double](size)",[1247,2226,2227,2230],{},[1271,2228,2229],{},"对角矩阵",[1271,2231,2232],{},[1176,2233,2234],{},"diag(DenseVector(a, b, c, …))",[1247,2236,2237,2240],{},[1271,2238,2239],{},"任意矩阵（不能显式指定类型）",[1271,2241,2242],{},[1176,2243,2244],{},"DenseMatrix((a,b,…),(c,d,…),…)",[1247,2246,2247,2250],{},[1271,2248,2249],{},"按数组建矩阵（列优先填充）",[1271,2251,2252],{},[1176,2253,2254],{},"new DenseMatrix(n, m, Array(a, b, c, …))",[1247,2256,2257,2260],{},[1271,2258,2259],{},"矩阵函数",[1271,2261,2262],{},[1176,2263,2264],{},"DenseMatrix.tabulate(n, m)(func)",[1168,2266,2269],{"className":2267,"code":2268,"language":1173,"meta":1174},[1171],"DenseMatrix((1.0, 2.0, 3.0), (4.0, 5.0, 6.0))\nnew DenseMatrix(2, 3, Array(1.0, 2.0, 3.0, 4.0, 5.0, 6.0))\n\u002F* 列优先填充：\n1.0  3.0  5.0\n2.0  4.0  6.0 *\u002F\n\nval Matrix = DenseMatrix.tabulate(3, 4){ (i, j) => i * i + j * j }\n\u002F*\n0  1  4  9\n1  2  5  10\n4  5  8  13 *\u002F\n",[1176,2270,2268],{"__ignoreMap":1174},[1129,2272,2273],{"id":2273},"向量与矩阵之间的操作",[1168,2275,2278],{"className":2276,"code":2277,"language":1173,"meta":1174},[1171],"Matrix.cols        \u002F\u002F 列数\nMatrix.rows        \u002F\u002F 行数\nVector.length      \u002F\u002F 向量长度\n\nMatrix.toDenseVector               \u002F\u002F 拉直矩阵\nVector.toDenseMatrix.reshape(n, m) \u002F\u002F 堆叠向量\nMatrix.reshape(n, m)               \u002F\u002F 矩阵变形\ndiag(Matrix)                       \u002F\u002F 取出对角元素\n",[1176,2279,2277],{"__ignoreMap":1174},[1168,2281,2284],{"className":2282,"code":2283,"language":1173,"meta":1174},[1171],"Matrix.toDenseVector  \u002F\u002F 拉直矩阵 DenseVector(0, 1, 4, 1, 2, 5, 4, 5, 8, 9, 10, 13)\n\n\u002F\u002F 堆叠向量\na.toDenseMatrix.reshape(3, 1)\n\u002F*\n1.0\n3.0\n5.0 *\u002F\n\n\u002F\u002F 矩阵变形\nMatrix.reshape(4, 3)\n\u002F*\n0  2  8\n1  5  9\n4  4  10\n1  5  13 *\u002F\n",[1176,2285,2283],{"__ignoreMap":1174},[1129,2287,2288],{"id":2288},"向量与矩阵的拼接",[1349,2290,2291],{},[1101,2292,2293,2294,1118],{},"向量是列向量，",[1115,2295,2296,2297,2300,2301,2304],{},"垂直拼接 ",[1176,2298,2299],{},"vertcat"," 后仍为向量，水平拼接 ",[1176,2302,2303],{},"horzcat"," 之后为矩阵",[1241,2306,2307,2315],{},[1244,2308,2309],{},[1247,2310,2311,2313],{},[1250,2312,2032],{},[1250,2314,2035],{},[1266,2316,2317,2327,2337,2347],{},[1247,2318,2319,2322],{},[1271,2320,2321],{},"矩阵水平合并",[1271,2323,2324],{},[1176,2325,2326],{},"DenseMatrix.horzcat(m1, m2)",[1247,2328,2329,2332],{},[1271,2330,2331],{},"矩阵垂直合并",[1271,2333,2334],{},[1176,2335,2336],{},"DenseMatrix.vertcat(m1, m2)",[1247,2338,2339,2342],{},[1271,2340,2341],{},"向量水平合并（成矩阵）",[1271,2343,2344],{},[1176,2345,2346],{},"DenseVector.horzcat(v1, v2)",[1247,2348,2349,2352],{},[1271,2350,2351],{},"向量垂直合并（仍为向量）",[1271,2353,2354],{},[1176,2355,2356],{},"DenseVector.vertcat(v1, v2)",[1168,2358,2361],{"className":2359,"code":2360,"language":1173,"meta":1174},[1171],"val matrix1 = DenseMatrix.ones[Double](3, 3)\nval matrix2 = DenseMatrix.eye[Double](3)\n\nDenseMatrix.horzcat(matrix1, matrix2)\n\u002F*\n1.0  1.0  1.0  1.0  0.0  0.0\n1.0  1.0  1.0  0.0  1.0  0.0\n1.0  1.0  1.0  0.0  0.0  1.0 *\u002F\n\nDenseMatrix.vertcat(matrix1, matrix2)\n\u002F*\n1.0  1.0  1.0\n1.0  1.0  1.0\n1.0  1.0  1.0\n1.0  0.0  0.0\n0.0  1.0  0.0\n0.0  0.0  1.0 *\u002F\n\nval vec1 = DenseVector.ones[Double](3)\nval vec2 = DenseVector.rangeD(0, 3)\nDenseVector.horzcat(vec1, vec2)   \u002F\u002F 成矩阵 3×2\nDenseVector.vertcat(vec1, vec2)   \u002F\u002F DenseVector(1.0, 1.0, 1.0, 0.0, 1.0, 2.0)\n",[1176,2362,2360],{"__ignoreMap":1174},[1129,2364,2366],{"id":2365},"数值计算方法向量与矩阵的区别","数值计算方法（向量与矩阵的区别）",[1101,2368,2369,1764],{},[1115,2370,2371],{},"核心区别",[1108,2373,2374,2387],{},[1111,2375,2376,2377,1118],{},"按元素相加减乘除：",[1115,2378,2379,2380,2383,2384,2386],{},"向量可以使用 ",[1176,2381,2382],{},"*","；而在矩阵中 ",[1176,2385,2382],{}," 代表点乘（矩阵乘法）",[1111,2388,2389,2390,1118],{},"按元素比较大小：",[1115,2391,2392,2393,2396,2397],{},"向量返回以 ",[1176,2394,2395],{},"BitVector"," 形式存储的满足条件的下标；矩阵返回 ",[1176,2398,2399],{},"DenseMatrix[Boolean]",[1241,2401,2402,2414],{},[1244,2403,2404],{},[1247,2405,2406,2408,2411],{},[1250,2407,2032],{},[1250,2409,2410],{},"向量",[1250,2412,2413],{},"矩阵",[1266,2415,2416,2441,2461,2475,2491],{},[1247,2417,2418,2421,2429],{},[1271,2419,2420],{},"按元素加减乘除",[1271,2422,2423,2102,2426],{},[1176,2424,2425],{},"+:+ -:- *:* \u002F:\u002F",[1176,2427,2428],{},"+ - * \u002F",[1271,2430,2431,2102,2433,1297,2436,1301],{},[1176,2432,2425],{},[1176,2434,2435],{},"+ - \u002F",[1115,2437,2438,2440],{},[1176,2439,2382],{}," 是点乘，不是按元素乘",[1247,2442,2443,2446,2452],{},[1271,2444,2445],{},"按元素比较大小",[1271,2447,2448,2451],{},[1176,2449,2450],{},"\u003C:\u003C >:> :=="," → BitVector",[1271,2453,2454,2456,2457],{},[1176,2455,2450],{}," → DenseMatrix",[2458,2459,2460],"span",{},"Boolean",[1247,2462,2463,2466,2471],{},[1271,2464,2465],{},"判断整体是否相等",[1271,2467,2468],{},[1176,2469,2470],{},"a == b",[1271,2472,2473],{},[1176,2474,2470],{},[1247,2476,2477,2480,2488],{},[1271,2478,2479],{},"按元素自加自减自乘自除",[1271,2481,2482,2102,2485],{},[1176,2483,2484],{},":+= :-= :*= :\u002F=",[1176,2486,2487],{},"+= -= *= \u002F=",[1271,2489,2490],{},"同左",[1247,2492,2493,2496,2505],{},[1271,2494,2495],{},"乘积 \u002F 乘法",[1271,2497,2498,2499,2102,2502],{},"内积：",[1176,2500,2501],{},"a.t * b",[1176,2503,2504],{},"a dot b",[1271,2506,2507,2508,1297,2511,1301],{},"矩阵乘法：",[1176,2509,2510],{},"a * b",[1115,2512,2513,2516],{},[1176,2514,2515],{},"dot"," 不能用于矩阵",[1168,2518,2521],{"className":2519,"code":2520,"language":1173,"meta":1174},[1171],"val vec1 = DenseVector.ones[Double](3)   \u002F\u002F (1.0, 1.0, 1.0)\nval vec2 = DenseVector.rangeD(1, 4)      \u002F\u002F (1.0, 2.0, 3.0)\n\nvec1 >:> vec2   \u002F\u002F BitVector()   （逐元素比较，返回满足的下标）\nvec1 :== vec2   \u002F\u002F BitVector(0)\nvec1 == vec2    \u002F\u002F false\n\nvec1.t * vec2   \u002F\u002F Double = 6.0  （内积）\nvec1 dot vec2   \u002F\u002F Double = 6.0\nvec1 * vec2     \u002F\u002F DenseVector(1.0, 2.0, 3.0)  （向量按元素乘）\n\nany(a)   \u002F\u002F 任意元素为真则为真\nall(a)   \u002F\u002F 所有元素为真才为真\n\n\u002F\u002F 矩阵：\u003C:\u003C 返回 Boolean 矩阵，* 是矩阵乘法\nmatrix2 \u003C:\u003C matrix1\n\u002F*\nfalse  false  false\nfalse  true   false\nfalse  false  true *\u002F\nmatrix1 * matrix2   \u002F\u002F 矩阵乘法\n",[1176,2522,2520],{"__ignoreMap":1174},[1129,2524,2525],{"id":2525},"索引与切片",[1168,2527,2530],{"className":2528,"code":2529,"language":1173,"meta":1174},[1171],"\u002F\u002F -1 代表最后一个元素；:: 代表所有元素\nMatrix(i, j)              Vec(i)                 \u002F\u002F 提取单个元素\nMatrix(i to j, m to n)    Vec(i to j)            \u002F\u002F 提取多个元素（含尾）\nMatrix(i until j, m to n) Vec(i until j [by seq]) \u002F\u002F until 不含尾\nVector.slice(start, end)  \u002F\u002F 包括 start，不包括 end\n\nMatrix(1, ::)   \u002F\u002F Transpose(DenseVector(2.0, 4.0, 6.0))  取第 1 行\nMatrix(::, 1)   \u002F\u002F DenseVector(3.0, 4.0)                  取第 1 列\nvec.slice(0, 3) \u002F\u002F DenseVector(1.0, 2.0, 3.0)\n",[1176,2531,2529],{"__ignoreMap":1174},[1129,2533,2534],{"id":2534},"线性代数方法",[1241,2536,2537,2546],{},[1244,2538,2539],{},[1247,2540,2541,2543],{},[1250,2542,2032],{},[1250,2544,2545],{},"函数",[1266,2547,2548,2558,2568,2578,2588,2602,2612],{},[1247,2549,2550,2553],{},[1271,2551,2552],{},"行列式",[1271,2554,2555],{},[1176,2556,2557],{},"det(Matrix)",[1247,2559,2560,2563],{},[1271,2561,2562],{},"矩阵的逆",[1271,2564,2565],{},[1176,2566,2567],{},"inv(Matrix)",[1247,2569,2570,2573],{},[1271,2571,2572],{},"Moore-Penrose 广义逆",[1271,2574,2575],{},[1176,2576,2577],{},"pinv(Matrix)",[1247,2579,2580,2583],{},[1271,2581,2582],{},"Frobenius 范数",[1271,2584,2585],{},[1176,2586,2587],{},"norm(Vec)",[1247,2589,2590,2593],{},[1271,2591,2592],{},"特征值分解",[1271,2594,2595,2598,2599],{},[1176,2596,2597],{},"eig(Matrix)","，返回",[1115,2600,2601],{},"特征值实部、特征值虚部、对应特征向量",[1247,2603,2604,2607],{},[1271,2605,2606],{},"奇异值分解",[1271,2608,2609],{},[1176,2610,2611],{},"svd(Matrix)",[1247,2613,2614,2617],{},[1271,2615,2616],{},"矩阵的秩",[1271,2618,2619],{},[1176,2620,2621],{},"rank(Matrix)",[1168,2623,2626],{"className":2624,"code":2625,"language":1173,"meta":1174},[1171],"val matrix1 = diag(DenseVector[Double](1, 2, 3))\neig(matrix1)\n\u002F\u002F Eig(特征值实部, 特征值虚部, 特征向量矩阵)\n\nval svd.SVD(u, s, v) = svd(matrix1)\n\u002F\u002F u: 左奇异向量矩阵；s: 奇异值向量 DenseVector(3.0, 2.0, 1.0)；v: 右奇异向量矩阵\n",[1176,2627,2625],{"__ignoreMap":1174},[1129,2629,2630],{"id":2630},"求和运算与常用数学计算",[1168,2632,2635],{"className":2633,"code":2634,"language":1173,"meta":1174},[1171],"sum(Matrix)          \u002F\u002F 所有元素求和         → 21.0\nsum(Matrix(*, ::))   \u002F\u002F 对所有行求和         → DenseVector(9.0, 12.0)\nVec.reduce((x, y) => x + y)   \u002F\u002F 向量可用 reduce 代替 sum\n\n\u002F\u002F 数学计算包\nimport breeze.numerics._\n\u002F\u002F 提供：sin\u002Fsinh\u002Fasin\u002Fasinh、cos\u002Fcosh\u002Facos\u002Facosh、tan\u002Ftanh\u002Fatan\u002Fatanh、\n\u002F\u002F       log、exp、log10、sqrt、pow\n\n\u002F\u002F 统计计算包\nimport breeze.stats._\nbreeze.stats.mean(Vec)        \u002F\u002F 求均值，也可用 sum(Vec)\u002FVec.length 代替\n",[1176,2636,2634],{"__ignoreMap":1174},[1129,2638,2639],{"id":2639},"常用分布",[1101,2641,2642,2643],{},"调用：",[1176,2644,2645],{},"import breeze.stats.distributions._",[1241,2647,2648,2658],{},[1244,2649,2650],{},[1247,2651,2652,2655],{},[1250,2653,2654],{},"分布",[1250,2656,2657],{},"构造",[1266,2659,2660,2674,2687,2697,2707,2720,2730,2740,2750,2759],{},[1247,2661,2662,2665],{},[1271,2663,2664],{},"*伯努利分布",[1271,2666,2667,2670,2671],{},[1176,2668,2669],{},"Bernoulli(p)"," \u002F ",[1176,2672,2673],{},"new Bernoulli(p)",[1247,2675,2676,2679],{},[1271,2677,2678],{},"Beta 分布",[1271,2680,2681,2670,2684],{},[1176,2682,2683],{},"Beta(a, b)",[1176,2685,2686],{},"new Beta(a, b)",[1247,2688,2689,2692],{},[1271,2690,2691],{},"卡方分布",[1271,2693,2694],{},[1176,2695,2696],{},"new ChiSquared(k)",[1247,2698,2699,2702],{},[1271,2700,2701],{},"指数分布",[1271,2703,2704],{},[1176,2705,2706],{},"new Exponential(r)",[1247,2708,2709,2712],{},[1271,2710,2711],{},"F 分布",[1271,2713,2714,2670,2717],{},[1176,2715,2716],{},"F(a, b)",[1176,2718,2719],{},"new FDistributions(a, b)",[1247,2721,2722,2725],{},[1271,2723,2724],{},"伽马分布",[1271,2726,2727],{},[1176,2728,2729],{},"new Gamma(a, b)",[1247,2731,2732,2735],{},[1271,2733,2734],{},"*正态分布",[1271,2736,2737],{},[1176,2738,2739],{},"new Gaussian()",[1247,2741,2742,2745],{},[1271,2743,2744],{},"多元正态分布",[1271,2746,2747],{},[1176,2748,2749],{},"new MultivariateGaussian()",[1247,2751,2752,2754],{},[1271,2753,108],{},[1271,2755,2756],{},[1176,2757,2758],{},"new Poisson()",[1247,2760,2761,2764],{},[1271,2762,2763],{},"*均匀分布",[1271,2765,2766],{},[1176,2767,2768],{},"new Uniform(a, b)",[1168,2770,2773],{"className":2771,"code":2772,"language":1173,"meta":1174},[1171],"\u002F\u002F 产生随机数 \u002F 密度与分布计算\nval RandNumbers = new DistributionName(param).sample(size)\nDistributionName.pdf()    \u002F\u002F 计算密度\nDistributionName.cdf()    \u002F\u002F 计算分布\n",[1176,2774,2772],{"__ignoreMap":1174},[1129,2776,2778],{"id":2777},"基于-breeze-包的分布式计算","基于 Breeze 包的分布式计算",[1168,2780,2783],{"className":2781,"code":2782,"language":1173,"meta":1174},[1171],"val Distribution = DistributionName(Parameter)\nval RandNumbers = DenseMatrix.rand(n, m, Distribution)\nval rdd = sc.parallelize(RandNumbers)\nval rdd = sc.parallelize(Array(Vector, Vector, …))\n",[1176,2784,2782],{"__ignoreMap":1174},[1129,2786,2788],{"id":2787},"基于-mllib-机器学习算法包的分布式计算","基于 MLlib （机器学习算法包）的分布式计算",[1101,2790,2791],{},[1115,2792,2793],{},"向量与矩阵创建：",[1168,2795,2798],{"className":2796,"code":2797,"language":1173,"meta":1174},[1171],"import org.apache.spark.mllib.linalg.{Vector, Vectors}\nimport org.apache.spark.mllib.linalg.{Matrix, Matrices}\n\n\u002F\u002F 稠密向量\nval dv = Vectors.dense(1.0, 2.0, 3.0)                      \u002F\u002F [1.0,2.0,3.0]\n\u002F\u002F 稀疏向量（两种写法）\nval sv1 = Vectors.sparse(3, Array(0, 2), Array(1.0, 3.0)) \u002F\u002F (向量大小, 非零位置, 非零数值)\nval sv2 = Vectors.sparse(3, Seq((0, 1.0), (2, 3.0)))      \u002F\u002F (3, [0,2], [1.0,3.0])\n\n\u002F\u002F 稠密矩阵（列优先填充）\nval dm = Matrices.dense(4, 3, Array(1.0,2.0,3.0,4.0,5.0,6.0,7.0,8.0,9.0,10.0,11.0,12.0))\n\u002F*\n1.0  5.0  9.0\n2.0  6.0  10.0\n3.0  7.0  11.0\n4.0  8.0  12.0 *\u002F\n",[1176,2799,2797],{"__ignoreMap":1174},[1101,2801,2802],{},[1115,2803,2804],{},"分布式矩阵：",[1168,2806,2809],{"className":2807,"code":2808,"language":1173,"meta":1174},[1171],"import org.apache.spark.mllib.linalg.distributed._\n\n\u002F\u002F 1. 行矩阵 RowMatrix\nval data = Array(\n  Vectors.sparse(5, Seq((1, 1.0), (3, 7.0))),\n  Vectors.dense(2.0, 0.0, 3.0, 4.0, 5.0),\n  Vectors.dense(4.0, 0.0, 0.0, 6.0, 7.0))\nval MAT = new RowMatrix(sc.parallelize(data))\n\n\u002F\u002F 2. 索引行矩阵 IndexedRowMatrix\nval data = Array(\n  IndexedRow(1, Vectors.sparse(5, Seq((1, 1.0), (3, 7.0)))),\n  IndexedRow(2, Vectors.dense(2.0, 0.0, 3.0, 4.0, 5.0)),\n  IndexedRow(3, Vectors.dense(4.0, 0.0, 0.0, 6.0, 7.0)))\nval MAT = new IndexedRowMatrix(sc.parallelize(data))\n\n\u002F\u002F 3. 坐标矩阵 CoordinateMatrix\nval ent1 = new MatrixEntry(0, 1, 0.5)\nval ent2 = new MatrixEntry(2, 2, 1.8)\nval CorrMat = new CoordinateMatrix(sc.parallelize(Array(ent1, ent2)))\n\n\u002F\u002F 4. 分块矩阵 BlockMatrix\nval m1 = Matrices.dense(2, 2, Array(1.0, 2.0, 3.0, 4.0))\nval m2 = Matrices.dense(2, 2, Array(5.0, 6.0, 7.0, 8.0))\nval blocks = sc.parallelize(Seq(((0, 0), m1), ((0, 1), m2)))\nval MAT = new BlockMatrix(blocks, 2, 2)\n",[1176,2810,2808],{"__ignoreMap":1174},[1512,2812],{},[1096,2814,2815],{"id":2815},"总览",[2817,2818,2819,2822,2830,2843,2856,2862,2877,2889,2892],"ol",{},[1111,2820,2821],{},"元组、数组、列表三者的区别？下标各从几开始？\n元组存不同类型、._1 取值下标从 1；数组相同类型定长、(0) 取值下标从 0；列表相同类型、(0) 取值下标从 0。",[1111,2823,2824,2826,2827,2829],{},[1176,2825,1231],{}," 与 ",[1176,2828,1235],{}," 的区别？不写类型时类型怎么确定？\nval 不可变、var 可变；不写类型时由初始值自动推断。",[1111,2831,2832,2835,2836,2839,2840,2842],{},[1176,2833,2834],{},"s\"...\""," 和 ",[1176,2837,2838],{},"f\"...\""," 内插的区别？",[1176,2841,1381],{}," 里两个数字含义？\ns 做变量内插（${} 内可算式）、f 做格式化；%3.2f 中 3 是最短总长度（含小数点），2 是保留小数位数。",[1111,2844,2845,2826,2847,2849,2850,2826,2852,2855],{},[1176,2846,1442],{},[1176,2848,1446],{}," 的区别？",[1176,2851,1450],{},[1176,2853,2854],{},"while"," 的区别？\nto 含尾、until 不含尾；while 先判断可能不执行，do\u002Fwhile 尾部判断至少执行一次。",[1111,2857,2858,2861],{},[1115,2859,2860],{},"转化算子和行动算子怎么区分？"," 各举 3 个例子。\n看返回值：转化返回 RDD、行动返回其他类型；转化如 map\u002Ffilter\u002FflatMap，行动如 reduce\u002Fcollect\u002Fcount。",[1111,2863,2864,2826,2867,2849,2870,2826,2873,2876],{},[1176,2865,2866],{},"map",[1176,2868,2869],{},"flatMap",[1176,2871,2872],{},"reduceByKey",[1176,2874,2875],{},"groupByKey"," 的区别？\nmap 一对一、flatMap 变换后再扁平化；reduceByKey 分组同时聚合（返回 (K,V)），groupByKey 只分组不聚合（返回 (K,Iterable)）",[1111,2878,2879,2880,2882,2883,2885,2886,2888],{},"Breeze 中向量的 ",[1176,2881,2382],{}," 和矩阵的 ",[1176,2884,2382],{}," 分别是什么运算？",[1176,2887,2515],{}," 能用于矩阵吗？\n向量 _ 是按元素乘、矩阵 _ 是矩阵乘法；dot 不能用于矩阵，只能用于向量求内积",[1111,2890,2891],{},"特征值分解、奇异值分解、求逆、广义逆分别用哪个函数？\n特征值分解 eig、奇异值分解 svd、求逆 inv、广义逆 pinv",[1111,2893,2894,2895,2897,2898,2897,2900,2902],{},"说明 ",[1176,2896,1497],{},"、",[1176,2899,1503],{},[1176,2901,1509],{}," 三个符号各自的含义\n::: 拼接两个列表；:: 在列表头部插入元素（或反向拆解列表）；_ 万能占位符（通配、忽略、简写参数等）—— 三条都对。",[1129,2904,2906],{"id":2905},"scala-语法","Scala 语法",[1241,2908,2909,2919],{},[1244,2910,2911],{},[1247,2912,2913,2916],{},[1250,2914,2915],{},"项",[1250,2917,2918],{},"记忆点",[1266,2920,2921,2929,2940,2953,2966,2976,2991,3002,3017,3029],{},[1247,2922,2923,2926],{},[1271,2924,2925],{},"整数类型",[1271,2927,2928],{},"Byte(8)\u002FShort(16)\u002FInt(32)\u002FLong(64) 位",[1247,2930,2931,2937],{},[1271,2932,2933,2670,2935],{},[1176,2934,1231],{},[1176,2936,1235],{},[1271,2938,2939],{},"val 不可变，var 可变；类型可省，由初值推断",[1247,2941,2942,2944],{},[1271,2943,1273],{},[1271,2945,2946,2947,2949,2950],{},"存不同类型，",[1176,2948,1356],{}," 取值，",[1115,2951,2952],{},"下标从 1",[1247,2954,2955,2957],{},[1271,2956,1306],{},[1271,2958,2959,2960,2949,2963],{},"相同类型定长，",[1176,2961,2962],{},"(0)",[1115,2964,2965],{},"下标从 0",[1247,2967,2968,2970],{},[1271,2969,1332],{},[1271,2971,2972,2973,2975],{},"相同类型，",[1176,2974,2962],{}," 取值，下标从 0",[1247,2977,2978,2984],{},[1271,2979,2980,2981],{},"内插 ",[1176,2982,2983],{},"s\"$x\"",[1271,2985,2986,2987,2990],{},"变量替换；",[1176,2988,2989],{},"${...}"," 内可算式",[1247,2992,2993,2999],{},[1271,2994,2995,2996],{},"格式化 ",[1176,2997,2998],{},"f\"$x%3.2f\"",[1271,3000,3001],{},"3=最短长度(含点)，2=小数位；f 浮点 d 整数",[1247,3003,3004,3010],{},[1271,3005,3006,2670,3008],{},[1176,3007,1442],{},[1176,3009,1446],{},[1271,3011,3012,3013,3016],{},"to 含尾，until 不含尾；",[1176,3014,3015],{},"by"," 步长",[1247,3018,3019,3026],{},[1271,3020,3021,2670,3023],{},[1176,3022,2854],{},[1176,3024,3025],{},"do-while",[1271,3027,3028],{},"do-while 尾部判断，至少执行一次",[1247,3030,3031,3039],{},[1271,3032,3033,2670,3035,2670,3037],{},[1176,3034,1497],{},[1176,3036,1503],{},[1176,3038,1509],{},[1271,3040,3041],{},"List 连接 \u002F 元素接 List \u002F 通配符",[1129,3043,1562],{"id":3044},"创建-rdd-1",[1241,3046,3047,3056],{},[1244,3048,3049],{},[1247,3050,3051,3054],{},[1250,3052,3053],{},"API",[1250,3055,1574],{},[1266,3057,3058,3068,3078],{},[1247,3059,3060,3065],{},[1271,3061,3062],{},[1176,3063,3064],{},"sc.textFile(path)",[1271,3066,3067],{},"读取外部数据集创建",[1247,3069,3070,3075],{},[1271,3071,3072],{},[1176,3073,3074],{},"sc.parallelize(coll)",[1271,3076,3077],{},"分发对象集合创建",[1247,3079,3080,3085],{},[1271,3081,3082],{},[1176,3083,3084],{},"sc.makeRDD(coll)",[1271,3086,3087],{},"同 parallelize",[1608,3089,1606],{"id":3090},"转化算子transformation返回-rdd-1",[1241,3092,3093,3101],{},[1244,3094,3095],{},[1247,3096,3097,3099],{},[1250,3098,3053],{},[1250,3100,1574],{},[1266,3102,3103,3112,3122,3131,3140,3149,3158,3168,3178],{},[1247,3104,3105,3109],{},[1271,3106,3107],{},[1176,3108,1631],{},[1271,3110,3111],{},"逐元素变换，不改变分区数",[1247,3113,3114,3119],{},[1271,3115,3116],{},[1176,3117,3118],{},"flatMap(func)",[1271,3120,3121],{},"map 后再扁平化",[1247,3123,3124,3128],{},[1271,3125,3126],{},[1176,3127,1657],{},[1271,3129,3130],{},"对每个分区的 Iterator 操作，不改变分区数",[1247,3132,3133,3137],{},[1271,3134,3135],{},[1176,3136,1674],{},[1271,3138,3139],{},"保留 func 返回 true 的元素",[1247,3141,3142,3146],{},[1271,3143,3144],{},[1176,3145,1688],{},[1271,3147,3148],{},"排序，默认升序",[1247,3150,3151,3155],{},[1271,3152,3153],{},[1176,3154,1698],{},[1271,3156,3157],{},"去重",[1247,3159,3160,3165],{},[1271,3161,3162],{},[1176,3163,3164],{},"intersection(other)",[1271,3166,3167],{},"两 RDD 交集",[1247,3169,3170,3175],{},[1271,3171,3172],{},[1176,3173,3174],{},"subtract(other)",[1271,3176,3177],{},"两 RDD 差集",[1247,3179,3180,3185],{},[1271,3181,3182],{},[1176,3183,3184],{},"cartesian(other)",[1271,3186,3187],{},"两 RDD 笛卡尔积",[1608,3189,1802],{"id":3190},"键值对-rddpairrdd-1",[1241,3192,3193,3201],{},[1244,3194,3195],{},[1247,3196,3197,3199],{},[1250,3198,3053],{},[1250,3200,1574],{},[1266,3202,3203,3213,3223,3233,3242,3253,3268],{},[1247,3204,3205,3210],{},[1271,3206,3207],{},[1176,3208,3209],{},"map((_, 1))",[1271,3211,3212],{},"构造键值对",[1247,3214,3215,3220],{},[1271,3216,3217],{},[1176,3218,3219],{},".keys",[1271,3221,3222],{},"取所有键",[1247,3224,3225,3230],{},[1271,3226,3227],{},[1176,3228,3229],{},".values",[1271,3231,3232],{},"取所有值",[1247,3234,3235,3239],{},[1271,3236,3237],{},[1176,3238,1834],{},[1271,3240,3241],{},"只对 Value 做 map，不动 Key",[1247,3243,3244,3248],{},[1271,3245,3246],{},[1176,3247,1868],{},[1271,3249,3250,3251],{},"按键分组 → ",[1176,3252,1878],{},[1247,3254,3255,3259],{},[1271,3256,3257],{},[1176,3258,1886],{},[1271,3260,3261,3262,3265,3266],{},"分组同时聚合，func 为 ",[1176,3263,3264],{},"(V,V)=>V"," → ",[1176,3267,1874],{},[1247,3269,3270,3275],{},[1271,3271,3272],{},[1176,3273,3274],{},"join(other, [numPartitions])",[1271,3276,3277,3278,3281],{},"相同键整合 → ",[1176,3279,3280],{},"(K, (V, W))","，只保留公共键",[1608,3283,3285],{"id":3284},"行动算子action返回非-rdd","行动算子（Action，返回非 RDD）",[1241,3287,3288,3296],{},[1244,3289,3290],{},[1247,3291,3292,3294],{},[1250,3293,3053],{},[1250,3295,1574],{},[1266,3297,3298,3308,3317,3326,3335,3344,3353],{},[1247,3299,3300,3305],{},[1271,3301,3302],{},[1176,3303,3304],{},"reduce(func)",[1271,3306,3307],{},"汇总返回结果",[1247,3309,3310,3314],{},[1271,3311,3312],{},[1176,3313,1962],{},[1271,3315,3316],{},"返回所有元素",[1247,3318,3319,3323],{},[1271,3320,3321],{},[1176,3322,1972],{},[1271,3324,3325],{},"元素个数",[1247,3327,3328,3332],{},[1271,3329,3330],{},[1176,3331,1982],{},[1271,3333,3334],{},"第一个元素",[1247,3336,3337,3341],{},[1271,3338,3339],{},[1176,3340,1992],{},[1271,3342,3343],{},"前 num 个元素",[1247,3345,3346,3350],{},[1271,3347,3348],{},[1176,3349,1949],{},[1271,3351,3352],{},"作用于 (K,V)，返回指定 K 的所有 V",[1247,3354,3355,3360],{},[1271,3356,3357],{},[1176,3358,3359],{},"foreach(func)",[1271,3361,3362],{},"逐元素执行（如 println）",[1512,3364],{},[1129,3366,3368],{"id":3367},"breeze-向量与矩阵","Breeze 向量与矩阵",[1101,3370,3371,1764,3374],{},[1115,3372,3373],{},"调用",[1176,3375,2020],{},[1608,3377,3378],{"id":3378},"向量创建",[1241,3380,3381,3390],{},[1244,3382,3383],{},[1247,3384,3385,3387],{},[1250,3386,3053],{},[1250,3388,3389],{},"结果",[1266,3391,3392,3400,3409,3417,3425,3438,3447,3456,3466,3474],{},[1247,3393,3394,3398],{},[1271,3395,3396],{},[1176,3397,2050],{},[1271,3399,2045],{},[1247,3401,3402,3406],{},[1271,3403,3404],{},[1176,3405,2062],{},[1271,3407,3408],{},"行向量（转置）",[1247,3410,3411,3415],{},[1271,3412,3413],{},[1176,3414,2075],{},[1271,3416,2070],{},[1247,3418,3419,3423],{},[1271,3420,3421],{},[1176,3422,2088],{},[1271,3424,2083],{},[1247,3426,3427,3435],{},[1271,3428,3429,2670,3432],{},[1176,3430,3431],{},"DenseVector.fill[Double](size, num)",[1176,3433,3434],{},"DenseVector.fill(size){num}",[1271,3436,3437],{},"常数向量",[1247,3439,3440,3445],{},[1271,3441,3442],{},[1176,3443,3444],{},"DenseVector.range(start, stop, [seq])",[1271,3446,2113],{},[1247,3448,3449,3454],{},[1271,3450,3451],{},[1176,3452,3453],{},"DenseVector.rangeD(start, stop, [seq])",[1271,3455,2126],{},[1247,3457,3458,3463],{},[1271,3459,3460],{},[1176,3461,3462],{},"linspace(start, stop, size)",[1271,3464,3465],{},"固定长度均分",[1247,3467,3468,3472],{},[1271,3469,3470],{},[1176,3471,2157],{},[1271,3473,2160],{},[1247,3475,3476,3480],{},[1271,3477,3478],{},[1176,3479,2170],{},[1271,3481,2165],{},[1608,3483,3484],{"id":3484},"矩阵创建",[1241,3486,3487,3495],{},[1244,3488,3489],{},[1247,3490,3491,3493],{},[1250,3492,3053],{},[1250,3494,3389],{},[1266,3496,3497,3506,3515,3524,3533,3542,3552,3560],{},[1247,3498,3499,3503],{},[1271,3500,3501],{},[1176,3502,2204],{},[1271,3504,3505],{},"零矩阵",[1247,3507,3508,3512],{},[1271,3509,3510],{},[1176,3511,2214],{},[1271,3513,3514],{},"全 1 矩阵",[1247,3516,3517,3521],{},[1271,3518,3519],{},[1176,3520,2224],{},[1271,3522,3523],{},"单位矩阵",[1247,3525,3526,3531],{},[1271,3527,3528],{},[1176,3529,3530],{},"diag(DenseVector(...))",[1271,3532,2229],{},[1247,3534,3535,3540],{},[1271,3536,3537],{},[1176,3538,3539],{},"DenseMatrix((a,b,…),(c,d,…))",[1271,3541,2239],{},[1247,3543,3544,3549],{},[1271,3545,3546],{},[1176,3547,3548],{},"new DenseMatrix(n, m, Array(...))",[1271,3550,3551],{},"按数组建（列优先填充）",[1247,3553,3554,3558],{},[1271,3555,3556],{},[1176,3557,2264],{},[1271,3559,2259],{},[1247,3561,3562,3567],{},[1271,3563,3564],{},[1176,3565,3566],{},"DenseMatrix.rand(n, m, Distribution)",[1271,3568,3569],{},"随机矩阵",[1608,3571,3572],{"id":3572},"向量矩阵互操作",[1241,3574,3575,3583],{},[1244,3576,3577],{},[1247,3578,3579,3581],{},[1250,3580,3053],{},[1250,3582,1574],{},[1266,3584,3585,3598,3608,3618,3628,3638],{},[1247,3586,3587,3595],{},[1271,3588,3589,2670,3592],{},[1176,3590,3591],{},"Matrix.cols",[1176,3593,3594],{},"Matrix.rows",[1271,3596,3597],{},"列数 \u002F 行数",[1247,3599,3600,3605],{},[1271,3601,3602],{},[1176,3603,3604],{},"Vector.length",[1271,3606,3607],{},"向量长度",[1247,3609,3610,3615],{},[1271,3611,3612],{},[1176,3613,3614],{},"Matrix.toDenseVector",[1271,3616,3617],{},"拉直矩阵",[1247,3619,3620,3625],{},[1271,3621,3622],{},[1176,3623,3624],{},"Vector.toDenseMatrix.reshape(n, m)",[1271,3626,3627],{},"堆叠向量",[1247,3629,3630,3635],{},[1271,3631,3632],{},[1176,3633,3634],{},"Matrix.reshape(n, m)",[1271,3636,3637],{},"矩阵变形",[1247,3639,3640,3645],{},[1271,3641,3642],{},[1176,3643,3644],{},"diag(Matrix)",[1271,3646,3647],{},"取出对角元素",[1608,3649,3650],{"id":3650},"拼接",[1241,3652,3653,3661],{},[1244,3654,3655],{},[1247,3656,3657,3659],{},[1250,3658,3053],{},[1250,3660,3389],{},[1266,3662,3663,3671,3679,3688],{},[1247,3664,3665,3669],{},[1271,3666,3667],{},[1176,3668,2326],{},[1271,3670,2321],{},[1247,3672,3673,3677],{},[1271,3674,3675],{},[1176,3676,2336],{},[1271,3678,2331],{},[1247,3680,3681,3685],{},[1271,3682,3683],{},[1176,3684,2346],{},[1271,3686,3687],{},"向量水平合并 → 矩阵",[1247,3689,3690,3694],{},[1271,3691,3692],{},[1176,3693,2356],{},[1271,3695,3696],{},"向量垂直合并 → 仍为向量",[1608,3698,3699],{"id":3699},"数值运算符",[1241,3701,3702,3712],{},[1244,3703,3704],{},[1247,3705,3706,3708,3710],{},[1250,3707,2032],{},[1250,3709,2410],{},[1250,3711,2413],{},[1266,3713,3714,3733,3748,3761,3774,3793],{},[1247,3715,3716,3718,3724],{},[1271,3717,2420],{},[1271,3719,3720,2102,3722],{},[1176,3721,2425],{},[1176,3723,2428],{},[1271,3725,3726,2102,3728,1297,3730,3732],{},[1176,3727,2425],{},[1176,3729,2435],{},[1176,3731,2382],{}," 是矩阵乘法）",[1247,3734,3735,3738,3742],{},[1271,3736,3737],{},"按元素比较",[1271,3739,3740,2451],{},[1176,3741,2450],{},[1271,3743,3744,2456,3746],{},[1176,3745,2450],{},[2458,3747,2460],{},[1247,3749,3750,3753,3757],{},[1271,3751,3752],{},"整体相等",[1271,3754,3755],{},[1176,3756,2470],{},[1271,3758,3759],{},[1176,3760,2470],{},[1247,3762,3763,3766,3772],{},[1271,3764,3765],{},"自加自减自乘自除",[1271,3767,3768,2102,3770],{},[1176,3769,2484],{},[1176,3771,2487],{},[1271,3773,2490],{},[1247,3775,3776,3778,3785],{},[1271,3777,2495],{},[1271,3779,3780,3781,2102,3783],{},"内积 ",[1176,3782,2501],{},[1176,3784,2504],{},[1271,3786,3787,3788,1297,3790,3792],{},"矩阵乘法 ",[1176,3789,2510],{},[1176,3791,2515],{}," 不可用）",[1247,3794,3795,3798,3808],{},[1271,3796,3797],{},"逻辑",[1271,3799,3800,3803,3804,3807],{},[1176,3801,3802],{},"any(a)","（任一为真）、",[1176,3805,3806],{},"all(a)","（全为真）",[1271,3809,2173],{},[1608,3811,2525],{"id":3812},"索引与切片-1",[1241,3814,3815,3824],{},[1244,3816,3817],{},[1247,3818,3819,3821],{},[1250,3820,3053],{},[1250,3822,3823],{},"说明",[1266,3825,3826,3836,3845,3858,3871,3881,3891,3901],{},[1247,3827,3828,3833],{},[1271,3829,3830],{},[1176,3831,3832],{},"-1",[1271,3834,3835],{},"最后一个元素",[1247,3837,3838,3842],{},[1271,3839,3840],{},[1176,3841,1503],{},[1271,3843,3844],{},"所有元素",[1247,3846,3847,3855],{},[1271,3848,3849,2670,3852],{},[1176,3850,3851],{},"Matrix(i, j)",[1176,3853,3854],{},"Vec(i)",[1271,3856,3857],{},"单个元素",[1247,3859,3860,3868],{},[1271,3861,3862,2670,3865],{},[1176,3863,3864],{},"Matrix(i to j, m to n)",[1176,3866,3867],{},"Vec(i to j)",[1271,3869,3870],{},"多个元素（含尾）",[1247,3872,3873,3878],{},[1271,3874,3875],{},[1176,3876,3877],{},"Vec(i until j [by seq])",[1271,3879,3880],{},"until 不含尾",[1247,3882,3883,3888],{},[1271,3884,3885],{},[1176,3886,3887],{},"Vector.slice(start, end)",[1271,3889,3890],{},"含 start 不含 end",[1247,3892,3893,3898],{},[1271,3894,3895],{},[1176,3896,3897],{},"Matrix(i, ::)",[1271,3899,3900],{},"取第 i 行",[1247,3902,3903,3908],{},[1271,3904,3905],{},[1176,3906,3907],{},"Matrix(::, j)",[1271,3909,3910],{},"取第 j 列",[1608,3912,50],{"id":50},[1241,3914,3915,3923],{},[1244,3916,3917],{},[1247,3918,3919,3921],{},[1250,3920,3053],{},[1250,3922,1574],{},[1266,3924,3925,3933,3942,3950,3958,3967,3976],{},[1247,3926,3927,3931],{},[1271,3928,3929],{},[1176,3930,2557],{},[1271,3932,2552],{},[1247,3934,3935,3939],{},[1271,3936,3937],{},[1176,3938,2567],{},[1271,3940,3941],{},"逆",[1247,3943,3944,3948],{},[1271,3945,3946],{},[1176,3947,2577],{},[1271,3949,2572],{},[1247,3951,3952,3956],{},[1271,3953,3954],{},[1176,3955,2587],{},[1271,3957,2582],{},[1247,3959,3960,3964],{},[1271,3961,3962],{},[1176,3963,2597],{},[1271,3965,3966],{},"特征值分解（实部、虚部、特征向量）",[1247,3968,3969,3973],{},[1271,3970,3971],{},[1176,3972,2611],{},[1271,3974,3975],{},"奇异值分解（u, s, v）",[1247,3977,3978,3982],{},[1271,3979,3980],{},[1176,3981,2621],{},[1271,3983,3984],{},"秩",[1608,3986,3988],{"id":3987},"求和与数学统计包","求和与数学\u002F统计包",[1241,3990,3991,3999],{},[1244,3992,3993],{},[1247,3994,3995,3997],{},[1250,3996,3053],{},[1250,3998,1574],{},[1266,4000,4001,4011,4021,4031,4041,4051],{},[1247,4002,4003,4008],{},[1271,4004,4005],{},[1176,4006,4007],{},"sum(Matrix)",[1271,4009,4010],{},"所有元素求和",[1247,4012,4013,4018],{},[1271,4014,4015],{},[1176,4016,4017],{},"sum(Matrix(*, ::))",[1271,4019,4020],{},"对所有行求和",[1247,4022,4023,4028],{},[1271,4024,4025],{},[1176,4026,4027],{},"Vec.reduce((x,y)=>x+y)",[1271,4029,4030],{},"向量可代替 sum",[1247,4032,4033,4038],{},[1271,4034,4035],{},[1176,4036,4037],{},"import breeze.numerics._",[1271,4039,4040],{},"数学包：sin\u002Fsinh\u002Fasin\u002Fasinh、cos\u002Fcosh\u002Facos\u002Facosh、tan\u002Ftanh\u002Fatan\u002Fatanh、log、exp、log10、sqrt、pow",[1247,4042,4043,4048],{},[1271,4044,4045],{},[1176,4046,4047],{},"import breeze.stats._",[1271,4049,4050],{},"统计包",[1247,4052,4053,4058],{},[1271,4054,4055],{},[1176,4056,4057],{},"breeze.stats.mean(Vec)",[1271,4059,4060,4061,1301],{},"求均值（或 ",[1176,4062,4063],{},"sum(Vec)\u002FVec.length",[1608,4065,2639],{"id":4066},"常用分布-1",[1101,4068,4069,1764,4071],{},[1115,4070,3373],{},[1176,4072,2645],{},[1241,4074,4075,4083],{},[1244,4076,4077],{},[1247,4078,4079,4081],{},[1250,4080,2654],{},[1250,4082,2657],{},[1266,4084,4085,4096,4107,4116,4125,4135,4144,4153,4162,4171],{},[1247,4086,4087,4090],{},[1271,4088,4089],{},"*伯努利",[1271,4091,4092,2670,4094],{},[1176,4093,2669],{},[1176,4095,2673],{},[1247,4097,4098,4101],{},[1271,4099,4100],{},"Beta",[1271,4102,4103,2670,4105],{},[1176,4104,2683],{},[1176,4106,2686],{},[1247,4108,4109,4112],{},[1271,4110,4111],{},"卡方",[1271,4113,4114],{},[1176,4115,2696],{},[1247,4117,4118,4121],{},[1271,4119,4120],{},"指数",[1271,4122,4123],{},[1176,4124,2706],{},[1247,4126,4127,4129],{},[1271,4128,2711],{},[1271,4130,4131,2670,4133],{},[1176,4132,2716],{},[1176,4134,2719],{},[1247,4136,4137,4140],{},[1271,4138,4139],{},"伽马",[1271,4141,4142],{},[1176,4143,2729],{},[1247,4145,4146,4149],{},[1271,4147,4148],{},"*正态",[1271,4150,4151],{},[1176,4152,2739],{},[1247,4154,4155,4158],{},[1271,4156,4157],{},"多元正态",[1271,4159,4160],{},[1176,4161,2749],{},[1247,4163,4164,4167],{},[1271,4165,4166],{},"泊松",[1271,4168,4169],{},[1176,4170,2758],{},[1247,4172,4173,4176],{},[1271,4174,4175],{},"*均匀",[1271,4177,4178],{},[1176,4179,2768],{},[1241,4181,4182,4190],{},[1244,4183,4184],{},[1247,4185,4186,4188],{},[1250,4187,3053],{},[1250,4189,1574],{},[1266,4191,4192,4202,4212],{},[1247,4193,4194,4199],{},[1271,4195,4196],{},[1176,4197,4198],{},"new DistributionName(param).sample(size)",[1271,4200,4201],{},"产生随机数",[1247,4203,4204,4209],{},[1271,4205,4206],{},[1176,4207,4208],{},"DistributionName.pdf()",[1271,4210,4211],{},"计算密度",[1247,4213,4214,4219],{},[1271,4215,4216],{},[1176,4217,4218],{},"DistributionName.cdf()",[1271,4220,4221],{},"计算分布",[1608,4223,4225],{"id":4224},"基于-breeze-的分布式计算","基于 Breeze 的分布式计算",[1241,4227,4228,4236],{},[1244,4229,4230],{},[1247,4231,4232,4234],{},[1250,4233,3053],{},[1250,4235,1574],{},[1266,4237,4238,4247,4257],{},[1247,4239,4240,4244],{},[1271,4241,4242],{},[1176,4243,3566],{},[1271,4245,4246],{},"生成随机矩阵",[1247,4248,4249,4254],{},[1271,4250,4251],{},[1176,4252,4253],{},"sc.parallelize(RandNumbers)",[1271,4255,4256],{},"转成 RDD",[1247,4258,4259,4264],{},[1271,4260,4261],{},[1176,4262,4263],{},"sc.parallelize(Array(Vector, Vector, …))",[1271,4265,4266],{},"向量集合转 RDD",[1512,4268],{},[1129,4270,4272],{"id":4271},"mllib机器学习算法包","MLlib（机器学习算法包）",[1101,4274,4275,1764,4277,2670,4280],{},[1115,4276,3373],{},[1176,4278,4279],{},"import org.apache.spark.mllib.linalg.{Vector, Vectors}",[1176,4281,4282],{},"{Matrix, Matrices}",[1608,4284,4285],{"id":4285},"向量与矩阵",[1241,4287,4288,4296],{},[1244,4289,4290],{},[1247,4291,4292,4294],{},[1250,4293,3053],{},[1250,4295,1574],{},[1266,4297,4298,4308,4318,4328],{},[1247,4299,4300,4305],{},[1271,4301,4302],{},[1176,4303,4304],{},"Vectors.dense(1.0, 2.0, 3.0)",[1271,4306,4307],{},"稠密向量",[1247,4309,4310,4315],{},[1271,4311,4312],{},[1176,4313,4314],{},"Vectors.sparse(大小, Array(位置), Array(值))",[1271,4316,4317],{},"稀疏向量（写法一）",[1247,4319,4320,4325],{},[1271,4321,4322],{},[1176,4323,4324],{},"Vectors.sparse(大小, Seq((位置,值), …))",[1271,4326,4327],{},"稀疏向量（写法二）",[1247,4329,4330,4335],{},[1271,4331,4332],{},[1176,4333,4334],{},"Matrices.dense(行, 列, Array)",[1271,4336,4337],{},"稠密矩阵（列优先填充）",[1608,4339,4340],{"id":4340},"分布式矩阵",[1101,4342,4343,1764,4345],{},[1115,4344,3373],{},[1176,4346,4347],{},"import org.apache.spark.mllib.linalg.distributed._",[1241,4349,4350,4358],{},[1244,4351,4352],{},[1247,4353,4354,4356],{},[1250,4355,3053],{},[1250,4357,1574],{},[1266,4359,4360,4370,4383,4396],{},[1247,4361,4362,4367],{},[1271,4363,4364],{},[1176,4365,4366],{},"new RowMatrix(dataRDD)",[1271,4368,4369],{},"行矩阵",[1247,4371,4372,4377],{},[1271,4373,4374],{},[1176,4375,4376],{},"new IndexedRowMatrix(dataRDD)",[1271,4378,4379,4380,1301],{},"索引行矩阵（元素 ",[1176,4381,4382],{},"IndexedRow(idx, vec)",[1247,4384,4385,4390],{},[1271,4386,4387],{},[1176,4388,4389],{},"new CoordinateMatrix(dataRDD)",[1271,4391,4392,4393,1301],{},"坐标矩阵（元素 ",[1176,4394,4395],{},"MatrixEntry(i, j, value)",[1247,4397,4398,4403],{},[1271,4399,4400],{},[1176,4401,4402],{},"new BlockMatrix(blocks, rowsPerBlock, colsPerBlock)",[1271,4404,4405],{},"分块矩阵",{"title":1174,"searchDepth":4407,"depth":4407,"links":4408},4,[4409,4415,4427,4440,4453],{"id":1098,"depth":4410,"text":1099,"children":4411},2,[4412,4414],{"id":1131,"depth":4413,"text":1132},3,{"id":1156,"depth":4413,"text":1157},{"id":1189,"depth":4410,"text":1190,"children":4416},[4417,4418,4419,4420,4421,4422,4423,4424,4425,4426],{"id":1193,"depth":4413,"text":1194},{"id":1219,"depth":4413,"text":1219},{"id":1239,"depth":4413,"text":1239},{"id":1370,"depth":4413,"text":1370},{"id":1401,"depth":4413,"text":1401},{"id":1410,"depth":4413,"text":1410},{"id":1419,"depth":4413,"text":1420},{"id":1429,"depth":4413,"text":1429},{"id":1457,"depth":4413,"text":1458},{"id":1467,"depth":4413,"text":1467},{"id":1516,"depth":4410,"text":1517,"children":4428},[4429,4430,4431,4435,4439],{"id":1520,"depth":4413,"text":1521},{"id":1561,"depth":4413,"text":1562},{"id":1605,"depth":4413,"text":1606,"children":4432},[4433,4434],{"id":1610,"depth":4407,"text":1611},{"id":1704,"depth":4407,"text":1705},{"id":1801,"depth":4413,"text":1802,"children":4436},[4437,4438],{"id":1814,"depth":4407,"text":1815},{"id":1848,"depth":4407,"text":1849},{"id":1929,"depth":4413,"text":1930},{"id":2010,"depth":4410,"text":2011,"children":4441},[4442,4443,4444,4445,4446,4447,4448,4449,4450,4451,4452],{"id":2023,"depth":4413,"text":2023},{"id":2182,"depth":4413,"text":2182},{"id":2273,"depth":4413,"text":2273},{"id":2288,"depth":4413,"text":2288},{"id":2365,"depth":4413,"text":2366},{"id":2525,"depth":4413,"text":2525},{"id":2534,"depth":4413,"text":2534},{"id":2630,"depth":4413,"text":2630},{"id":2639,"depth":4413,"text":2639},{"id":2777,"depth":4413,"text":2778},{"id":2787,"depth":4413,"text":2788},{"id":2815,"depth":4410,"text":2815,"children":4454},[4455,4456,4461,4473],{"id":2905,"depth":4413,"text":2906},{"id":3044,"depth":4413,"text":1562,"children":4457},[4458,4459,4460],{"id":3090,"depth":4407,"text":1606},{"id":3190,"depth":4407,"text":1802},{"id":3284,"depth":4407,"text":3285},{"id":3367,"depth":4413,"text":3368,"children":4462},[4463,4464,4465,4466,4467,4468,4469,4470,4471,4472],{"id":3378,"depth":4407,"text":3378},{"id":3484,"depth":4407,"text":3484},{"id":3572,"depth":4407,"text":3572},{"id":3650,"depth":4407,"text":3650},{"id":3699,"depth":4407,"text":3699},{"id":3812,"depth":4407,"text":2525},{"id":50,"depth":4407,"text":50},{"id":3987,"depth":4407,"text":3988},{"id":4066,"depth":4407,"text":2639},{"id":4224,"depth":4407,"text":4225},{"id":4271,"depth":4413,"text":4272,"children":4474},[4475,4476],{"id":4285,"depth":4407,"text":4285},{"id":4340,"depth":4407,"text":4340},"https:\u002F\u002Fpic1.zhimg.com\u002F70\u002Fv2-bf9881cd32c068bc1da7626ca8294e1c_1440w.avis?source=172ae18b&biz_tag=Post","Spark 核心组件、Scala 编程基础与 Word Count 实例","md",true,{"uuid":4482,"slots":4483},"f3561dd0-e86a-11f0-8fd1-914b1152d8ed",{},{"title":1085,"description":4478},"posts\u002F分布式处理与计算\u002F分布式处理与计算：Spark系统与Scala语言",[323,324,325,326],"3YGeFSx_cV5sV7dCHvYLjGKqylT_9NTRiluYHye4ll0",1790443283840]