I'm new to data science, and kinda confused with the workflow and steps to make a model. Before learning the math and concepts behind the algorithms like SVM, linear regressions, etc, I would just select a whole bunch of models and evaluate them. Then I'll select the best or the top 3 and randomsearcv it and evaluate all of em. Then evaluate fully on the best one.

However, now that I've learned about the models, I don't know how to go on. For example, now I know that if I add features by messing around with PolynomalFeatures, I can possibly make a dataset linearly separable. However, for me to do this, I would need to mes around with SVM directly. Or perhaps, now that I understand the generalized linear models (cost function, hyperparameter, method of optimization), how does it change my workflow?

Is trying all the models and then randomsearchcv-ing the best method?


1 Answer 1


There is always a workflow for doing anything, even for ML.

The question you are trying to ask is somewhat related to MLOp. Please do your research on this as I am not the right person to explain MLOps.

Talking about the workflow of ML, a process that you can follow while dealing with any ML project, here are a few steps:

The end-to-end ML project usually goes about these 8 steps:

  1. Look at the bigger picture
  2. Get the data
  3. Discover and visualize the data to gain insights (Basically EDA)
  4. Prepare data for the ML Algorithm
  5. Select a model and train it
  6. Fine-tune your model
  7. Present the solution
  8. Launch, monitor, and maintain the ML system

To get a better understanding of each step, I'd like to redirect you to this .ipynb file on my GitHub where I have tried to explain each step in a little more detail.

How to choose a model? That is something you'll learn with time. But to get started with the understanding of choosing the right model, I believe that you need a good understanding of the maths behind ML Knowing how algorithms work, the kind of data they handle, and how they handle it really helps in choosing a good start for a baseline model and then proceeding towards more accurate models.

If you have a basic understanding of how the majority of the algorithms work in ML, you'll have a decent idea of picking a good model for yourself.

You mentioned checking multiple models one by one. You can also automate this step using some low-code ML libraries. One good module that I can think of is PyCaret which will train multiple models for you at once and give you their score(accuracy, precision, recall, CV score, etc)

  • $\begingroup$ Yes, but if I'm going to check multiple models, say check all model for classifying, then randomly select value ranges for hyperparameter tuning, then I don't really need to understand the algorithms $\endgroup$ Commented Oct 31, 2023 at 5:02
  • $\begingroup$ Well, that's a wrong approach I'd say. Maths help you understand the algorithm to pick. This approach might work for small datasets but when you have large datasets, training just one model would take heck lot of time. So, it's crucial to pick a good baseline model. Then, you need to know the relationship between the model and the hyper-parameters as well to train them in less time. Maths help in optimization of the model as well. There are a lot of things you'll miss without knowing the math $\endgroup$ Commented Nov 1, 2023 at 8:23

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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