`

Exploring the user-based recommender 1

 
阅读更多

recommending items to some user, denoted by u, as seen below



 

It would be terribly slow to examine every item. In reality, a neighborhood of most similar users is computed first, and only items known to those users are considered:



 

 The basic flow to build a CF likes blow codes in mahout:

DataModel model = new FileDataModel(new File("intro.csv"));
UserSimilarity similarity = new PearsonCorrelationSimilarity(model);
UserNeighborhood neighborhood = new NearestNUserNeighborhood(2, similarity, model);

Recommender recommender = new GenericUserBasedRecommender( model, neighborhood, similarity);

//retrive recommend result for user 1 
List<RecommendedItem> recommendations =  recommender.recommend(1, 1);

 

 The content of intro.csv file is formatted by fields UserID  ItemID  PreferenceValue

4,103,3.0
4,104,4.5
4,106,4.0
5,101,4.0
5,102,3.0
5,103,2.0
5,104,4.0
5,105,3.5

 

 

 

 Exploring user neighborhoods

  • Fixed-size neighborhoods

 UserNeighborhood neighborhood = new NearestNUserNeighborhood(100, similarity, model);


  •  Threshold-based neighborhood

 UserNeighborhood neighborhood = new ThresholdUserNeighborhood(0.7, similarity, model);
 

 

 

 

 

  • 大小: 20.2 KB
  • 大小: 29.9 KB
  • 大小: 30.3 KB
  • 大小: 27.6 KB
分享到:
评论

相关推荐

    「防火墙」Exploring the Safari - 数据分析.zip

    「防火墙」Exploring the Safari - 数据分析 数据安全 安全架构 安全知识 安全活动 云安全

    Art-Exploring-the-New-Android-KitKat-Runtime

    标题《Art-Exploring-the-New-Android-KitKat-Runtime》中的知识点涵盖了Android KitKat操作系统版本中引入的新运行时环境(Runtime Environment),特别是ART(Android Runtime)的探索和分析。Android KitKat是...

    Exploring Expect (A Tcl-based Toolkit for Automating Interactive Programs)

    ### Exploring Expect: A Tcl-Based Toolkit for Automating Interactive Programs #### 概述 《Exploring Expect》这本书主要介绍了一个基于Tcl(Tool Command Language)的工具包——Expect,用于自动化处理交互...

    Arduino-Exploring-Arduino-1st-Edition.zip

    Arduino-Exploring-Arduino-1st-Edition.zip,Jeremy Blumemexploring Arduino的书《探索Arduino》第一版的配套代码:第一版,Arduino是一家开源软硬件公司和制造商社区。Arduino始于21世纪初,深受电子制造商的欢迎,...

    Exploring-Arduino-Tools-and-Techniques-for-Engineering-Wizardry-1st-Edition

    “Exploring Arduino: Tools and Techniques for Engineering Wizardry 1st Edition”(探索Arduino:工具和技术为工程魔法第一版)这本书主要介绍了Arduino这一开源电子平台及其相关工具、技术和应用。Arduino是一...

    Exploring Backdoor Attacks on DRL-based TCC system

    这篇论文——"Stop-and-Go: Exploring Backdoor Attacks on Deep Reinforcement Learning-based Traffic Congestion Control Systems"揭示了DRL模型在交通管理中的潜在风险,即可能受到后门攻击(Backdoor Attack)...

    Exploring Swift Playgrounds--2017

    Build Swift playgrounds for others to use Teach yourself and others with Swift playgrounds Use Swift playgrounds in your development process

    Exploring-Transformer-Basics.pdf

    以下是关于“Exploring Transformer Basics”文档中的关键知识点总结。 ### 标题:Exploring Transformer Basics #### 变压器简介 变压器是一种利用电磁感应原理来改变交流电压水平的设备。它通常由三个主要部分...

    Project-Exploring-the-History-of-Lego

    标题中的“Project-Exploring-the-History-of-Lego”表明这是一个关于探究乐高积木历史的数据分析项目。在这个项目中,我们可能将深入研究乐高从成立以来的发展历程、产品的变化、销售趋势,以及可能影响其发展的...

    exploring-net-core-3-0-runtime.rar

    This book starts with the benefits of .NET including its fundamental tasks and tools where you will learn .NET SDK tools and the ILDasm tool. This is followed by a detailed discussion on code ...

    SUMS88 Exploring Mathematics -- Problem-Solving and Proof

    《SUMS88 探索数学——问题解决与证明》是由Daniel Grieser于2018年编著的一部数学教材,旨在帮助学生提升在解决问题和构建证明方面的能力。这本书深入浅出地探讨了数学的本质,特别是如何通过解决问题来理解和掌握...

    Exploring Faster-than-Nyquist for Satellite Direct Broadcasting

    然而,在FTN技术中,相邻符号不再保持正交,而是通过时间加速因子 \( \tau \) 来减少符号间的间隔,其中 \( \tau &lt; 1 \)。 #### FTN与DVB-S2标准的结合 DVB-S2 (Digital Video Broadcasting - Satellite 2) 是目前...

    Essential Statistics Exploring the World through Data, 2nd Global Edition

    This book is ideal for a one-semester course in statistics, offering a streamlined presentation of Introductory Statistics: Exploring the World through Data, by Gould/Ryan. Exploring the World through...

    Programming 32-bit Microcontrollers in C Exploring the PIC32

    《Programming 32-bit Microcontrollers in C Exploring the PIC32》是目前市面上唯一一本专门针对Microchip公司的PIC32系列微控制器进行编程教学的专业教材。该书由Lucio Di Jasio撰写,由Newnes出版社出版。该出版...

    Beginning iPhone Development: Exploring the iPhone SDK - Part1

    Beginning iPhone Development: Exploring the iPhone SDK by Dave Mark, Jeff LaMarche

Global site tag (gtag.js) - Google Analytics