import numpy as np
import pandas as pd
import tensorflow as tf
from sklearn.model_selection import train_test_split
wine=pd.read_csv(r"C:UserssubhaDocumentsMechineLearningWineStatwinequality-white.csv")
train, test = train_test_split(wine,test_size=0.2,random_state=0)
train_x = train[['fixed acidity', 'volatile acidity', 'citric acid', 'residual sugar',
'chlorides', 'free sulfur dioxide', 'total sulfur dioxide', 'density',
'pH', 'sulphates', 'alcohol']]
train_y=train["quality"]
test_x = test[['fixed acidity', 'volatile acidity', 'citric acid', 'residual sugar',
'chlorides', 'free sulfur dioxide', 'total sulfur dioxide', 'density',
'pH', 'sulphates', 'alcohol']]
test_y=test["quality"]
Here I am trying to convert this dataset to fit a tf.estimator model. I read lots of codes for keras but can't understand a tf.estimator model.
tf.estimator.BoostedTreesClassifier(
feature_columns, n_batches_per_layer, model_dir=None, n_classes=2,
weight_column=None, label_vocabulary=None, n_trees=100, max_depth=6,
learning_rate=0.1, l1_regularization=0.0, l2_regularization=0.0,
tree_complexity=0.0, min_node_weight=0.0, config=None, center_bias=False,
pruning_mode='none', quantile_sketch_epsilon=0.01, train_in_memory=False
)
how to prepare a dataset to feed this model?
Please help me. https://www.tensorflow.org/tutorials/estimator/boosted_trees_model_understanding