# Help with my school work with Knime

**URL:** <https://forum.knime.com/t/help-with-my-school-work-with-knime/77639>\
**Category:** Job Board\
**Created:** [March 4, 2024, 7:06am UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639 "2024-03-04T07:06:50Z")\
**Posts on this page:** 7\
**Page:** 1

<div class="post-metadata">

**Author:** ![suetus](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@suetus](https://forum.knime.com/u/suetus)\
**Post date:** [March 4, 2024, 7:06am UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/1 "2024-03-04T07:06:50Z")

</div>

![Näyttökuva (9)](https://forum-cdn.knime.com/uploads/default/original/3X/a/e/aeb57ba5f948c42cf672791245695eb5fa9dcc92.png)

So i have this school work, where we have to predict how many attending students will graduate and how many will resign. I have been trying to solve this, but i am not able. Can anyone help, what should i do with Knime?

We know students’

- entrance examination points
- last grade
- how many days they have been away from school  
Also there is information about already graduated and resigned students.  
I have also calculated correlation between last grades and absence days.

I was thinking to use the linear regression learned, but now i’m not sure if its right way to go.

Please help me 🙂

---

<div class="post-metadata">

**Author:** ![mwiegand](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mwiegand/32/66896_2.png) [@mwiegand](https://forum.knime.com/u/mwiegand)\
**Post date:** [March 4, 2024, 7:31am UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/2 "2024-03-04T07:31:04Z")

</div>

Hi @suetus,

can you provide the data for testing please? Without it, trying to give support is quite a challenge.

Best  
Mike

---

<div class="post-metadata">

**Author:** ![lelloba](https://forum-cdn.knime.com/user_avatar/forum.knime.com/lelloba/32/43992_2.png) [@lelloba](https://forum.knime.com/u/lelloba)\
**Post date:** [March 4, 2024, 9:26am UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/3 "2024-03-04T09:26:11Z")

</div>

Hi @suetus,

sounds like a classification problem 🙂 Have you tried to look for examples on the hub?

> **[Decision Tree – knime](https://hub.knime.com/knime/spaces/Educators%20Alliance/Guide%20to%20Intelligent%20Data%20Science/Example%20Workflows/Chapter8/01_DecisionTree~PV-3WZ-ZquINMsI_/most-recent)**
>
> Using the adult dataset, this workflow performs binary classification (income \> or \< 50K) using a Decision Tree. The target is the income column, either \<=50K …

Have a nice day,  
Raffaello Barri

---

<div class="post-metadata">

**Author:** ![suetus](https://forum-cdn.knime.com/letter_avatar_proxy/v4/letter/s/f19dbf/32.png) [@suetus](https://forum.knime.com/u/suetus)\
**Post date:** [March 4, 2024, 6:22pm UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/4 "2024-03-04T18:22:33Z")

</div>

[Kokeilijan projektin data.xlsx](https://forum.knime.com/uploads/short-url/xV4TE5rO81PvIL1mpeuyE12OzRM.xlsx) (14.3 KB)

Hi. Yes, here is the provided data. Sorry, it’s partially in finish. I am familiar with using the decision tree, that is recommended under, but i don’t get, how to use it in this situation. It is goal to predict, are attending students going to resign or graduate.

---

<div class="post-metadata">

**Author:** ![mwiegand](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mwiegand/32/66896_2.png) [@mwiegand](https://forum.knime.com/u/mwiegand)\
**Post date:** [March 4, 2024, 9:50pm UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/5 "2024-03-04T21:50:26Z")

</div>

Hi @suetus,

While I’m not a professional data analyst and lack formal training to decide which correlation type and sided variant to use based on the data distribution (so take what I provide you with a fair grain of salt!), here is one approach.

For simplicity, we ignore the group “Ryhmä” and municipality “Kotikunta” for now and accept the data is valid, has no missing values, each name equals one student etc… Though, I seem some values with zero are present and likely must be removed as it, so I assume means, “not taken” (i.e. because of illness)

The columns translate to:

1. **Tilanne** - Status
2. **Ryhmä** - Group: This could refer to the student’s class, cohort, or group designation within the institution.
3. **Kotikunta** - Municipality/Home Town
4. **Pääsykoe** - Entrance Exam: The scores or results from an entrance examination.
5. **Arvosana** - Grade: This likely represents the students’ grades or marks as an average / median across all
6. **Poissaolot** - Absences: Number of absences the

First, I remove the zeros to get a more accurate picture. The problem here, it makes up 46 out of 183 data point leaving only 137. This drastically reduces the significance of the results! So add a few table spoons of salt again. Removing those which have the status “attending” reduces this to 51 data point.

Using the Auto Binner to remove outliers by using the quantiles “0.0, 0.01, 0.05, 0.25, 0.5, 0.75, 0.95, 0.99, 1.0” helps us identifying the lower and upper one or five percent. Using the 5 % threshold the data set is further reduced to 41 data points, filtering out 45.

Note to myself, is what I am doing valid? Seems to make little sense filtering out so much data. Unfortunately doing a statistical power analysis to determine if the data set is enough goes a little bit beyond the scope and there is no node in knime handling that.

Checking the data distribution using a [Density Plot – KNIME Community Hub](https://hub.knime.com/knime/extensions/org.knime.features.base.views/latest/org.knime.base.views.node.densityplot.DensityPlotNodeFactory) node, we can confirm a normal distribution for resigned and graduated. Interestingly, those attending already tend to form two bulges.

 ![image](https://forum-cdn.knime.com/uploads/default/original/3X/c/a/ca264d02305cd90eb2cd503034d9685439a10b7d.png)

Plotting Absenses vs. the score during the entrance exam and coloring the status, there also seems a correlation between lower entrance exam scores and absenses amongst those who resigned vs. those which graduated. There is more interesting stuff to see but let’s not get distracted.

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

Knowing we have a normal distribution we can safely choose, using a [Rank Correlation – KNIME Community Hub](https://hub.knime.com/knime/extensions/org.knime.features.stats/latest/org.knime.base.node.stats.correlation.rank2.RankCorrelationCompute2NodeFactory) node, the Pearson correlation coefficient.

About the p-value calculation, let’s play dump for now and say we don’t know and are interested into any correlation of Pääsykoe, Arvosana or Poissaolot and the likelihood if resigning or graduating. Hence, chposing a two-sided p-value calculation.

Furthermore, using a regular [Statistics – KNIME Community Hub](https://hub.knime.com/knime/extensions/org.knime.features.stats/latest/org.knime.base.node.stats.viz.extended.ExtendedStatisticsNodeFactory) in combination with a Group Loop Start, you can get a quick low effort overview.

Using the quite reduced data set of just 41 data points, it is quite difficult to read anything the the stats. That seems to be confirmed by the low correlation values with moderate probability.

| First column name | Second column name | Correlation value | p value | Degrees of freedom | Situation |
| --- | --- | --- | --- | --- | --- |
| Entrance exam | Grade | 0.12 | 0.55 | 27 | %graduated% |
| Entrance exam | Absenses | -0.14 | 0.48 | 27 | %graduated% |
| Grade | Absenses | -0.14 | 0.47 | 27 | %graduated% |
| Entrance exam | Grade | 0.21 | 0.51 | 10 | %resigned% |
| Entrance exam | Absenses | -0.14 | 0.68 | 10 | %resigned% |
| Grade | Absenses | -0.32 | 0.32 | 10 | %resigned% |

If that is correct, it means the data provided is insufficient to give a good estimate whenever a student graduates or resigns.

Factoring in the outliers, the histogram seems to indicate a correlation (not a causality!) between the amount of “Pääsykoe” (roughly translated to “Entrance exam”) and whenever students graduated or resigned. But, hence no causality, there is a skewed distribution to the left (higher count of Pääsykoe) amongst those still attending.

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

Checking in on the correlation data what was concluded before still seems valid. There is no correlation or the data set (statistical power) is insufficient.

| First column name | Second column name | Correlation value | p value | Degrees of freedom | Situation |
| --- | --- | --- | --- | --- | --- |
| Entrance exam | Grade | -0.02 | 0.86 | 56 | %graduated% |
| Entrance exam | Absenses | 0.06 | 0.68 | 56 | %graduated% |
| Grade | Absenses | -0.04 | 0.74 | 56 | %graduated% |
| Entrance exam | Grade | 0.27 | 0.17 | 26 | %resigned% |
| Entrance exam | Absenses | 0.09 | 0.64 | 26 | %resigned% |
| Grade | Absenses | -0.05 | 0.79 | 26 | %resigned% |

Here is the workflow:

> **[77639 - Predict Chances of Graduation of Resignment – mwiegand](https://hub.knime.com/mwiegand/spaces/Public/Knime%20Forum%20Support/77639%20-%20Predict%20Chances%20of%20Graduation%20of%20Resignment~IMwXMAdcJ_cNBiuH/current-state)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

At the very least I want to introduce you to an AI approach explained in this article containing a sample workflow. However, for more sophisticated approaches a properly sized data model is absolutely necessary. You could use **data augmentation** but … let’s not get too deep into the rabbit hole 😉

> **[How to create GANs with KNIME Analytics Platform](https://medium.com/low-code-for-advanced-data-science/how-to-create-gans-with-knime-analytics-platform-bd9ae7083ef)**
>
> The race between the generator and discriminator for synthetic image data

> **[Too Much or Not Enough? Statistical Sampling Helps | KNIME](https://www.knime.com/blog/statistical-sampling/)**
>
> The pros and cons of statistical sampling methods plus how to find the right strategy.

**Final note - Please “roast” me**  
I am happy to learn more and challenge myself each day. If there is someone reading this and checking my workflow, please feel free to “roast” me … constructively 😉

Happy “kniming”  
Mike

---

<div class="post-metadata">

**Author:** ![mwiegand](https://forum-cdn.knime.com/user_avatar/forum.knime.com/mwiegand/32/66896_2.png) [@mwiegand](https://forum.knime.com/u/mwiegand)\
**Post date:** [March 5, 2024, 7:44am UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/6 "2024-03-05T07:44:49Z")

</div>

PS: I noticed, while enjoying a string double espresso, that I made a few minor mistakes which were:

1. Filtering absences of zero: Fixing that increased the data set size a little bit
2. Filtering only the bins 2 and 6 instead of 1-2 and 6-7. Fixing that decreased the sample size again slightly

As follows the correlation for the strictly filtered data set:

| First column name | Second column name | Correlation value | p value | Degrees of freedom | Situation |
| --- | --- | --- | --- | --- | --- |
| Entrance exam | Grade | 0.0 | 1.0 | 25 | %graduated% |
| Entrance exam | Absenses | -0.08 | 0.7 | 25 | %graduated% |
| Entrance exam | Grade | -0.38 | 0.4 | 5 | %resigned% |
| Entrance exam | Absenses | 0.0 | 1.0 | 5 | %resigned% |
| Grade | Absenses | -0.1 | 0.61 | 25 | %graduated% |
| Grade | Absenses | 0.42 | 0.35 | 5 | %resigned% |

There is now a moderate correlation but with a low confidence between absences and resigning

Including the outliers again only dilutes the the results:

| Entrance exam | Grade | 0.0 | 1.0 | 76 | %graduated% |
| --- | --- | --- | --- | --- | --- |
| Entrance exam | Absenses | 0.13 | 0.24 | 76 | %graduated% |
| Entrance exam | Grade | 0.27 | 0.17 | 26 | %resigned% |
| Entrance exam | Absenses | 0.09 | 0.64 | 26 | %resigned% |
| Grade | Absenses | -0.02 | 0.88 | 76 | %graduated% |
| Grade | Absenses | -0.05 | 0.79 | 26 | %resigned% |

It seems, though, the initial albeit slightly false data wasn’t that far off bringing me back to the fact that the data size is too small to give any estimation.

I updated my workflow and also enriched the data set by geo data and a loop to analyze all possible correlation. But, as mentioned before, the data set is too small.

> **[77639 - Predict Chances of Graduation of Resignment – mwiegand](https://hub.knime.com/mwiegand/spaces/Public/Knime%20Forum%20Support/77639%20-%20Predict%20Chances%20of%20Graduation%20of%20Resignment~IMwXMAdcJ_cNBiuH/current-state)**
>
> Solutions for data science: find workflows, nodes and components, and collaborate in spaces.

---

<div class="post-metadata">

**Author:** ![system](https://forum-cdn.knime.com/uploads/default/original/1X/ab3ccf34482a0329361734a18199390177204f15.png) [@system](https://forum.knime.com/u/system)\
**Post date:** [June 3, 2024, 7:44am UTC](https://forum.knime.com/t/help-with-my-school-work-with-knime/77639/7 "2024-06-03T07:44:55Z")

</div>

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.
