recommand = new Database\DBRecommand(); } /** * 計算正規化參數 * @return double 正規化參數 */ public function computeNormalizationParameter($theme_number) { $normal = 0; //正規化之後的GAMMA值 $EntitySum = 0; //實體學習點分別算銓重之後的值 $VirtualSum = 0; //虛擬學習點分別算銓重之後的值 $edge = $this->recommand->queryEdgeByID('0'); $theme = new Study\Theme($theme_number); for($i=0;$irecommand->queryBelongByID($next_point,$theme->getId()); $weight = $belong["weight"]; $VirtualSum += $weight / $next_target->getLearnTime(); if($next_target->isNumberOfPeopleZero()) $Rj = 0; else $Rj = $next_target->getMj() / $next_target->getPLj(); $EntitySum += $weight * ($next_target->getS() - $Rj + 1) / ($move_time + $next_target->getLearnTime()); } return $EntitySum/$VirtualSum; } /** * 推薦學習點 * @return array 學習點清單 */ public function recommand($current_point,$theme_number,$activity_number) { } }