# Solutions to "Just KNIME It!" Challenge 19 - Season 2

**URL:** <https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359>\
**Category:** Just KNIME It!\
**Tags:** justknimeit\
**Created:** [August 2, 2023, 2:33pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359 "2023-08-02T14:33:11Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![alinebessa](https://forum-cdn.knime.com/user_avatar/forum.knime.com/alinebessa/32/33306_2.png) [@alinebessa](https://forum.knime.com/u/alinebessa)\
**Post date:** [August 2, 2023, 2:33pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/1 "2023-08-02T14:33:12Z")

</div>

💥 New Wednesday, new _Just KNIME It!_ challenge! 💥

🩺 This week you’ll take the role of a clinician and see if machine learning 🤖 can help you predict whether a patient has diabetes or not.

🔥 We spiced it up a bit and also asked you to beat a given baseline accuracy! 🤓 Are you up fot this challenge?

[Here](https://www.knime.com/just-knime-it) it is. Let’s use this thread to post our solutions to it, which should be uploaded to your public [KNIME Hub](https://hub.knime.com/)spaces with tag **JKISeason2-19**.

🆘 **Need help with tags?** To add tag JKISeason2-19 to your workflow, go to the description panel on the right in KNIME Analytics Platform, click the pencil to edit it, and you will see the option for adding tags right there. 🙂 Let us know if you have any problems!

---

<div class="post-metadata">

**Author:** ![rfeigel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/7ea924/32.png) [@rfeigel](https://forum.knime.com/u/rfeigel)\
**Post date:** [August 3, 2023, 2:27am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/2 "2023-08-03T02:27:38Z")

</div>

Here’s my solution. Used AutoML and Global Feature Importance. Has three models with different sampling appproaches. No attempt at optimization beyond different sampling approaches.

> **[JKISeason2-19 – rfeigel](https://hub.knime.com/rfeigel/spaces/Public/latest/JKISeason2-19~RlsVlbyQ3azcjFNi)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 3, 2023, 10:32am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/3 "2023-08-03T10:32:09Z")

</div>

Hello everyone, this is my solution.

 ![01](https://forum-cdn.knime.com/uploads/default/original/3X/d/7/d78dff05039a2cc21c79b124b5c884bc7be9bb35.png)

> **[JKISeasor2-19\_tomljh\_ver3 – tomljh](https://hub.knime.com/tomljh/spaces/Public/latest/JKISeason2/JKISeasor2-19_tomljh_ver3~vtT7FkVSO3eaQ6xy)**
>
> Challenge 19: Dealing with Diabetes Level: Easy or Medium Description: In this challenge you will take the role of a clinician and check if machine learning ca…

Reference:  
Examples on the Knime Hub[[1]](https://hub.knime.com/-/spaces/-/latest/~9cBJzpQEeZyMtSNa/)[[2]](https://hub.knime.com/-/spaces/-/latest/~gohv_JOBUNKgit_t/)

Why did the oversampling using the SMOTE method not take effect? I tried to change the hyperparameter, with the nearest neighbor=30 (default=5), and the effect has improved.

In addition, due to only a small number of samples in the validation set, this score may have already overfitted both the training and validation sets.

---

<div class="post-metadata">

**Author:** ![ersy](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/e/71c47a/32.png) [@ersy](https://forum.knime.com/u/ersy)\
**Post date:** [August 3, 2023, 2:04pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/4 "2023-08-03T14:04:42Z")

</div>

Hi everyone,  
Here is my solution:  
I used stratified sampling (70/30), removed feature “SkinThickness” (result of experiments with xgboost) from data and used Random Forest with default configuration. Accuracy = 79.22%

> **[JKISeason2-19 – ersy](https://hub.knime.com/ersy/spaces/Just%20Knime%20It%20-%20Season%202/latest/JKISeason2-19~XFkhViuhGsGn27gS)**
>
> Challenge 19: Dealing with Diabetes

---

<div class="post-metadata">

**Author:** ![nilotpalc](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/n/85f322/32.png) [@nilotpalc](https://forum.knime.com/u/nilotpalc)\
**Post date:** [August 3, 2023, 3:19pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/5 "2023-08-03T15:19:02Z")

</div>

Here is my solution -

As part of the JKI Challenge 19 - Dealing with Diabetes, the Auto ML component was utilized to determine the optimal model for classifying patients as either diabetic or non-diabetic. Following this, the Global Feature Importance component was employed to identify the two most crucial features that contribute to a diagnosis of “Diabetic” or an Outcome value of 1 in the model. Finally, a Scatter Plot was generated using complete data to explore how these two key components interact and ultimately indicate an elevated risk for diabetes.

> **[Diabetes\_Exercise – nilotpalc](https://hub.knime.com/nilotpalc/spaces/Public/latest/Machine%20Learning/Diabetes_Exercise~GIi6iEQxH0_9RP7_)**
>
> As part of the JKI Challenge 19 - Dealing with Diabetes, the Auto ML component was utilized to determine the optimal model for classifying patients as either d…

---

<div class="post-metadata">

**Author:** ![rfeigel](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/r/7ea924/32.png) [@rfeigel](https://forum.knime.com/u/rfeigel)\
**Post date:** [August 3, 2023, 11:46pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/6 "2023-08-03T23:46:13Z")

</div>

@nilotpalc Please put data file in your workflow, i.e. relative to current workflow data area.

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 5, 2023, 5:57am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/7 "2023-08-05T05:57:13Z")

</div>

I searched for seed on @ersy solutions. Can occasionally obtain 80%。

 ![02](https://forum-cdn.knime.com/uploads/default/original/3X/3/5/35fb45ffce12ef4e87a5830a8dc973c2ff89ce8f.png)

 ![03](https://forum-cdn.knime.com/uploads/default/original/3X/f/0/f098203840a43653cf40f1cd427024371414fef8.png)

Thank ersy’s sharing.

My personal opinion: In fact, some models and sampling methods have randomness. Due to various limitations, most of the time we can only fix the seed, which can lead to some deviations in model comparison.

> **[JKISeasor2-19\_tomljh\_ver4 – tomljh](https://hub.knime.com/tomljh/spaces/Public/latest/JKISeason2/JKISeasor2-19_tomljh_ver4~zcfBM7ceHhbkDPM4)**
>
> Challenge 19: Dealing with Diabetes Level: Easy or Medium Description: In this challenge you will take the role of a clinician and check if machine learning ca…

Perhaps you have noticed that there are issues with the 0 values of some columns on this dataset, but I have not addressed them either. There is a notebook on Kaggle that analyzes this issue.

---

<div class="post-metadata">

**Author:** ![MoLa\_Data](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mola_data/32/58742_2.png) [@MoLa\_Data](https://forum.knime.com/u/MoLa_Data)\
**Post date:** [August 5, 2023, 12:14pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/8 "2023-08-05T12:14:32Z")

</div>

Hello my crazy KNIMErs 🤪  
Here is my solution this week: [JKISeason2-19 Ángel Molina – KNIME Community Hub](https://hub.knime.com/-/spaces/-/latest/~Qam1tfIqBVO8U73b/)  
Nothing new, I used the nodes for this work in KNIME as AUTO ML or Features Importante. To be honest, these nodes make life easier and are so good that I still can’t believe it (accuracy 80 %).  
As the lasts weeks, I share my experience in my personal newsletter about KNIME  
[Cómo Utilizar el Poder del Aprendizaje Automático para Predecir la Diabetes](https://www.linkedin.com/pulse/c%25C3%25B3mo-utilizar-el-poder-del-aprendizaje-autom%25C3%25A1tico-la-molina-laguna)  
 ![gif1](https://forum-cdn.knime.com/uploads/default/original/3X/d/0/d0a3d8c1bb425b78eb453b34cd4bda3082d41ec1.gif)  
See you at the next one! 🧡 🦾

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 5, 2023, 1:52pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/9 "2023-08-05T13:52:41Z")

</div>

Hello ,I’m going crazy again.  
I have preprocessed the data based on [the EDA analysis on Kaggle](https://www.kaggle.com/code/yasinncndr/diabetes-prediction-feature-engineering-and-eda#Feature-Engineering), and the single model has improved.

Change point:

1. Add data preprocessing
2. Restore to use all features

acc = 82.68%

> **[JKISeasor2-19\_tomljh\_ver5 – tomljh](https://hub.knime.com/tomljh/spaces/Public/latest/JKISeason2/JKISeasor2-19_tomljh_ver5~iHMF4G1YcrchOTxj)**
>
> Challenge 19: Dealing with Diabetes Level: Easy or Medium Description: In this challenge you will take the role of a clinician and check if machine learning ca…

---

<div class="post-metadata">

**Author:** ![MoLa\_Data](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mola_data/32/58742_2.png) [@MoLa\_Data](https://forum.knime.com/u/MoLa_Data)\
**Post date:** [August 5, 2023, 3:24pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/10 "2023-08-05T15:24:50Z")

</div>

Love your WorkFlow @tomljh 💛🙌  
I’ll have to study it ✏ 📚 📝

---

<div class="post-metadata">

**Author:** ![l6fader](https://forum-cdn.knime.com/user_avatar/forum.knime.com/l6fader/32/53149_2.png) [@l6fader](https://forum.knime.com/u/l6fader)\
**Post date:** [August 5, 2023, 3:27pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/11 "2023-08-05T15:27:56Z")

</div>

Hi Everybody,  
I’m back after a one week absence. Here is my solution, which is far less sophisticated than some of yours. Like all of you, i started with the AutoML and Global Feature Importance components but for some reason, i could not get the AutoML component to work. In order to join the fun, i just started from scratch and tried to answer the challenge’s main points.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/0/0/00329b296e997782ba7b0ddf94bc6495d73d258e.png)

**1. The yellow workflow.**

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/3/9/394955d17c230a556aadca81540fc43bd015acb9.png)  
Here is just created a simple Random Forest classification model with 90:10 partitioning of the data. I created a simple KPI output to display model accuracy. 78% was not bad. Easy-peasy.

**2. The green workflow.**

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/e/0/e0c03192532e387641d6e4b39e265e9fa79a1b2f.png)  
This modification was designed to assess feature importance in a really crude way. Model performance is compared by removing each feature one at a time with a loop and assessing model performance with the same KPI output in a tile view. Here we learn things such as; 1) when the pregnancies feature is removed, Prediction Accurancy is better; or 2) when we exclude the Glucose feature, Prediction accuracy is worse.

**3. The blue workflow.**

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/a/d/adfa7d177191e3556a5301171fcac99c4f6a9918.png)  
This modification allows you to vary the sampling split for train/test. The split is still randomly done, but even still i could see changes in performance.

**4. The purple workflow.**

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/6/a/6afabd4bdffa786a039ac57a7f1a4ee50698f1a8.png)  
Armed with the knowledge of which features where most important, a multiple selection widget was added to allow simpler models to be built and compared. Here we can balance the number and importance of features required to meet the performance standard.

Have a look:

> **[JKISeason2-19\_LF – l6fader](https://hub.knime.com/l6fader/spaces/Public/latest/JKISeason2-19_LF~jtFeIH7-hBp-Mbsv)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

Hope you like it.  
L

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 5, 2023, 4:06pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/12 "2023-08-05T16:06:19Z")

</div>

Thank you for your appreciation. We are all Crazy KNIMErs.

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 5, 2023, 4:12pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/13 "2023-08-05T16:12:18Z")

</div>

> [@l6fader](#):
>
> i could not get the AutoML component to work.

I also encountered the same problem. My environment is Win10, with knime version 5.1.

---

<div class="post-metadata">

**Author:** ![MoLa\_Data](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mola_data/32/58742_2.png) [@MoLa\_Data](https://forum.knime.com/u/MoLa_Data)\
**Post date:** [August 5, 2023, 4:45pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/14 "2023-08-05T16:45:05Z")

</div>

I have had the same problem as well, I got it fixed by copying and pasting the component from another workflow.

---

<div class="post-metadata">

**Author:** ![tomljh](https://forum-cdn.knime.com/user_avatar/forum.knime.com/tomljh/32/67732_2.png) [@tomljh](https://forum.knime.com/u/tomljh)\
**Post date:** [August 5, 2023, 5:01pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/15 "2023-08-05T17:01:02Z")

</div>

I have run the workflow you shared and there are no issues. I copied AutoML from your workflow to my workflow, but there are still exceptions. I’ll check my local configuration again. Thank you!

---

<div class="post-metadata">

**Author:** ![tommy](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/t/b5a626/32.png) [@tommy](https://forum.knime.com/u/tommy)\
**Post date:** [August 5, 2023, 7:37pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/16 "2023-08-05T19:37:53Z")

</div>

Hi there. I have also encountered the problem with AutoML in v5.1.  
I checked a simple workflow from the hub that works in 4.\*, but also fails in 5.1.  
So it might be a problem with the new KNIME version.  
best, Tommy

---

<div class="post-metadata">

**Author:** ![marzukim](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/m/bbe5ce/32.png) [@marzukim](https://forum.knime.com/u/marzukim)\
**Post date:** [August 6, 2023, 3:52am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/17 "2023-08-06T03:52:45Z")

</div>

having similar difficulties running autoML on my new knime 5.1 installation as i’m on my Linux machine.  
autoML works fine on my 4.7.5 installation, so it is possible that there is a compatibility issue.

rgds

---

<div class="post-metadata">

**Author:** ![Artem](https://forum-cdn.knime.com/user_avatar/forum.knime.com/artem/32/47971_2.png) [@Artem](https://forum.knime.com/u/Artem)\
**Post date:** [August 7, 2023, 12:06pm UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/18 "2023-08-07T12:06:10Z")

</div>

Hello everyone,

Here is my solution, and I have to say that challenge this week is quite exciting and interesting for me. First of all it is really nice and helpful to build the model factory - this might be useful for other projects. And with the help of the components for AutoML and Global Feature Importance it is quite easy. There was a hint to implement different sampling strategies, so having this feature is also helpful.  
The only problem that I could not solve efficiently is the dependence on the sampling: as long as we do not have much data and data set is unbalanced, sampling really effect the end results. Let’s say I could get 85+% accuracy while training, however on test set it only gave me ~75% and vice versa.  
Considering feature importance, it seems that BMI and Glucose are the most valuable features.

And of course I added my favorite conformal prediction approach that actually helps to find the most difficult cases for prediction and also compliments the feature importance analysis.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/d/4/d458b79f1adf414c65a551afceeab74164be585d.png)

> **[JKISeason2-19 – artem](https://hub.knime.com/artem/spaces/Public/latest/JK/JKISeason2-19~iCxpZsat6oTdtmAY)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

---

<div class="post-metadata">

**Author:** ![HaveF](https://forum-cdn.knime.com/user_avatar/forum.knime.com/havef/32/1124_2.png) [@HaveF](https://forum.knime.com/u/HaveF)\
**Post date:** [August 8, 2023, 3:38am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/19 "2023-08-08T03:38:18Z")

</div>

> [@Artem](#):
>
> conformal prediction approach

Hi, @Artem 🥳 🥳 🥳

This isn’t the first time I’ve seen you use this prediction method. Do you have any best practices to share about this algorithm? I’m ready to learn about it. Thanks!

Best regards,  
HaveF

---

<div class="post-metadata">

**Author:** ![AnilKS](https://forum-cdn.knime.com/user_avatar/forum.knime.com/anilks/32/52258_2.png) [@AnilKS](https://forum.knime.com/u/AnilKS)\
**Post date:** [August 8, 2023, 3:40am UTC](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359/20 "2023-08-08T03:40:50Z")

</div>

my petty try on the challenge.surprisingly Automl started showing error on changing the sampling node like smote or bootstrap. this was due to breakpoint. the accuracy if 76.52 .My flow is not spohisticated vis a vis peers.

> **[JustKnimeit-S2C19 – anilks](https://hub.knime.com/anilks/spaces/Just%20Knime%20It%20Challenges/latest/JustKnimeit-S2/JustKnimeit-S2C19~JOo_xNolSHa74fwm)**
>
> JustKnimeit-S2C19 JKISeason2-19

[Next page](https://forum.knime.com/t/solutions-to-just-knime-it-challenge-19-season-2/71359.md?page=2)
