{
"cells": [
{
"cell_type": "markdown",
"source": [
"# Hybrid Gradient Boosting Trees Example via Unified Classification\n",
"\n",
"A data set that identifies whether or not a pentient has diabetes is used to demonstrate the use of hybrid graident boosting classifier in SAP HANA.\n",
"\n"
],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"# Pima Indians Diabetes Dataset\n",
"\n",
"Original data comes from National Institute of Diabetes and Digestive and Kidney Diseases. The collected dataset is aiming at, based on certain diagnostic measurements, diagnostically predicting whether or not a patient has diabetes. In particular, patients contained in the dataset are females of Pima Indian heritage, all above the age of 20. Dataset is form Kaggle, for tutorials use only.\n",
"\n",
"The dataset contains the following diagnositic attributes:
\n",
"$\\rhd$ \"PREGNANCIES\" - Number of times pregnant,
\n",
"$\\rhd$ \"GLUCOSE\" - Plasma glucose concentration a 2 hours in an oral glucose tolerance test,
\n",
"$\\rhd$ \"BLOODPRESSURE\" - Diastolic blood pressure (mm Hg),
\n",
"$\\rhd$ \"SKINTHICKNESS\" - Triceps skin fold thickness (mm),
\n",
"$\\rhd$ \"INSULIN\" - 2-Hour serum insulin (mu U/ml),
\n",
"$\\rhd$ \"BMI\" - Body mass index $(\\text{weight in kg})/(\\text{height in m})^2$,
\n",
"$\\rhd$ \"PEDIGREE\" - Diabetes pedigree function,
\n",
"$\\rhd$ \"AGE\" - Age (years),
\n",
"$\\rhd$ \"CLASS\" - Class variable (0 or 1) 268 of 768 are 1(diabetes), the others are 0(non-diabetes).\n",
"\n"
],
"metadata": {}
},
{
"cell_type": "code",
"execution_count": null,
"source": [
"import hana_ml\r\n",
"from hana_ml import dataframe\r\n",
"from hana_ml.algorithms.pal import metrics\r\n",
"from hana_ml.algorithms.pal.unified_classification import UnifiedClassification"
],
"outputs": [],
"metadata": {}
},
{
"cell_type": "markdown",
"source": [
"# Load Data\n",
"\n",
"The data is loaded into 3 tables - full set, training-validation set, and test set as follows:\n",
"\n",
"