AttributeError at / pre_pred / - PullRequest
       32

AttributeError at / pre_pred /

0 голосов
/ 20 ноября 2019

Я установил все требования и успешно запустил локальный сервер, но когда я попытался запустить прогнозную часть этого 4th_umpire (Предиктор матча в крикет с использованием проекта Random Forest algo , я получаюследующая ошибка: -

This is the error part

Здесь я представляю часть кода ошибки, как указано на изображении ошибки.

def _transform(self, X, handle_unknown='error'):
    X_list, n_samples, n_features = self._check_X(X)

    X_int = np.zeros((n_samples, n_features), dtype=np.int)
    X_mask = np.ones((n_samples, n_features), dtype=np.bool)

    if n_features != len(self.categories_):
        raise ValueError(
            "The number of features in X is different to the number of "
            "features of the fitted data. The fitted data had {} features "
            "and the X has {} features."
            .format(len(self.categories_,), n_features)
        )

Строка исключения: if n_features! = Len (self.categories _): хотя я проверил эту часть OneHotEncoder, и мне кажется, это нормально.

...