I want to define a cost function in python to identify optimum value in days when i should end a marketing campaign to save spend on campaigns not generating traffic good traffic.
Problem is I dont have any idea where to start not even sure what kind of data i should collect to make a cost function.
Please share how to proceed in this case. I understand the point after defining cost function gradient descent can be used to find , but i have no idea how to define such a cost function.
$\begingroup$
$\endgroup$
Add a comment
|
1 Answer
$\begingroup$
$\endgroup$
1
well there are two things.
- You write your learning algorithm from scratch. Then you define your cost function yourself. No one usually does that unless they are asked for.
- Using Machine Learning libraries in Python (Most common is SKlearn unless you want to use Neural Networks in e.g. Keras). They have their own cost functions designed. You just need to define your problem properly then it does the thing for you.
In (2) just define your problem properly. The question is fuzzy (what does "not generating traffic good traffic" mean?) but you input your data to your algorithm and it optimize the cost function according to the chosen algorithm. If you need more input, please update the question and give more details so I can help.
-
$\begingroup$ I guess he went by the interaction among user that can generate $$ $\endgroup$– AdityaCommented Oct 26, 2018 at 18:40