public static function load(Persister $persister) : self
    {
        $learner = $persister->load();

        if (!$learner instanceof Learner) {
            throw new InvalidArgumentException('Peristable must be a'
                . ' learner.');
        }

        return new self($learner, $persister);
    }
public static function load(Persister $persister) : self
    {
        $learner = $persister->load();

        if (!$learner instanceof Learner) {
            throw new InvalidArgumentException('Peristable must be a'
                . ' learner.');
        }

        return new self($learner, $persister);
    }
public static function load ( Persister $ persister ) : self { $ learner = $ persister -> load ( ) ; if ( ! $ learner instanceof Learner ) { throw new InvalidArgumentException ( 'Peristable must be a' . ' learner.' ) ; } return new self ( $ learner , $ persister ) ; }
Factory method to restore the model from persistence.

@param \Rubix\ML\Persisters\Persister $persister
@throws \InvalidArgumentException
@return self
Factory method to restore the model from persistence .