• Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/lib/ml/model/base.php
  • Класс: Bitrix\Crm\Ml\Model\Base
  • Вызов: Base::getTrainingSetSize
public function getTrainingSetSize();

/**
 * Should return array of the ids of the entities, that should be used for building the next part of the training set
 *
 * @param int $fromId Id of the starting entity.
 * @param int $limit Maximum count of the records in the training subset.
 *
 * @return int[]
 */
abstract public function getTrainingSet($fromId, $limit);

/**
 * @param $fromId
 * @param $limit
 *
 * @return array
 */
abstract public function getPredictionSet($fromId, $limit): array;

/**
 * Should return title for this model
 *
 * @return string
 */
abstract public function getTitle(): string;

abstract public function hasAccess(int $userId = 0): bool;

public function __construct(string $name)
{
	$this->name = $name;
	$this->mlModel = null;
	if (Loader::includeModule('ml'))
	{
		$this->mlModel = Model::loadWithName($this->name);
	}
}