1
$\begingroup$

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.

$\endgroup$
1
$\begingroup$

well there are two things.

  1. You write your learning algorithm from scratch. Then you define your cost function yourself. No one usually does that unless they are asked for.
  2. 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.

$\endgroup$
1
  • $\begingroup$ I guess he went by the interaction among user that can generate $$ $\endgroup$
    – Aditya
    Oct 26 '18 at 18:40

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.