diff --git a/AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/IntelPython_XGBoost_Performance.ipynb b/AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/IntelPython_XGBoost_Performance.ipynb index 5ebc82f6bd..02420253a2 100755 --- a/AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/IntelPython_XGBoost_Performance.ipynb +++ b/AI-and-Analytics/Features-and-Functionality/IntelPython_XGBoost_Performance/IntelPython_XGBoost_Performance.ipynb @@ -126,13 +126,14 @@ "outputs": [], "source": [ "def load_higgs(nrows_train, nrows_test, dtype=np.float32):\n", - " if not os.path.isfile(\"./data/batch/HIGGS.csv.gz\"):\n", + " if not os.path.isfile(\"./HIGGS.csv.gz\"):\n", " print(\"Loading data set...\")\n", " url = \"https://archive.ics.uci.edu/ml/machine-learning-databases/00280/HIGGS.csv.gz\"\n", " myfile = requests.get(url)\n", - " open('./data/batch/HIGGS.csv.gz', 'wb').write(myfile.content)\n", + " with open('./HIGGS.csv.gz', 'wb') as f:\n", + " f.write(myfile.content)\n", " print(\"Reading data set...\")\n", - " data = pd.read_csv(\"./data/batch/HIGGS.csv.gz\", delimiter=\",\", header=None, compression=\"gzip\", dtype=dtype, nrows=nrows_train+nrows_test)\n", + " data = pd.read_csv(\"./HIGGS.csv.gz\", delimiter=\",\", header=None, compression=\"gzip\", dtype=dtype, nrows=nrows_train+nrows_test)\n", " print(\"Pre-processing data set...\")\n", " data = data[list(data.columns[1:])+list(data.columns[0:1])]\n", " n_features = data.shape[1]-1\n",