将stlm模型重新安装到整个训练集时出错

时间:2018-06-18 13:03:37

标签: r stl time-series forecasting forecast

我想在整个训练集中使用先前安装的stlm模型和“arima”方法以及回归矩阵,但我遇到了错误。 这是一个可重复的例子:

function prtxgal_install() {
    global $wpdb;
    $prtx_getsettings = $wpdb->get_row("SELECT * FROM " . $wpdb->prefix . "prtxgal_settings WHERE id = 1;");
    if ($prtx_getsettings == NULL) {

        $table_name = $wpdb->prefix . "prtxgal_settings";
        $table_name2 = $wpdb->prefix . "prtxgal_galleries";
        $table_name3 = $wpdb->prefix . "prtxgal_images";

        $charset_collate = $wpdb->get_charset_collate();

        require_once ABSPATH . 'wp-admin/includes/upgrade.php';

        $sql = "CREATE TABLE $table_name (
        id mediumint(9) NOT NULL AUTO_INCREMENT,
        time timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
        outline_color text NOT NULL,
        desc_bg_color text NOT NULL,
        font_color text NOT NULL,
        file_path text NOT NULL,
        PRIMARY KEY  (id)
        ) $charset_collate;";
        dbDelta($sql);

        $sql = "CREATE TABLE $table_name2 (
        id mediumint(9) NOT NULL AUTO_INCREMENT,
        time timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
        name text NOT NULL,
        preview_image text NOT NULL,
        image_number text NOT NULL,
        `order` int(10) NOT NULL,
        published int(2) NOT NULL,
        PRIMARY KEY  (id)
        ) $charset_collate;";
        dbDelta($sql);

        $sql = "CREATE TABLE $table_name3 (
        id mediumint(9) NOT NULL AUTO_INCREMENT,
        time timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
        gallery_id text NOT NULL,
        filename text NOT NULL,
        image_url text NOT NULL,
        thumb_url text NOT NULL,
        description text NOT NULL,
        alt text NOT NULL,
        `order` int(10) NOT NULL,
        PRIMARY KEY  (id)
        ) $charset_collate;";
        dbDelta($sql);

        $wpdb->insert(
            $table_name,
            array(
                'id' => 1,
                'outline_color' => '#000000',
                'desc_bg_color' => '#000000',
                'font_color' => '#ffffff',
                'file_path' => '/images/default.png',
            )
        );
    }
}

错误是: “arima2中的错误(x,model,xreg = xreg,method = method):没有回归量提供”

愿任何人帮助我理解这一点吗?

1 个答案:

答案 0 :(得分:0)

这是一个错误,立即解决了。谢谢Rob! Issue on github