Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

I am training a dataset with age in humans and when I run model's compile metrics='accuracy', I don't want it to compute the exact accuracy,

I am training a dataset with age in humans and when I run model's compile metrics='accuracy', I don't want it to compute the exact accuracy, but just look for a certain age range and compute the accuracy if it correctly identifies the age range. I am wondering how I could do this. Can I simply edit the compile function?

So what I am starting with is

What I am trying to do is to extract the age, check if it is in a certain range, say 20 - 30 and then determine the accuracy based on if the program is correct in seeing it is 20 - 30 as opposed to checking the accuracy if the program can recognize the exact age. What I thought would be easiest is to add a new metric to the model.compile function seen in lines 71-72 of the train.py file

model.compile(optimizer=sgd, loss=["categorical_crossentropy", "categorical_crossentropy"], metrics=['accuracy'])

A problem I am having is I am not sure how to check the actual age from this file to plug it into the custom metric or even creating a callback

From here, I assume I would have to edit the plot_history.py file to actually plot the accuracy.

If anybody has any ideas, that would be a tremendous help

Thank you

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Essentials of Database Management

Authors: Jeffrey A. Hoffer, Heikki Topi, Ramesh Venkataraman

1st edition

133405680, 9780133547702 , 978-0133405682

More Books

Students also viewed these Databases questions

Question

What challenges does GE have to face in the HRM field today?

Answered: 1 week ago

Question

=+and non-compete agreements in three to five different countries.

Answered: 1 week ago