Site Loader

Hardware UsedCPU specifications: Intel Corei5-5200U CPU @2.

20GHzRAM specifications: 8.00 GBSoftware UsedTensorFlow(Python-spyder IDE)Packages used. numpy,tensorflowtf.estimator(class of tensorflow)Defined in: tensorflow/python/estimator/ Estimator class to train and evaluate TensorFlow models.The Estimator object wraps a model specified by a model_fn, in which the inputis fed and along with other parameters, results the ops for training the set,determination of accuracy, or predictions.

Dataset DescriptionInthis work we have used ParkinsonsTelemonitoring Data Set1 from UCI Machine Learning Repository. This dataset is composed of a range of biomedical voice measurements from 42 people withParkinson’s disease in its early phase on a six-month trial of a telemonitoringdevice for remote symptom progression monitoring. The attributes of the table are subject number, subject age, subject gender,time interval from baseline recruitment date, motor UPDRS, total UPDRS, and 16biomedical voice measures. The rows contain 5,875 voice recordings of thesepatients. The objective of the dataset is to predict the motor and total UPDRSscores (‘motor_UPDRS’ and ‘total_UPDRS’) from the 16 voice measures of Parkinson’sTelemonitoring Dataset. The data is in ASCII CSV format.

Each row of the CSV file contains an instancecorresponding to one voice recording of each individual. There are around 200recordings per patient; the subject number of the patient is identified in thefirst column.Attribute Information:subject#- Integer that uniquely identifies each subject age – Subject age sex – Subject gender ‘0’ – male, ‘1’ – female test_time – Time since recruitment into the trial. The integer part is thenumber of days since recruitment.

motor_UPDRS – Clinician’s motor UPDRS score, linearly interpolated total_UPDRS – Clinician’s total UPDRS score, linearly interpolated Jitter(%),Jitter(Abs),Jitter:RAP,Jitter:PPQ5,Jitter:DDP – Several measures ofvariation in fundamental frequency.Shimmer,Shimmer(dB),Shimmer:APQ3,Shimmer:APQ5,Shimmer:APQ11,Shimmer:DDA- Several measures of variation in amplitude NHR,HNR – Two measures of ratio of noise to tonal components in the voice RPDE – A nonlinear dynamical complexity measure DFA – Signal fractal scaling exponent PPE – A nonlinear measure of fundamental frequency variationData Preprocessing:We have normalised our dataset using min-max normalization, the formula for thesame is:                = (Col. Value – minimumvalue for that column)/( maximum value for that column- minimum value for thatcolumn)Normalization of data means adjusting values which has been measured ondifferent scales to a typically accepted common scale, generally done beforeaveraging.

Min-max normalisation is often known as feature scaling. Here the values of anumeric range of an attribute of dataset, commonly called a property, arereduced to a scale between between 0 and 1.Predictiontf.estimator QuickstartThe tasks to be performed are:1.Load CSVs containing UPDRS training/test data into a TensorFlow Dataset2.Construct a neural network classifier3.

Train the model using the training data4.Evaluate the accuracy of the modelThe tf.estimator API uses input functions, which create the TensorFlowoperations that generate data for the model. We can usetf.estimator.inputs.numpy_input_fn to produce the input pipelineFit the DNNClassifier to the TrainingDataPass train_input_fn as the input_fn, and thenumber of steps to train (here, 2000):# Train model.classifier.

train(input_fn=train_input_fn, steps=2000)The state of the model is preserved in the classifier. It can be trainiteratively if need exists. The above code is equivalent to the following:classifier.

train(input_fn=train_input_fn, steps=1000)classifier.train(input_fn=train_input_fn, steps=1000)Evaluate Model AccuracyLike train, evaluate takes an input function that builds its input pipeline.evaluate returns a dict with the evaluation results. Pseudocodefrom __future__ import absolute_importfrom __future__ import divisionfrom __future__ import print_functionimport osfrom six.

moves.urllib.request import urlopenimport numpy as npimport tensorflow as tf# Data setsTRAINING = “Training-TotalUPDRS01.csv”TEST = “Test-TotalUPDRS01.csv”  # Load datasets.training_set = tf.contrib.learn.

datasets.base.load_csv_with_header(      filename=TRAINING,,      features_dtype=np.float32)test_set = tf.contrib.

learn.datasets.base.load_csv_with_header(      filename=TEST,,      features_dtype=np.

float32)  # Specify that all features havereal-value data  feature_columns =tf.feature_column.numeric_column(“x”, shape=16)  # Build 3 layer DNN with 10, 20, 10units respectively.  classifier =tf.estimator.DNNClassifier(feature_columns=feature_columns,                                          hidden_units=10, 20, 10,                                         n_classes=2,                                         model_dir=”/tmp/pd_model”)  # Define the training inputs  train_input_fn =tf.

estimator.inputs.numpy_input_fn(     x={“x”: np.array(},      y=np.array(training_set.

target),      num_epochs=None,      shuffle=True)  # Train model. classifier.train(input_fn=train_input_fn, steps=1000)  # Define the test inputs  test_input_fn = tf.estimator.

inputs.numpy_input_fn(      x={“x”:np.array(},      y=np.array(,      num_epochs=1,      shuffle=False)  print (“test inputvalue=.


“)  print(test_input_fn)   # Evaluate accuracy.  accuracy_score = classifier.evaluate(input_fn=test_input_fn)”accuracy”  print(“Test Accuracy:{0:f}”.format(accuracy_score))

Post Author: admin


I'm Dora!

Would you like to get a custom essay? How about receiving a customized one?

Check it out