We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
userEmb = user._2.foldRightArray[Float]((row, newEmb) => { val movieId = row.getAsString val movieEmb = word2VecModel.getVectors.get(movieId) if(movieEmb.isDefined){ newEmb.zip(movieEmb.get).map { case (x, y) => x + y } }else{ newEmb } })
老师,这段代码能解释下吗?user._2.foldRightArray[Float],(userEmb) 是什么意思,row, newEmb,这些参数是啥意思 ,movieEmb.get 为啥能这么写,是什么意思, if(movieEmb.isDefined){ newEmb.zip(movieEmb.get).map { case (x, y) => x + y } }else{ newEmb } 这个又是起什么作用?
The text was updated successfully, but these errors were encountered:
解决了
Sorry, something went wrong.
No branches or pull requests
userEmb = user._2.foldRightArray[Float]((row, newEmb) => {
val movieId = row.getAsString
val movieEmb = word2VecModel.getVectors.get(movieId)
if(movieEmb.isDefined){
newEmb.zip(movieEmb.get).map { case (x, y) => x + y }
}else{
newEmb
}
})
老师,这段代码能解释下吗?user._2.foldRightArray[Float],(userEmb) 是什么意思,row, newEmb,这些参数是啥意思 ,movieEmb.get 为啥能这么写,是什么意思,
if(movieEmb.isDefined){
newEmb.zip(movieEmb.get).map { case (x, y) => x + y }
}else{
newEmb
}
这个又是起什么作用?
The text was updated successfully, but these errors were encountered: