我试图在没有偏好值的表上生成推荐,但它总是给出错误,如“DataModel 没有偏好值”。我已经创建了布尔数据模型,如下所示为什么会出现此错误。请帮助我解决此问题。我正在为我的数据库连接和数据模型创建附加代码,如下所示。
MysqlDataSource dataSource = new MysqlDataSource ();
dataSource.setServerName("localhost");
dataSource.setUser("root");
dataSource.setPassword("******");
dataSource.setDatabaseName("recommendation");
MySQLBooleanPrefJDBCDataModel dataModel = new MySQLBooleanPrefJDBCDataModel(dataSource,"test","user_id","song_id", null);
我点击了这个链接https://stackoverflow.com/questions/23537322/how-to-make-a-more-efficient-recommender-in-mahout但面临同样的问题