{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "cc47c15b",
   "metadata": {},
   "source": [
    "# Mitsui Commodity Prediction – Kaggle Submission Notebook\n",
    "\n",
    "Single-file notebook with all required code inlined (no external src/ imports).\n",
    "It: (1) loads data, (2) engineers lightweight technical features, (3) preprocesses & splits, (4) trains XGBoost + TF dense models (configurable), (5) ensembles, (6) produces `submission.csv`.\n",
    "\n",
    "Runtime safety toggles provided to keep within 8h limit. Adjust flags / epochs for experimentation.\n",
    "\n",
    "Competition metric reference implementation (Sharpe of daily rank Spearman) is included for optional local validation using the tail of train (public test mimic).\n",
    "\n",
    "---\n",
    "**NOTE:** Kaggle's evaluation API will run your notebook in a time-aware fashion. This notebook trains only on historical (train) data. Public test labels mirror last 90 dates of train; metric here is only indicative."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "c533e132",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "2025-08-13 10:58:58.334077: E external/local_xla/xla/stream_executor/cuda/cuda_fft.cc:477] Unable to register cuFFT factory: Attempting to register factory for plugin cuFFT when one has already been registered\n",
      "WARNING: All log messages before absl::InitializeLog() is called are written to STDERR\n",
      "E0000 00:00:1755075538.351364   32645 cuda_dnn.cc:8310] Unable to register cuDNN factory: Attempting to register factory for plugin cuDNN when one has already been registered\n",
      "E0000 00:00:1755075538.358070   32645 cuda_blas.cc:1418] Unable to register cuBLAS factory: Attempting to register factory for plugin cuBLAS when one has already been registered\n",
      "2025-08-13 10:58:58.377499: I tensorflow/core/platform/cpu_feature_guard.cc:210] This TensorFlow binary is optimized to use available CPU instructions in performance-critical operations.\n",
      "To enable the following instructions: SSE4.1 SSE4.2 AVX AVX2 FMA, in other operations, rebuild TensorFlow with the appropriate compiler flags.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TensorFlow version: 2.18.1\n",
      "Kaggle env: False | Using DATA_PATH = .\n"
     ]
    }
   ],
   "source": [
    "# Configuration & Imports\n",
    "from pathlib import Path\n",
    "import os, math, gc, json, random, warnings\n",
    "import numpy as np\n",
    "import pandas as pd\n",
    "from sklearn.preprocessing import RobustScaler\n",
    "from sklearn.metrics import mean_absolute_error\n",
    "import xgboost as xgb\n",
    "import tensorflow as tf\n",
    "from tensorflow import keras\n",
    "from keras import layers, regularizers\n",
    "\n",
    "# Detect Kaggle environment & resolve data path (no internet required)\n",
    "KAGGLE_ENV = os.environ.get(\"KAGGLE_KERNEL_RUN_TYPE\") is not None\n",
    "KAGGLE_DATA_DIR = Path(\"/kaggle/input/mitsui-commodity-prediction-challenge\")\n",
    "if KAGGLE_ENV and KAGGLE_DATA_DIR.exists():\n",
    "    DATA_PATH = KAGGLE_DATA_DIR\n",
    "else:\n",
    "    # Local fallback for offline development (place train.csv etc. here)\n",
    "    DATA_PATH = Path(\".\")\n",
    "OUTPUT_PATH = Path(\"/kaggle/working\") if KAGGLE_ENV else Path(\"./working\")\n",
    "RANDOM_SEED = 42\n",
    "\n",
    "# Runtime flags (tune to balance score vs runtime)\n",
    "TRAIN_XGB = True\n",
    "TRAIN_TF = True\n",
    "USE_ENSEMBLE = True  # requires both models\n",
    "LIMIT_PRICE_COLS = 40   # feature engineering cap\n",
    "XGB_EARLY_STOP = 25\n",
    "TF_EPOCHS = 30\n",
    "TF_VERBOSE = 0\n",
    "SUPPRESS_XGB_WARNINGS = True  # suppress repetitive deprecation warnings\n",
    "\n",
    "if SUPPRESS_XGB_WARNINGS:\n",
    "    warnings.filterwarnings(\n",
    "        \"ignore\",\n",
    "        message=\"`early_stopping_rounds` in `fit` method is deprecated\",\n",
    "        category=UserWarning,\n",
    "        module=r\"xgboost\\.sklearn\"\n",
    "    )\n",
    "\n",
    "# (Kaggle rule reminder) -> Disable internet in Notebook settings before final submission; this code makes no outbound calls.\n",
    "\n",
    "# Reproducibility\n",
    "def set_seeds(seed: int = 42):\n",
    "    random.seed(seed)\n",
    "    np.random.seed(seed)\n",
    "    tf.random.set_seed(seed)\n",
    "set_seeds(RANDOM_SEED)\n",
    "print('TensorFlow version:', tf.__version__)\n",
    "print('Kaggle env:', KAGGLE_ENV, '| Using DATA_PATH =', DATA_PATH)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "df90f6ec",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Competition Metric Implementation (from Competition Metric Notebook.md, adapted)\n",
    "SOLUTION_NULL_FILLER = -999999\n",
    "def rank_correlation_sharpe_ratio(merged_df: pd.DataFrame) -> float:\n",
    "    prediction_cols = [c for c in merged_df.columns if c.startswith('prediction_')]\n",
    "    target_cols = [c for c in merged_df.columns if c.startswith('target_')]\n",
    "    def _compute(row):\n",
    "        non_null_targets = [c for c in target_cols if not pd.isnull(row[c])]\n",
    "        if not non_null_targets:\n",
    "            raise ValueError('No non-null target values')\n",
    "        matching_predictions = [c for c in prediction_cols if c.replace('prediction_', 'target_') in non_null_targets]\n",
    "        tvals = row[non_null_targets]\n",
    "        pvals = row[matching_predictions]\n",
    "        if tvals.std(ddof=0) == 0 or pvals.std(ddof=0) == 0:\n",
    "            raise ZeroDivisionError('Zero std dev')\n",
    "        return np.corrcoef(pvals.rank(method='average'), tvals.rank(method='average'))[0,1]\n",
    "    daily = merged_df.apply(_compute, axis=1)\n",
    "    std_dev = daily.std(ddof=0)\n",
    "    if std_dev == 0:\n",
    "        raise ZeroDivisionError('Zero std for Sharpe')\n",
    "    return float(daily.mean() / std_dev)\n",
    "\n",
    "def make_validation_dataframe(y_true: pd.DataFrame, y_pred: pd.DataFrame) -> pd.DataFrame:\n",
    "    pred = y_pred.add_prefix('prediction_')\n",
    "    pred.columns = [c.replace('prediction_target_', 'prediction_') for c in pred.columns]\n",
    "    return pd.concat([y_true.reset_index(drop=True), pred.reset_index(drop=True)], axis=1)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "dfa21f8e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Feature Engineering Helpers\n",
    "import pandas as _pd\n",
    "\n",
    "def infer_price_columns(df: pd.DataFrame):\n",
    "    keywords = ('Close','close','Open','open')\n",
    "    cols = [c for c in df.columns if any(k in c for k in keywords)]\n",
    "    return [c for c in cols if pd.api.types.is_numeric_dtype(df[c])]\n",
    "\n",
    "def create_technical_features_fast(df: pd.DataFrame, limit_cols: int = 20, price_cols=None):\n",
    "    \"\"\"Create lightweight technical features with minimal DataFrame fragmentation.\n",
    "\n",
    "    Changes vs earlier version:\n",
    "    - Collect new feature Series in a list and concat once (avoids performance warnings about fragmentation).\n",
    "    - Use pct_change(fill_method=None) to silence future deprecation warning.\n",
    "    - Keeps rolling windows small (5) for speed.\n",
    "    \"\"\"\n",
    "    base = df.copy()\n",
    "    if 'date_id' in base.columns:\n",
    "        base = base.sort_values('date_id')\n",
    "    price_cols = list(price_cols) if price_cols is not None else infer_price_columns(base)\n",
    "    new_cols = []\n",
    "    for col in price_cols[:limit_cols]:\n",
    "        if not pd.api.types.is_numeric_dtype(base[col]):\n",
    "            continue\n",
    "        col_series = base[col]\n",
    "        # Explicit fill_method=None to avoid future warning; first value will be NaN which we later handle.\n",
    "        ret = col_series.pct_change(1, fill_method=None).rename(f'{col}_return_1d')\n",
    "        ma5 = col_series.rolling(5, min_periods=1).mean().rename(f'{col}_ma_5')\n",
    "        vol5 = col_series.rolling(5, min_periods=1).std().rename(f'{col}_vol_5')\n",
    "        new_cols.extend([ret, ma5, vol5])\n",
    "    if new_cols:\n",
    "        feats = pd.concat(new_cols, axis=1)\n",
    "        out = pd.concat([base, feats], axis=1)\n",
    "    else:\n",
    "        out = base\n",
    "    out = out.replace([np.inf, -np.inf], np.nan)\n",
    "    return out"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "7d1fd64a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Preprocessing Utilities\n",
    "def build_feature_target_frames(train_df: pd.DataFrame, train_labels: pd.DataFrame, test_df: pd.DataFrame):\n",
    "    train_full = train_df.merge(train_labels, on='date_id', how='inner')\n",
    "    target_cols = [c for c in train_full.columns if c.startswith('target_')]\n",
    "    feature_cols = [c for c in train_full.columns if c not in ['date_id'] + target_cols]\n",
    "    X_train = train_full[feature_cols].copy()\n",
    "    y_train = train_full[target_cols].copy()\n",
    "    X_test = test_df[feature_cols].copy()\n",
    "    return X_train, y_train, X_test, feature_cols, target_cols\n",
    "\n",
    "def scale_features(X_train: pd.DataFrame, X_test: pd.DataFrame):\n",
    "    scaler = RobustScaler()\n",
    "    X_train_s = pd.DataFrame(scaler.fit_transform(X_train), columns=X_train.columns, index=X_train.index)\n",
    "    X_test_s = pd.DataFrame(scaler.transform(X_test), columns=X_test.columns, index=X_test.index)\n",
    "    return X_train_s, X_test_s, scaler\n",
    "\n",
    "def time_split_mask(dates: pd.Series, train_frac: float = 0.8):\n",
    "    dates_sorted = dates.sort_values()\n",
    "    split_idx = int(len(dates_sorted) * train_frac)\n",
    "    threshold = dates_sorted.iloc[split_idx]\n",
    "    return (dates <= threshold), (dates > threshold), int(threshold)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "d2c1565a",
   "metadata": {},
   "outputs": [],
   "source": [
    "# XGBoost Multi-target Wrapper (robust to versions + GPU fallback)\n",
    "class MultiTargetXGB:\n",
    "    def __init__(self, params=None, early_stopping_rounds=None):\n",
    "        self.params = params or {\n",
    "            'objective':'reg:squarederror','eval_metric':'mae','random_state':RANDOM_SEED,'n_jobs':-1,'verbosity':0}\n",
    "        self.early_stopping_rounds = early_stopping_rounds\n",
    "        self.models = {}  # value: XGBRegressor or Booster\n",
    "    def _predict_booster(self, booster, X):\n",
    "        dmat = xgb.DMatrix(X)\n",
    "        if hasattr(booster, 'best_iteration') and booster.best_iteration is not None:\n",
    "            try:\n",
    "                return booster.predict(dmat, iteration_range=(0, booster.best_iteration + 1))\n",
    "            except Exception:\n",
    "                try:\n",
    "                    return booster.predict(dmat, ntree_limit=getattr(booster, 'best_ntree_limit', 0) or None)\n",
    "                except Exception:\n",
    "                    return booster.predict(dmat)\n",
    "        return booster.predict(dmat)\n",
    "    def _train_single(self, params, X_train, y_train_col, X_val=None, y_val_col=None, esr=None):\n",
    "        n_estimators = params.pop('n_estimators', 200)\n",
    "        use_val = (X_val is not None and y_val_col is not None)\n",
    "        # Attempt sklearn API with early stopping placed in constructor (newer API) if possible\n",
    "        if esr and use_val:\n",
    "            try:\n",
    "                model = xgb.XGBRegressor(**params, n_estimators=n_estimators, early_stopping_rounds=esr)\n",
    "                model.fit(X_train, y_train_col, eval_set=[(X_val, y_val_col)], verbose=False)\n",
    "                return model\n",
    "            except TypeError:\n",
    "                # Fall back to native booster path\n",
    "                pass\n",
    "            except xgb.core.XGBoostError as e:\n",
    "                if 'gpu_hist' in str(params.get('tree_method','')):\n",
    "                    params['tree_method'] = 'hist'\n",
    "                else:\n",
    "                    raise e\n",
    "        # Native booster path\n",
    "        dtrain = xgb.DMatrix(X_train, label=y_train_col)\n",
    "        booster = None\n",
    "        try:\n",
    "            if use_val:\n",
    "                dval = xgb.DMatrix(X_val, label=y_val_col)\n",
    "                booster = xgb.train({k: v for k,v in params.items() if k != 'n_estimators'}, dtrain,\n",
    "                                    num_boost_round=n_estimators,\n",
    "                                    evals=[(dval,'validation')],\n",
    "                                    early_stopping_rounds=esr if esr else None,\n",
    "                                    verbose_eval=False)\n",
    "            else:\n",
    "                booster = xgb.train({k: v for k,v in params.items() if k != 'n_estimators'}, dtrain,\n",
    "                                    num_boost_round=n_estimators,\n",
    "                                    verbose_eval=False)\n",
    "        except xgb.core.XGBoostError as e:\n",
    "            if 'gpu_hist' in str(params.get('tree_method','')):\n",
    "                params['tree_method'] = 'hist'\n",
    "                return self._train_single(params, X_train, y_train_col, X_val, y_val_col, esr)\n",
    "            else:\n",
    "                raise e\n",
    "        return booster\n",
    "    def train(self, X_train, y_train, X_val=None, y_val=None, target_cols=None, verbose=False):\n",
    "        targets = list(target_cols) if target_cols is not None else list(y_train.columns)\n",
    "        metrics = {}\n",
    "        esr = self.early_stopping_rounds\n",
    "        for i, t in enumerate(targets):\n",
    "            if verbose and i % 50 == 0:\n",
    "                print(f'Training XGB {i}/{len(targets)} -> {t}')\n",
    "            params = dict(self.params)\n",
    "            model = self._train_single(params, X_train, y_train[t], X_val, y_val[t] if y_val is not None else None, esr)\n",
    "            self.models[t] = model\n",
    "            if X_val is not None and y_val is not None:\n",
    "                if isinstance(model, xgb.XGBRegressor):\n",
    "                    pred = model.predict(X_val)\n",
    "                else:\n",
    "                    pred = self._predict_booster(model, X_val)\n",
    "                metrics[t] = float(mean_absolute_error(y_val[t], pred))\n",
    "        return metrics\n",
    "    def predict(self, X):\n",
    "        out = {}\n",
    "        for name, model in self.models.items():\n",
    "            if isinstance(model, xgb.XGBRegressor):\n",
    "                out[name] = model.predict(X)\n",
    "            else:\n",
    "                out[name] = self._predict_booster(model, X)\n",
    "        return pd.DataFrame(out, index=X.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "646fb3d0",
   "metadata": {},
   "outputs": [],
   "source": [
    "# TensorFlow Dense Regressor\n",
    "class DenseRegressor:\n",
    "    def __init__(self, input_dim: int, output_dim: int, params: dict):\n",
    "        self.input_dim = input_dim\n",
    "        self.output_dim = output_dim\n",
    "        self.params = params\n",
    "        self.model = None\n",
    "    def build(self):\n",
    "        p = self.params\n",
    "        model = keras.Sequential([\n",
    "            layers.Dense(p.get('units_1',512), activation='relu', input_shape=(self.input_dim,),\n",
    "                        kernel_regularizer=regularizers.l2(p.get('l2_reg',1e-4))),\n",
    "            layers.BatchNormalization(), layers.Dropout(p.get('dropout',0.3)),\n",
    "            layers.Dense(p.get('units_2',256), activation='relu',\n",
    "                        kernel_regularizer=regularizers.l2(p.get('l2_reg',1e-4))),\n",
    "            layers.BatchNormalization(), layers.Dropout(p.get('dropout',0.3)),\n",
    "            layers.Dense(p.get('units_3',128), activation='relu',\n",
    "                        kernel_regularizer=regularizers.l2(p.get('l2_reg',1e-4))),\n",
    "            layers.BatchNormalization(), layers.Dropout(p.get('dropout',0.3)),\n",
    "            layers.Dense(self.output_dim, activation='linear'),\n",
    "        ])\n",
    "        model.compile(optimizer=keras.optimizers.Adam(learning_rate=p.get('learning_rate',1e-3)),\n",
    "                      loss='mse', metrics=['mae'])\n",
    "        self.model = model\n",
    "        return model\n",
    "    def train(self, X_train, y_train, X_val=None, y_val=None, epochs=20, batch_size=64, verbose=0):\n",
    "        if self.model is None: self.build()\n",
    "        return self.model.fit(X_train, y_train, validation_data=(X_val,y_val) if X_val is not None else None,\n",
    "                               epochs=epochs, batch_size=batch_size, verbose=verbose, callbacks=[keras.callbacks.EarlyStopping(patience=5, restore_best_weights=True, monitor='val_loss')])\n",
    "    def predict(self, X):\n",
    "        arr = self.model.predict(X, verbose=0)\n",
    "        return pd.DataFrame(arr, columns=[f'target_{i}' for i in range(self.output_dim)], index=X.index)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 7,
   "id": "cecb308e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Ensemble\n",
    "class WeightedEnsemble:\n",
    "    def __init__(self, xgb_model, tf_model, xgb_weight: float = 0.5):\n",
    "        self.xgb_model = xgb_model\n",
    "        self.tf_model = tf_model\n",
    "        self.xgb_weight = float(xgb_weight)\n",
    "        self.tf_weight = 1.0 - float(xgb_weight)\n",
    "    def predict(self, X_test, X_test_scaled=None):\n",
    "        xgb_pred = self.xgb_model.predict(X_test) if self.xgb_model else None\n",
    "        tf_pred = self.tf_model.predict(X_test_scaled if X_test_scaled is not None else X_test) if self.tf_model else None\n",
    "        if xgb_pred is not None and tf_pred is not None:\n",
    "            common = list(set(xgb_pred.columns) & set(tf_pred.columns))\n",
    "            out = pd.DataFrame(index=X_test.index)\n",
    "            if common:\n",
    "                out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
    "            for only_df in [(xgb_pred, tf_pred), (tf_pred, xgb_pred)]:\n",
    "                diff = list(set(only_df[0].columns) - set(only_df[1].columns))\n",
    "                if diff: out[diff] = only_df[0][diff]\n",
    "            return out\n",
    "        return xgb_pred if xgb_pred is not None else tf_pred"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "50480e9e",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Embedded Hyperparameters (best found offline)\n",
    "BEST_PARAMS = {\n",
    "  'xgb_n_estimators': 192, 'xgb_max_depth': 5, 'xgb_learning_rate': 0.10081909503644505,\n",
    "  'xgb_subsample': 0.6590185630426943, 'xgb_colsample_bytree': 0.9192271303937907,\n",
    "  'xgb_reg_alpha': 0.953074368838894, 'xgb_reg_lambda': 0.907725331736966, 'xgb_gamma': 1.2415141783958787,\n",
    "  'xgb_min_child_weight': 10, 'tf_units_1': 122, 'tf_units_2': 96, 'tf_units_3': 28,\n",
    "  'tf_dropout': 0.4937014889715655, 'tf_l2_reg': 0.0025342740020851354, 'tf_learning_rate': 0.0016731393654289934,\n",
    "  'tf_batch_size': 64, 'ensemble_xgb_weight': 0.685080521810202\n",
    "}\n",
    "\n",
    "def _detect_gpu_support():\n",
    "    \"\"\"Return True if a trivial gpu_hist training succeeds; False otherwise.\"\"\"\n",
    "    import numpy as _np\n",
    "    try:\n",
    "        dtest = xgb.DMatrix(_np.array([[0,0],[1,1]], dtype=float), label=[0,1])\n",
    "        xgb.train({'tree_method':'gpu_hist','objective':'reg:squarederror', 'verbosity': 0}, dtest, num_boost_round=1)\n",
    "        return True\n",
    "    except Exception:\n",
    "        return False\n",
    "\n",
    "def get_xgb_params(best, gpu_available=None):\n",
    "    if gpu_available is None:\n",
    "        gpu_available = _detect_gpu_support()\n",
    "    # Early stopping intentionally handled in wrapper; limit trees via n_estimators; wrapper may early stop.\n",
    "    return {\n",
    "        'objective':'reg:squarederror','eval_metric':'mae','random_state':RANDOM_SEED,'verbosity':0,\n",
    "        'n_estimators': best['xgb_n_estimators'],'max_depth':best['xgb_max_depth'],\n",
    "        'learning_rate':best['xgb_learning_rate'],'subsample':best['xgb_subsample'],\n",
    "        'colsample_bytree':best['xgb_colsample_bytree'],'reg_alpha':best['xgb_reg_alpha'],\n",
    "        'reg_lambda':best['xgb_reg_lambda'],'gamma':best['xgb_gamma'],\n",
    "        'min_child_weight':best['xgb_min_child_weight'],\n",
    "        'tree_method': 'gpu_hist' if gpu_available else 'hist'\n",
    "    }\n",
    "\n",
    "def get_tf_params(best):\n",
    "    return {\n",
    "        'units_1': best['tf_units_1'], 'units_2': best['tf_units_2'], 'units_3': best['tf_units_3'],\n",
    "        'dropout': best['tf_dropout'], 'l2_reg': best['tf_l2_reg'], 'learning_rate': best['tf_learning_rate']\n",
    "    }"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "b6d1c2a2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1917, 558) (1917, 425) (90, 559)\n",
      "Train date range: 0 - 1916\n",
      "Test date range: 1827 - 1916\n",
      "Detected price-like columns: 212\n",
      "Time split threshold date_id: 1533\n",
      "Train/Val shapes: (1534, 677) (383, 677)\n",
      "Time split threshold date_id: 1533\n",
      "Train/Val shapes: (1534, 677) (383, 677)\n"
     ]
    }
   ],
   "source": [
    "# Load Data\n",
    "train = pd.read_csv(DATA_PATH / 'train.csv')\n",
    "train_labels = pd.read_csv(DATA_PATH / 'train_labels.csv')\n",
    "test = pd.read_csv(DATA_PATH / 'test.csv')\n",
    "print(train.shape, train_labels.shape, test.shape)\n",
    "print('Train date range:', train.date_id.min(), '-', train.date_id.max())\n",
    "print('Test date range:', test.date_id.min(), '-', test.date_id.max())\n",
    "# Identify price columns and engineer features\n",
    "price_cols = infer_price_columns(train)\n",
    "print('Detected price-like columns:', len(price_cols))\n",
    "train_fe = create_technical_features_fast(train, limit_cols=LIMIT_PRICE_COLS, price_cols=price_cols)\n",
    "test_fe = create_technical_features_fast(test, limit_cols=LIMIT_PRICE_COLS, price_cols=price_cols)\n",
    "# Fill missing (simple)\n",
    "train_fe = train_fe.ffill().bfill()\n",
    "test_fe = test_fe.ffill().bfill()\n",
    "X_train_raw, y_train, X_test_raw, feature_cols, target_cols = build_feature_target_frames(train_fe, train_labels, test_fe)\n",
    "X_train_raw = X_train_raw.fillna(X_train_raw.median(numeric_only=True))\n",
    "X_test_raw = X_test_raw.fillna(X_train_raw.median(numeric_only=True))\n",
    "y_train = y_train.fillna(0)\n",
    "X_train_scaled, X_test_scaled, scaler = scale_features(X_train_raw, X_test_raw)\n",
    "mask_tr, mask_val, split_thresh = time_split_mask(train_labels['date_id'], train_frac=0.8)\n",
    "print('Time split threshold date_id:', split_thresh)\n",
    "X_tr, X_val = X_train_raw[mask_tr], X_train_raw[mask_val]\n",
    "X_tr_s, X_val_s = X_train_scaled[mask_tr], X_train_scaled[mask_val]\n",
    "y_tr, y_val = y_train[mask_tr], y_train[mask_val]\n",
    "print('Train/Val shapes:', X_tr.shape, X_val.shape)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 10,
   "id": "2c20a424",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "GPU available for XGBoost: True\n",
      "Training XGB 0/424 -> target_0\n",
      "Training XGB 50/424 -> target_50\n",
      "Training XGB 50/424 -> target_50\n",
      "Training XGB 100/424 -> target_100\n",
      "Training XGB 100/424 -> target_100\n",
      "Training XGB 150/424 -> target_150\n",
      "Training XGB 150/424 -> target_150\n",
      "Training XGB 200/424 -> target_200\n",
      "Training XGB 200/424 -> target_200\n",
      "Training XGB 250/424 -> target_250\n",
      "Training XGB 250/424 -> target_250\n",
      "Training XGB 300/424 -> target_300\n",
      "Training XGB 300/424 -> target_300\n",
      "Training XGB 350/424 -> target_350\n",
      "Training XGB 350/424 -> target_350\n",
      "Training XGB 400/424 -> target_400\n",
      "Training XGB 400/424 -> target_400\n",
      "Sample XGB val MAE: [('target_0', 0.00608797863113367), ('target_1', 0.00936240047637425), ('target_2', 0.009030529160395432), ('target_3', 0.009468038295729307), ('target_4', 0.009746642971561045)]\n",
      "Sample XGB val MAE: [('target_0', 0.00608797863113367), ('target_1', 0.00936240047637425), ('target_2', 0.009030529160395432), ('target_3', 0.009468038295729307), ('target_4', 0.009746642971561045)]\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/home/asier/miniconda3/envs/tf-gpu/lib/python3.10/site-packages/keras/src/layers/core/dense.py:87: UserWarning: Do not pass an `input_shape`/`input_dim` argument to a layer. When using Sequential models, prefer using an `Input(shape)` object as the first layer in the model instead.\n",
      "  super().__init__(activity_regularizer=activity_regularizer, **kwargs)\n",
      "I0000 00:00:1755076057.516868   32645 gpu_device.cc:2022] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 3566 MB memory:  -> device: 0, name: NVIDIA GeForce RTX 3060 Laptop GPU, pci bus id: 0000:01:00.0, compute capability: 8.6\n",
      "I0000 00:00:1755076061.388125   34317 service.cc:148] XLA service 0x4d5c82b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
      "I0000 00:00:1755076061.388205   34317 service.cc:156]   StreamExecutor device (0): NVIDIA GeForce RTX 3060 Laptop GPU, Compute Capability 8.6\n",
      "2025-08-13 11:07:41.500520: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:268] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable.\n",
      "I0000 00:00:1755076061.388125   34317 service.cc:148] XLA service 0x4d5c82b0 initialized for platform CUDA (this does not guarantee that XLA will be used). Devices:\n",
      "I0000 00:00:1755076061.388205   34317 service.cc:156]   StreamExecutor device (0): NVIDIA GeForce RTX 3060 Laptop GPU, Compute Capability 8.6\n",
      "2025-08-13 11:07:41.500520: I tensorflow/compiler/mlir/tensorflow/utils/dump_mlir_util.cc:268] disabling MLIR crash reproducer, set env var `MLIR_CRASH_REPRODUCER_DIRECTORY` to enable.\n",
      "I0000 00:00:1755076061.836901   34317 cuda_dnn.cc:529] Loaded cuDNN version 90101\n",
      "I0000 00:00:1755076061.836901   34317 cuda_dnn.cc:529] Loaded cuDNN version 90101\n",
      "I0000 00:00:1755076066.651575   34317 device_compiler.h:188] Compiled cluster using XLA!  This line is logged at most once for the lifetime of the process.\n",
      "I0000 00:00:1755076066.651575   34317 device_compiler.h:188] Compiled cluster using XLA!  This line is logged at most once for the lifetime of the process.\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "TF final val loss: 0.0006537325098179281\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Approx validation competition score: -0.03892450401739857\n"
     ]
    }
   ],
   "source": [
    "# Train Models\n",
    "xgb_model = None\n",
    "if TRAIN_XGB:\n",
    "    gpu_available = _detect_gpu_support()\n",
    "    print('GPU available for XGBoost:', gpu_available)\n",
    "    xgb_params = get_xgb_params(BEST_PARAMS, gpu_available=gpu_available)\n",
    "    xgb_model = MultiTargetXGB(params=xgb_params, early_stopping_rounds=XGB_EARLY_STOP)\n",
    "    xgb_metrics = xgb_model.train(X_tr, y_tr, X_val=X_val, y_val=y_val, target_cols=target_cols, verbose=True)\n",
    "    if xgb_metrics:\n",
    "        sample_mae = list(xgb_metrics.items())[:5]\n",
    "        print('Sample XGB val MAE:', sample_mae)\n",
    "\n",
    "tf_model = None\n",
    "if TRAIN_TF:\n",
    "    tf_params = get_tf_params(BEST_PARAMS)\n",
    "    tf_model = DenseRegressor(input_dim=X_train_scaled.shape[1], output_dim=len(target_cols), params=tf_params)\n",
    "    tf_model.build()\n",
    "    hist = tf_model.train(X_tr_s, y_tr, X_val_s, y_val, epochs=TF_EPOCHS, batch_size=BEST_PARAMS['tf_batch_size'], verbose=TF_VERBOSE)\n",
    "    print('TF final val loss:', hist.history['val_loss'][-1] if 'val_loss' in hist.history else None)\n",
    "\n",
    "# Optional validation score (indicative only)\n",
    "if TRAIN_XGB or TRAIN_TF:\n",
    "    if USE_ENSEMBLE and (xgb_model is not None) and (tf_model is not None):\n",
    "        ens = WeightedEnsemble(xgb_model, tf_model, xgb_weight=BEST_PARAMS['ensemble_xgb_weight'])\n",
    "        val_pred = ens.predict(X_val, X_val_s)\n",
    "    else:\n",
    "        if xgb_model is not None:\n",
    "            val_pred = xgb_model.predict(X_val)\n",
    "        else:\n",
    "            val_pred = tf_model.predict(X_val_s)\n",
    "    merged_val = make_validation_dataframe(y_val, val_pred)\n",
    "    try:\n",
    "        val_score = rank_correlation_sharpe_ratio(merged_val)\n",
    "        print('Approx validation competition score:', val_score)\n",
    "    except Exception as e:\n",
    "        print('Validation scoring failed:', e)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "24169319",
   "metadata": {},
   "outputs": [
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n",
      "/tmp/ipykernel_32645/2578926707.py:15: PerformanceWarning: DataFrame is highly fragmented.  This is usually the result of calling `frame.insert` many times, which has poor performance.  Consider joining all columns at once using pd.concat(axis=1) instead. To get a de-fragmented frame, use `newframe = frame.copy()`\n",
      "  out[common] = self.xgb_weight * xgb_pred[common] + self.tf_weight * tf_pred[common]\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Saved submission.parquet & submission.csv with shape (90, 425)\n"
     ]
    },
    {
     "data": {
      "text/html": [
       "<div>\n",
       "<style scoped>\n",
       "    .dataframe tbody tr th:only-of-type {\n",
       "        vertical-align: middle;\n",
       "    }\n",
       "\n",
       "    .dataframe tbody tr th {\n",
       "        vertical-align: top;\n",
       "    }\n",
       "\n",
       "    .dataframe thead th {\n",
       "        text-align: right;\n",
       "    }\n",
       "</style>\n",
       "<table border=\"1\" class=\"dataframe\">\n",
       "  <thead>\n",
       "    <tr style=\"text-align: right;\">\n",
       "      <th></th>\n",
       "      <th>row_id</th>\n",
       "      <th>target_0</th>\n",
       "      <th>target_1</th>\n",
       "      <th>target_2</th>\n",
       "      <th>target_3</th>\n",
       "      <th>target_4</th>\n",
       "      <th>target_5</th>\n",
       "      <th>target_6</th>\n",
       "      <th>target_7</th>\n",
       "      <th>target_8</th>\n",
       "      <th>...</th>\n",
       "      <th>target_414</th>\n",
       "      <th>target_415</th>\n",
       "      <th>target_416</th>\n",
       "      <th>target_417</th>\n",
       "      <th>target_418</th>\n",
       "      <th>target_419</th>\n",
       "      <th>target_420</th>\n",
       "      <th>target_421</th>\n",
       "      <th>target_422</th>\n",
       "      <th>target_423</th>\n",
       "    </tr>\n",
       "  </thead>\n",
       "  <tbody>\n",
       "    <tr>\n",
       "      <th>0</th>\n",
       "      <td>1827</td>\n",
       "      <td>0.000216</td>\n",
       "      <td>-0.000243</td>\n",
       "      <td>0.000257</td>\n",
       "      <td>0.000049</td>\n",
       "      <td>-0.000308</td>\n",
       "      <td>-0.000067</td>\n",
       "      <td>-0.000092</td>\n",
       "      <td>-0.000206</td>\n",
       "      <td>-0.000471</td>\n",
       "      <td>...</td>\n",
       "      <td>0.001314</td>\n",
       "      <td>0.000336</td>\n",
       "      <td>-0.000434</td>\n",
       "      <td>-0.00019</td>\n",
       "      <td>-0.000058</td>\n",
       "      <td>-0.000914</td>\n",
       "      <td>0.001063</td>\n",
       "      <td>0.000839</td>\n",
       "      <td>0.001076</td>\n",
       "      <td>-0.002382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>1</th>\n",
       "      <td>1828</td>\n",
       "      <td>0.000216</td>\n",
       "      <td>-0.000243</td>\n",
       "      <td>0.000257</td>\n",
       "      <td>0.000049</td>\n",
       "      <td>-0.000308</td>\n",
       "      <td>-0.000067</td>\n",
       "      <td>-0.000092</td>\n",
       "      <td>-0.000206</td>\n",
       "      <td>-0.000471</td>\n",
       "      <td>...</td>\n",
       "      <td>0.001314</td>\n",
       "      <td>0.000336</td>\n",
       "      <td>-0.000434</td>\n",
       "      <td>-0.00019</td>\n",
       "      <td>-0.000058</td>\n",
       "      <td>-0.000914</td>\n",
       "      <td>0.001063</td>\n",
       "      <td>0.000839</td>\n",
       "      <td>0.001076</td>\n",
       "      <td>-0.002382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>2</th>\n",
       "      <td>1829</td>\n",
       "      <td>0.000216</td>\n",
       "      <td>-0.000243</td>\n",
       "      <td>0.000257</td>\n",
       "      <td>0.000049</td>\n",
       "      <td>-0.000308</td>\n",
       "      <td>-0.000067</td>\n",
       "      <td>-0.000092</td>\n",
       "      <td>-0.000206</td>\n",
       "      <td>-0.000471</td>\n",
       "      <td>...</td>\n",
       "      <td>0.001314</td>\n",
       "      <td>0.000336</td>\n",
       "      <td>-0.000434</td>\n",
       "      <td>-0.00019</td>\n",
       "      <td>-0.000058</td>\n",
       "      <td>-0.000914</td>\n",
       "      <td>0.001063</td>\n",
       "      <td>0.000839</td>\n",
       "      <td>0.001076</td>\n",
       "      <td>-0.002382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>3</th>\n",
       "      <td>1830</td>\n",
       "      <td>0.000216</td>\n",
       "      <td>-0.000243</td>\n",
       "      <td>0.000257</td>\n",
       "      <td>0.000049</td>\n",
       "      <td>-0.000308</td>\n",
       "      <td>-0.000067</td>\n",
       "      <td>-0.000092</td>\n",
       "      <td>-0.000206</td>\n",
       "      <td>-0.000471</td>\n",
       "      <td>...</td>\n",
       "      <td>0.001314</td>\n",
       "      <td>0.000336</td>\n",
       "      <td>-0.000434</td>\n",
       "      <td>-0.00019</td>\n",
       "      <td>-0.000058</td>\n",
       "      <td>-0.000914</td>\n",
       "      <td>0.001063</td>\n",
       "      <td>0.000839</td>\n",
       "      <td>0.001076</td>\n",
       "      <td>-0.002382</td>\n",
       "    </tr>\n",
       "    <tr>\n",
       "      <th>4</th>\n",
       "      <td>1831</td>\n",
       "      <td>0.000216</td>\n",
       "      <td>-0.000243</td>\n",
       "      <td>0.000257</td>\n",
       "      <td>0.000049</td>\n",
       "      <td>-0.000308</td>\n",
       "      <td>-0.000067</td>\n",
       "      <td>-0.000092</td>\n",
       "      <td>-0.000206</td>\n",
       "      <td>-0.000471</td>\n",
       "      <td>...</td>\n",
       "      <td>0.001314</td>\n",
       "      <td>0.000336</td>\n",
       "      <td>-0.000434</td>\n",
       "      <td>-0.00019</td>\n",
       "      <td>-0.000058</td>\n",
       "      <td>-0.000914</td>\n",
       "      <td>0.001063</td>\n",
       "      <td>0.000839</td>\n",
       "      <td>0.001076</td>\n",
       "      <td>-0.002382</td>\n",
       "    </tr>\n",
       "  </tbody>\n",
       "</table>\n",
       "<p>5 rows × 425 columns</p>\n",
       "</div>"
      ],
      "text/plain": [
       "   row_id  target_0  target_1  target_2  target_3  target_4  target_5  \\\n",
       "0    1827  0.000216 -0.000243  0.000257  0.000049 -0.000308 -0.000067   \n",
       "1    1828  0.000216 -0.000243  0.000257  0.000049 -0.000308 -0.000067   \n",
       "2    1829  0.000216 -0.000243  0.000257  0.000049 -0.000308 -0.000067   \n",
       "3    1830  0.000216 -0.000243  0.000257  0.000049 -0.000308 -0.000067   \n",
       "4    1831  0.000216 -0.000243  0.000257  0.000049 -0.000308 -0.000067   \n",
       "\n",
       "   target_6  target_7  target_8  ...  target_414  target_415  target_416  \\\n",
       "0 -0.000092 -0.000206 -0.000471  ...    0.001314    0.000336   -0.000434   \n",
       "1 -0.000092 -0.000206 -0.000471  ...    0.001314    0.000336   -0.000434   \n",
       "2 -0.000092 -0.000206 -0.000471  ...    0.001314    0.000336   -0.000434   \n",
       "3 -0.000092 -0.000206 -0.000471  ...    0.001314    0.000336   -0.000434   \n",
       "4 -0.000092 -0.000206 -0.000471  ...    0.001314    0.000336   -0.000434   \n",
       "\n",
       "   target_417  target_418  target_419  target_420  target_421  target_422  \\\n",
       "0    -0.00019   -0.000058   -0.000914    0.001063    0.000839    0.001076   \n",
       "1    -0.00019   -0.000058   -0.000914    0.001063    0.000839    0.001076   \n",
       "2    -0.00019   -0.000058   -0.000914    0.001063    0.000839    0.001076   \n",
       "3    -0.00019   -0.000058   -0.000914    0.001063    0.000839    0.001076   \n",
       "4    -0.00019   -0.000058   -0.000914    0.001063    0.000839    0.001076   \n",
       "\n",
       "   target_423  \n",
       "0   -0.002382  \n",
       "1   -0.002382  \n",
       "2   -0.002382  \n",
       "3   -0.002382  \n",
       "4   -0.002382  \n",
       "\n",
       "[5 rows x 425 columns]"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "# Predict Test & Build Submission\n",
    "if USE_ENSEMBLE and (xgb_model is not None) and (tf_model is not None):\n",
    "    ensemble = WeightedEnsemble(xgb_model, tf_model, xgb_weight=BEST_PARAMS['ensemble_xgb_weight'])\n",
    "    test_pred = ensemble.predict(X_test_raw, X_test_scaled)\n",
    "elif xgb_model is not None:\n",
    "    test_pred = xgb_model.predict(X_test_raw)\n",
    "else:\n",
    "    test_pred = tf_model.predict(X_test_scaled)\n",
    "# Align columns (ensure all targets present)\n",
    "missing = [c for c in target_cols if c not in test_pred.columns]\n",
    "for m in missing: test_pred[m] = 0.0\n",
    "# Order and enforce float32 for size efficiency\n",
    "for c in target_cols:\n",
    "    if test_pred[c].dtype != 'float32':\n",
    "        test_pred[c] = test_pred[c].astype('float32')\n",
    "test_pred = test_pred[target_cols]  # order\n",
    "# Kaggle expects a row_id column (mirrors date_id in labels) – unique dates in test.\n",
    "submission = pd.DataFrame({'row_id': sorted(test.date_id.unique())})\n",
    "if len(submission) != len(test_pred):\n",
    "    # Fallback: match by index length (train_labels style)\n",
    "    submission = pd.DataFrame({'row_id': train_labels.date_id.tail(len(test_pred)).values})\n",
    "submission = pd.concat([submission.reset_index(drop=True), test_pred.reset_index(drop=True)], axis=1)\n",
    "# Write both required parquet (competition requirement) and a CSV for local inspection\n",
    "submission.to_parquet('submission.parquet', index=False)\n",
    "# submission.to_csv('submission.csv', index=False) #not good for this kaggle competition\n",
    "# print('Saved submission.parquet & submission.csv with shape', submission.shape)\n",
    "print('Saved submission.parquet with shape', submission.shape)\n",
    "submission.head()"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "05ae4063",
   "metadata": {},
   "source": [
    "## Next Steps / Adjustments\n",
    "- Increase TF_EPOCHS or remove LIMIT_PRICE_COLS for potentially higher accuracy (watch runtime).\n",
    "- Add lagged target features (not included here for brevity).\n",
    "- Implement feature selection or dimensionality reduction to speed up XGB.\n",
    "- Use more advanced ensembling (e.g., linear weights via validation optimization).\n",
    "\n",
    "Outputs: This notebook now saves both `submission.parquet` (required by competition) and `submission.csv` (for local viewing). On Kaggle, ensure the version you submit has executed the final cell so `submission.parquet` exists.\n",
    "\n",
    "Submit this notebook (with internet disabled) to Kaggle. The produced `submission.parquet` will be used by the evaluation server."
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "85b8c7d2",
   "metadata": {},
   "outputs": [],
   "source": [
    "# Inference Server Integration for Mitsui Competition (streaming API)\n",
    "import polars as pl\n",
    "import kaggle_evaluation.mitsui_inference_server as _mitsui_srv\n",
    "\n",
    "_NUM_TARGET_COLUMNS = 424\n",
    "\n",
    "# Cache models for first predict call (lazy load if not already trained in this run)\n",
    "_inference_initialized = False\n",
    "_xgb_model_cached = None\n",
    "_tf_model_cached = None\n",
    "_feature_cols_cached = None\n",
    "_price_cols_cached = None\n",
    "\n",
    "# Minimal feature engineering reuse (mirror training logic for single-row batch)\n",
    "\n",
    "def _ensure_models_loaded():\n",
    "    global _inference_initialized, _xgb_model_cached, _tf_model_cached, _feature_cols_cached, _price_cols_cached\n",
    "    if _inference_initialized:\n",
    "        return\n",
    "    # Reuse already-trained notebook models if available\n",
    "    if 'xgb_model' in globals() and xgb_model is not None:\n",
    "        _xgb_model_cached = xgb_model\n",
    "    if 'tf_model' in globals() and tf_model is not None:  # fixed warning: removed literal string comparison\n",
    "        _tf_model_cached = tf_model\n",
    "    # Fallback: (Optional) Load serialized models if you decide to persist them between runs.\n",
    "    _feature_cols_cached = feature_cols if 'feature_cols' in globals() else None\n",
    "    _price_cols_cached = price_cols if 'price_cols' in globals() else None\n",
    "    _inference_initialized = True\n",
    "\n",
    "\n",
    "def _fe_single_polars(test_batch_pl: pl.DataFrame) -> pd.DataFrame:\n",
    "    # Convert to pandas for existing pipeline; could be optimized to stay in polars.\n",
    "    pdf = test_batch_pl.to_pandas()\n",
    "    fe = create_technical_features_fast(pdf, limit_cols=LIMIT_PRICE_COLS, price_cols=_price_cols_cached)\n",
    "    fe = fe.ffill().bfill().fillna(0)\n",
    "    # Align feature columns used in training\n",
    "    if _feature_cols_cached is not None:\n",
    "        missing = [c for c in _feature_cols_cached if c not in fe.columns]\n",
    "        for m in missing:\n",
    "            fe[m] = 0.0\n",
    "        fe = fe[_feature_cols_cached]\n",
    "    fe = fe.fillna(0)\n",
    "    return fe\n",
    "\n",
    "\n",
    "def predict(test: pl.DataFrame,\n",
    "            label_lags_1_batch: pl.DataFrame,\n",
    "            label_lags_2_batch: pl.DataFrame,\n",
    "            label_lags_3_batch: pl.DataFrame,\n",
    "            label_lags_4_batch: pl.DataFrame) -> pl.DataFrame | pd.DataFrame:\n",
    "    \"\"\"Streaming predict function invoked per date batch by Kaggle gateway.\n",
    "    Expects a single-row test batch (one date_id). Returns single-row predictions.\n",
    "    \"\"\"\n",
    "    _ensure_models_loaded()\n",
    "    # Feature engineering + selection\n",
    "    X_batch = _fe_single_polars(test)\n",
    "    # Scale if scaler available\n",
    "    if 'scaler' in globals():\n",
    "        try:\n",
    "            X_batch_scaled = pd.DataFrame(scaler.transform(X_batch), columns=X_batch.columns, index=X_batch.index)\n",
    "        except Exception:\n",
    "            X_batch_scaled = X_batch\n",
    "    else:\n",
    "        X_batch_scaled = X_batch\n",
    "\n",
    "    preds_list = []\n",
    "    if _xgb_model_cached is not None:\n",
    "        p_xgb = _xgb_model_cached.predict(X_batch)\n",
    "        preds_list.append(p_xgb)\n",
    "    if _tf_model_cached is not None:\n",
    "        p_tf = _tf_model_cached.predict(X_batch_scaled)\n",
    "        preds_list.append(p_tf)\n",
    "    if preds_list:\n",
    "        # Simple weighted blend mirroring training ensemble config\n",
    "        if len(preds_list) == 2 and USE_ENSEMBLE:\n",
    "            common = list(set(preds_list[0].columns) & set(preds_list[1].columns))\n",
    "            blend = pd.DataFrame(index=preds_list[0].index)\n",
    "            if common:\n",
    "                blend[common] = (BEST_PARAMS['ensemble_xgb_weight'] * preds_list[0][common] +\n",
    "                                 (1 - BEST_PARAMS['ensemble_xgb_weight']) * preds_list[1][common])\n",
    "            # Include any non-overlapping columns\n",
    "            for a, b in [(preds_list[0], preds_list[1]), (preds_list[1], preds_list[0])]:\n",
    "                diff = list(set(a.columns) - set(b.columns))\n",
    "                if diff:\n",
    "                    blend[diff] = a[diff]\n",
    "            final_pred = blend\n",
    "        else:\n",
    "            final_pred = preds_list[0]\n",
    "    else:\n",
    "        # Fallback: predict zeros to satisfy interface\n",
    "        final_pred = pd.DataFrame({f'target_{i}': [0.0] for i in range(_NUM_TARGET_COLUMNS)})\n",
    "\n",
    "    # Ensure single row and all target columns present\n",
    "    if len(final_pred) == 0:\n",
    "        final_pred = pd.DataFrame({f'target_{i}': [0.0] for i in range(_NUM_TARGET_COLUMNS)})\n",
    "    if len(final_pred) > 1:\n",
    "        final_pred = final_pred.iloc[[0]]\n",
    "    missing_targets = [f'target_{i}' for i in range(_NUM_TARGET_COLUMNS) if f'target_{i}' not in final_pred.columns]\n",
    "    for mt in missing_targets:\n",
    "        final_pred[mt] = 0.0\n",
    "    final_pred = final_pred[[f'target_{i}' for i in range(_NUM_TARGET_COLUMNS)]]\n",
    "    # Convert to polars for speed (optional)\n",
    "    return pl.from_pandas(final_pred)\n",
    "\n",
    "# Start the inference server (local gateway for debug vs serve for Kaggle rerun)\n",
    "inference_server = _mitsui_srv.MitsuiInferenceServer(predict)\n",
    "if os.getenv('KAGGLE_IS_COMPETITION_RERUN'):\n",
    "    # Kaggle hidden test run expects server to start quickly\n",
    "    inference_server.serve()\n",
    "else:\n",
    "    # Local simulation (optional); comment out for faster manual experimentation\n",
    "    # inference_server.run_local_gateway((str(DATA_PATH),))\n",
    "    pass"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "tf-gpu",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.18"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
