Coder Social home page Coder Social logo

我将其改成了User_id改成了String 类型的,但是进行推荐的时候出现Data truncation: Truncated incorrect DOUBLE value: 'a'其中a是数据库表users里面增加的user_id值为a。还望指教,谢谢/ about newsrecommendsystem HOT 7 OPEN

bluemapleman avatar bluemapleman commented on June 6, 2024
我将其改成了User_id改成了String 类型的,但是进行推荐的时候出现Data truncation: Truncated incorrect DOUBLE value: 'a'其中a是数据库表users里面增加的user_id值为a。还望指教,谢谢/

from newsrecommendsystem.

Comments (7)

bluemapleman avatar bluemapleman commented on June 6, 2024 2

方便把你的代码在github里用一个repo分享一下嘛?我直接download一下看看

from newsrecommendsystem.

DLUTfangping avatar DLUTfangping commented on June 6, 2024 1

@bluemapleman https://github.com/DLUTfangping/recommendation_system/tree/master/NewsRecommendSystem-master
这是地址,谢谢了,数据库的表我只改了user_id的类型,改成了varchar,users表关联的其他表的user_id也更改了类型。

from newsrecommendsystem.

DLUTfangping avatar DLUTfangping commented on June 6, 2024

@bluemapleman 不知博主是否也会出现同样的问题呢?

from newsrecommendsystem.

DLUTfangping avatar DLUTfangping commented on June 6, 2024

@bluemapleman 已解决。。。但是对于用户id为string 类型的时候,在协同过滤貌似不可以,因为默认的用户ID为Long 类型,不知博主是否发现了这个问题。

from newsrecommendsystem.

bluemapleman avatar bluemapleman commented on June 6, 2024

是这样的,协同过滤因为用的mahout的库,但是mahout默认是表的id得为long,所以这确实是个问题,如果要适配string类型的id,可能只能自己实现协同过滤。

from newsrecommendsystem.

DLUTfangping avatar DLUTfangping commented on June 6, 2024

@bluemapleman 博主的想法有点类似Rocchio算法的**呢只是博主并没有像Rocchio算法那样做特征工程而已,感觉用的很巧妙呢,不知我是否理解的正确。

from newsrecommendsystem.

bluemapleman avatar bluemapleman commented on June 6, 2024

你说的是基于内容相似度的推荐嘛?我看了一下Rocchino算法,它是利用余弦相似度做文档分类的,而我的做法可能是更接近于直接把推荐当余弦相似度的排序问题,把最新新闻与用户的关键词向量计算一个相似度,然后从高到低排列,推荐给用户

from newsrecommendsystem.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.