Feature Mapping

Hello,
I have a question about the feature mapping implemented in the last practice lab of the course:
What is the code behind it (for two or more initial features)?
How can I write a code for feature mapping outside of Python, say in MATLAB?

Thank you…

Notice that we have "from utils import *" in the first cell. It means we have a file named utils and we want to import everything from it. In this file, you will see the code of map_feature. To access this file, please read this which discuss how to find the utility functions.

Furthermore, you can give this code to GPT 3 and tell it to convert that Python code to MATLAB or any other language.

Best,
Saif.

Thank you for your quick response!

I just have one more question: How to implement feature mapping for “n” features?

I see the code for “two” features, and chat GPT helped with “three”, but I just can’t figure out the code for the most general case of “n” features.

Thank you for your help!

You have to use for loop for that. Give your Two features code to ChatGPT and tell it to convert it (or write similar code) for n-features using for loop, easy peasy lemon squeezy.

1 Like