Merge branch 'develop' of github.com:CHU-TDAP/E-learning-Server-v2 into develop
This commit is contained in:
commit
0e81623947
21
htdocs/lib/Database/DBRecommand.php
Normal file
21
htdocs/lib/Database/DBRecommand.php
Normal file
@ -0,0 +1,21 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
namespace UElearning\Database;
|
||||||
|
|
||||||
|
use UElearning\Exception;
|
||||||
|
|
||||||
|
require_once UELEARNING_LIB_ROOT.'/Database/Database.php';
|
||||||
|
require_once UELEARNING_LIB_ROOT.'/Database/Exception.php';
|
||||||
|
|
||||||
|
class DBRecomamnd extends Database
|
||||||
|
{
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
protected function queryBelongByWhere($where)
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
55
htdocs/lib/Recommand/RecommandPoint.php
Normal file
55
htdocs/lib/Recommand/RecommandPoint.php
Normal file
@ -0,0 +1,55 @@
|
|||||||
|
<?php
|
||||||
|
|
||||||
|
require_once __DIR__.'/../config.php';
|
||||||
|
require_once UELEARNING_LIB_ROOT.'/Target/Target.php';
|
||||||
|
use UElearning\Target;
|
||||||
|
use UElearning\Exception;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推薦學習點
|
||||||
|
* Usage:
|
||||||
|
* $recommand = new RecommandPoint();
|
||||||
|
*/
|
||||||
|
|
||||||
|
class RecommandPoint
|
||||||
|
{
|
||||||
|
/**
|
||||||
|
* 正規化參數
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
* @type double
|
||||||
|
*/
|
||||||
|
private $gamma;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 調和參數(常數)
|
||||||
|
*
|
||||||
|
* @access private
|
||||||
|
* @type double
|
||||||
|
*/
|
||||||
|
private const $ALPHA = 0.5;
|
||||||
|
|
||||||
|
|
||||||
|
public function __construct()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 計算正規化參數
|
||||||
|
* @return double 正規化參數
|
||||||
|
*/
|
||||||
|
private function computeNormalizationParameter()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 推薦學習點
|
||||||
|
* @return array 學習點清單
|
||||||
|
*/
|
||||||
|
public function recommand()
|
||||||
|
{
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
Loading…
x
Reference in New Issue
Block a user