Fundamental Math for Data Science Skill Path

Hi,

I am a little bit confused regarding functions. For example, I want to visualize profit-advertisement budget change rates for a particular company. In case I am not given a function in an array form or the function itself (i.e. f(x) = x^3) that represents the profits related to the amount of the budget. How can I generate that function to help me represent/visualize that relationship and calculate the change rates? or what techniques are used to do so?

Regards,

Gustavo

Welcome to the forums.
Do you have a link to the lesson that you’re talking about?

You could use Pandas, NumPy and SciPy for analysis and Matplotlib & Seaborn libraries for visualization.

Sure. I am sharing with you the link: https://www.codecademy.com/paths/fundamental-math-for-data-science/tracks/math-ds-differential-calculus/modules/math-ds-differential-calculus/lessons/introduction-to-calculus/exercises/calculating-derivatives-in-python

Thank you for helping me out. Once I have visualized the two variables in the chart. Which sub-libraries, within Numpy or SciPy, should I use to find the equation (how can I get the equation based on the plot, i.e. f(x)=x^2 + 3?

Hm. I’m not fully understanding your question.
To define that function f(x)=x^2 +3 you used a combination of NumPy and the Math library. Or, are you asking what math or NumPy function would you use?

Perhaps @tgrtim would be more able to assist here… :slight_smile:

1 Like

Hi, Lisa. Yes, I would like to know what math or numpy function I should use to find that equation.

Regards,

Gustavo

You can always use https://www.desmos.com/ or https://www.geogebra.org/ to quickly draw it up without coding.

2 Likes

You mean determining the formula based on raw data rather than the inverse?

I suppose there’s a few ways to do that but fitting is quite a big topic, I’d suggest some background reading. For the basics tools like np.diff and np.polyfit would be able to get your a fair way along.

2 Likes

Thank you very much.

Thank you very much!!!

This topic was automatically closed 41 days after the last reply. New replies are no longer allowed.