Enable contrast version

Tutor profile: Ahmed K.

Inactive
Ahmed K.
Arizona State University Graduate with Master in Comp Science, Bs in Computer Science
Tutor Satisfaction Guarantee

Questions

Subject: Python Programming

TutorMe
Question:

What is the best practice to debug a python code?

Inactive
Ahmed K.
Answer:

Since python executes the code line by line, it is best to debug the code one error at at time. In many cases, it is best to create sample test cases and execute them to ensure that there aren't logical errors with your code as well

Subject: Machine Learning

TutorMe
Question:

For classification tasks, should you always use accuracy as evaluation metric? Why or why not? Explain your answer

Inactive
Ahmed K.
Answer:

Accuracy is a useful measure for classification tasks but should not be solely relied on as an evaluation metric since it can be misleading. Take for an example a case of balanced dataset with 10 samples, i.e. a dataset with equal number of samples for 2 classes (cats and dogs). Such dataset would have 5 samples for cats class and 5 samples for dogs class. Now suppose the Machine Learning algorithm fails to learn the data and predicts cats class every time, i.e. regardless of the what the animal is the model will always predict cats. In such case, the accuracy of the model will be 50%. However, if the data is unbalanced (i.e has 9 samples for cats sample and only 1 sample for dog class). and we use the same model that has not learned form he data, the accuracy will now be 90% which can be give the illusion that the model is learning from the data and performing really well whereas in reality it not as it predicts all the samples as dogs which is not good. Therefore we should not only use accuracy as evaluation metrics and should use other metrics such as precision score and recall score.

Subject: Artificial Intelligence

TutorMe
Question:

When dealing with time-series problem, if you have missing data, how should you handle it? Should you use imputation? Why or why not?

Inactive
Ahmed K.
Answer:

When dealing with Time series data it is best not to use imputation i.e. use mean/median/mode/min/max values of the column to replace the missing values. When imputation is done, it makes certain assumptions about the data which may or may not be correct. It may work if you have thorough understanding of the data and may work even if you don't have thorough understanding in some cases. Another method for dealing with missing values is to remove the samples of data with missing values. This results in loss of some information from the data and may not be advisable depending on the data. However, in case of Time Series data, it is recommended to remove rows with missing values instead of using imputation as we cannot make assumptions of the data. In other words we can make assumptions but those assumptions have a higher chance of being wrong and therefore have a greater chance of not making our models learn from the data. Removing rows does cause loss of information but it does improve our chances of training a model that can better learn the data

Contact tutor

Send a message explaining your
needs and Ahmed will reply soon.
Contact Ahmed

Request lesson

Ready now? Request a lesson.
Start Lesson

FAQs

What is a lesson?
A lesson is virtual lesson space on our platform where you and a tutor can communicate. You'll have the option to communicate using video/audio as well as text chat. You can also upload documents, edit papers in real time and use our cutting-edge virtual whiteboard.
How do I begin a lesson?
If the tutor is currently online, you can click the "Start Lesson" button above. If they are offline, you can always send them a message to schedule a lesson.
Who are TutorMe tutors?
Many of our tutors are current college students or recent graduates of top-tier universities like MIT, Harvard and USC. TutorMe has thousands of top-quality tutors available to work with you.
BEST IN CLASS SINCE 2015
TutorMe homepage
Made in California by Zovio
© 2013 - 2021 TutorMe, LLC
High Contrast Mode
On
Off