# how do know if your dataset is good before using ML algorithms?

**URL:** <https://forum.knime.com/t/how-do-know-if-your-dataset-is-good-before-using-ml-algorithms/77228>\
**Category:** KNIME Analytics Platform\
**Tags:** machine-learning, justknimeit, bug\
**Created:** [February 13, 2024, 8:42pm UTC](https://forum.knime.com/t/how-do-know-if-your-dataset-is-good-before-using-ml-algorithms/77228 "2024-02-13T20:42:16Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![mlauber71](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mlauber71/32/73590_2.png) [@mlauber71](https://forum.knime.com/u/mlauber71)\
**Post date:** [February 13, 2024, 9:49pm UTC](https://forum.knime.com/t/how-do-know-if-your-dataset-is-good-before-using-ml-algorithms/77228/4 "2024-02-13T21:49:07Z")

</div>

> [@mohammad\_alqoqa](#):
>
> heart dataset

Is it this dataset “[Heart Disease](https://archive.ics.uci.edu/dataset/45/heart+disease)” by UCI Machine Learning Repository or another one from Kaggle? Or is it [this one](https://forum.knime.com/t/improve-logistic-regression-model/76225) - what is the source of that? Also there was this discussion we had ([how can I find if the model have overfitting - #9 by mlauber71](https://forum.knime.com/t/how-can-i-find-if-the-model-have-overfitting/76730/9)).

Typically such datasets are reasonably well prepared and are meant to be used in machine learning cases. Sometimes they tend to be ‘too good’ so as to spoil aspiring data scientists and give them a false impression of the real world …

So if the results are not to your satisfaction maybe the method or preparation did not work.

As @rfeigel already said: Domain knowledge most often is necessary to understand what is going on and if you do not use a prepared dataset like from a Kaggle competition you will have to invest some time to bring the data into such a shape that it will truthfully represent your task and the data has any chance at all to contain what you are looking for.

To check a dataset you could start by checking the correlations with the target variable. If there are only weak correlations it is very unlikely that you will be able to get a good model.

> **[01\_Data\_Summarization – roberto\_cadili](https://hub.knime.com/roberto_cadili/spaces/Statistics%20with%20KNIME/01_Data_Summarization~uk-_OqZaHGyAs_81/current-state)**
>
> This workflow provides insights into the Iris.csv dataset by generating graphical and numerical summaries of the data. The main aim of thie workflow is to show…

Another thing to check is if the data has some variations, so not all values in a column are constant or nearly constant or the colum features are highly imbalanced.

If your target variable is imbalanced that does not need to stop you from building a model; you could for example use a different metric like AUCPR to help you.

Further hints about models you could check here:

> [@MEDICAL DATA](https://forum.knime.com/t/medical-data/61205/4):
>
> @helfortuny this sounds like an interesting study. These things come to my mind: You indeed have a lot of variables that will need some preprocessing. One thing you could try is read about [vtreat](https://medium.com/low-code-for-advanced-data-science/data-preparation-for-machine-learning-with-knime-and-the-python-vtreat-package-efcaf58fa783) [you can find KNIME [workflows for that here](https://hub.knime.com/-/spaces/-/latest/~tgdedu04tUX8ldcC/)] and try that with your target and see what recommendations would be made to see if it makes any difference. You might have tried and removed [highly correlated variables](https://hub.knime.com/knime/extensions/org.knime.features.base/latest/org.knime.base.node.preproc.correlation.filter.CorrelationFilterNodeFactory/). At the end of the vtreat article there are links to other dimension reduction techniques…

Another pre-check I like is to just run some ([H2O.ai](https://hub.knime.com/-/spaces/-/~a5waSMFNHdtCW0n4/current-state/)) models which will give us variable importance. You can check with domain knowledge if the ‘leading’ variables would make any sense at all. Or if they might be too good to be true (most likely constituting a leak, that is information about the target that a real model will not be allowed to have).

> [@How to find feature importance after model building?](https://forum.knime.com/t/how-to-find-feature-importance-after-model-building/48486/2):
>
> @somnathdas76 some model would just provide you with the feature importance (most [H2O.ai](https://hub.knime.com/knime/extensions/org.knime.features.ext.h2o/latest) models, [Random Forest](https://kni.me/n/2hhbyPN8yXaMD1YU), [XGBoost](https://kni.me/e/Hj6XVP_9hCGqZuKK) …), but you can also explore the [Global Feature Importance – KNIME Community Hub](https://kni.me/c/xsR90ymhRbHOc78Z) Also this thread holds some more hints: I tried my hand at one idea mentioned here to re-engineer the feature importance via Tree models and the likes. But I am not 100% satisfied with the results: Then … @Morris_Kurz has provided us with two interesting nodes that also might help ([TreeS…](https://kni.me/n/JqzAovj1ZYEKpGB6)

> **[Understand Your ML Model: Global Feature Importance | KNIME](https://www.knime.com/blog/understand-ml-model-global-feature-importance)**
>
> Interpretability of machine learning models is the ability to explain to a human what the model is doing. Global feature importance can help understand ML models.

> [@mohammad\_alqoqa](#):
>
> I know it’s not easy but wasting time on a bad dataset is horrible.

Welcome to the (real) world of data science 🙂

Maybe another remark: if you encounter problems you could maybe share the workflows and approaches you have used so the KNIME community might have a look and give further advise what could be done; like when you said the heart disease dataset would not give you good results.

---

_[View the full topic](https://forum.knime.com/t/how-do-know-if-your-dataset-is-good-before-using-ml-algorithms/77228)._
