def get_step_list(self): step_list = [ Step( name="Bước 1: Bước ngẫu nhiên từ mỗi nút trong mạng", inputs={ "CoNet1": "CoNet1", "walk_length": self.setting["walk_length"], "num_walks": self.setting["num_walks"], "p": self.setting["p"], "q": self.setting["q"], }, outputs={"Walks": "Tập bước ngẫu nhiên từ mọi nút trong mạng"}, output_file=""), Step(name="Bước 2: Ánh xạ nút vào không gian vectơ", inputs={ "Walks": "Walks", "dimensions": self.setting["dimensions"], "window_size": self.setting["window_size"], }, outputs={"Vectơ đặc trưng": "Vectơ đặc trưng của từng nút"}, output_file=""), Step(name="Bước 3: Khuyến nghị theo vectơ đặc trưng", inputs={ "Vectơ đặc trưng": "Vectơ đặc trưng", "topK": 10, }, outputs={ "Recommendations": "Danh sách khuyến nghị cho từng nghiên cứu viên" }, output_file="") ] return step_list
def get_step_list(self): step_list = [ Step( name="Bước 1: Tính Common Neighbor từ mỗi cặp nút trong mạng", inputs={ "CoNet1": "CoNet1", }, outputs={ "Tập Common Neighbor": "Tập cặp nút trong mạng kèm Common Neighbor" }, output_file=""), Step( name="Bước 2: Khuyến nghị theo số Common Neighbor", inputs={ "Tập Common Neighbor": "Tập Common Neighbor", "topK": 10, }, outputs={ "Recommendations": "Danh sách khuyến nghị cho từng nghiên cứu viên" }, output_file=""), ] return step_list
def get_step_list(self): step_list = [ Step(name= "Bước 1: Tính Jaccard Coefficient từ mỗi cặp nút trong mạng", inputs={ "CoNet1": "CoNet1", }, outputs={ "Tập Jaccard Coefficient": "Tập cặp nút trong mạng kèm Jaccard Coefficient" }, output_file=""), Step(name="Bước 2: Khuyến nghị theo số Jaccard Coefficient", inputs={ "Tập Jaccard Coefficient": "Tập Jaccard Coefficient", "topK": 10, }, outputs={ "Recommendations": "Danh sách khuyến nghị cho từng nghiên cứu viên" }, output_file=""), ] return step_list
def new_recipe_step(cuisine_name, recipe_name): user = User.get_by_id(get_jwt_identity()) cuisine = Cuisine.get_or_none(name=cuisine_name) if user.is_admin: if cuisine: recipe = Recipe.get_or_none(name=recipe_name) if recipe: step_number = request.form.get("step_number") step_description = request.form.get("step_description") new_step = Step(number=step_number, description=step_description, recipe_id=recipe.id) new_step.save() return jsonify({"message": "Step successfully created!"}) else: return jsonify({"errors": "Recipe not exists"}) else: return jsonify({"errors": cuisine_name + " cusine is not exist"}) else: return 0