Open
Conversation
bambis13
reviewed
Jun 29, 2018
| @photos = @home.listing_photos | ||
| @cancel = @home.cancel_policy | ||
| @space = AvailableSpace.find_by(home_id: params[:id]) | ||
| @beds = BedType.where(home_id: params[:id]) |
Owner
There was a problem hiding this comment.
このへんの検索ロジックはモデルにスコープ作って@home.~~で取り出せるといいかも!
| end | ||
|
|
||
| #homeIDを抽出 | ||
| def extract_recommend_ids(learning_result) |
Collaborator
Author
There was a problem hiding this comment.
当初モデルに記述していたのですがノーメソッドエラーとなりコントローラに移しました。良い方法があれば後で教えていただけると嬉しいです。。!
| #{home.home_category_sub.name} | ||
| %span(推奨度: #{similarity}) | ||
| %p.listing-title.bold #{home.name} | ||
| %p.listing-price ¥8,761 /泊・キャンセル無料 |
Owner
There was a problem hiding this comment.
ここってhome.price.default_price(?)とかでとれますか?
Collaborator
Author
There was a problem hiding this comment.
取れたので入れました!ただここも三万件入れないとかも。。
| @@ -0,0 +1,9 @@ | |||
| .similar-category__item.left.slick-sub | |||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
what
レコメンデーション機能実装
why
ユーザーの嗜好性に合わせてリスティングを変えるため
参考
homes/1 と homes/3 で推奨される物件が変わる。(推奨度も変わる)
注意点(下記条件の場合railsでエラーが起きる)
・python APIサーバーを立ち上げていない場合
・学習データに該当する物件の名前でない場合
※あとで相談させてください