• 0
Votes
name

A PHP Error was encountered

Severity: Notice

Message: Undefined index: userid

Filename: views/question.php

Line Number: 195

Backtrace:

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/views/question.php
Line: 195
Function: _error_handler

File: /home/u125378470/domains/lawhelpguru.org/public_html/application/controllers/Questions.php
Line: 416
Function: view

File: /home/u125378470/domains/lawhelpguru.org/public_html/index.php
Line: 315
Function: require_once

name Punditsdkoslkdosdkoskdo

How to prepare dataset for a tf.estimator model?

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