Quantcast
Channel: KNIME RSS
Viewing all articles
Browse latest Browse all 4157

Make Random decision using probability from a column

$
0
0

Hi all

I have use a logisitic regression predictor to assign a probability value to each case in my dataset. The data set has 42,000 rows.

Each case has it's own unique assigned probability, specific to that case, in a column called "Probability".

I now want to simulate the decision made for each case based on that individual case's probability.

The node I have found for this is the Random Boolean Assigner.  But to use this for each case, it appears that I will have to use a chunk loop to select each row - one at a time - convert the probability column value to a variable, and then use this variable in the variable flow (injecting this into the cg_probability cell in the Random Boolean Assigner). 

The approach works, but it's very computationally expensive, taking several minutes to do the 42k cases - I will have to 36 of these minimum.

Is there any node or method where a decision can be made on each case referencing the Probability column for each case, but not having to do this with a loop? Is there a node I have perhaps missed?!

Many thanks for your help with this - could save a considerable amount of time!!

 


Viewing all articles
Browse latest Browse all 4157

Trending Articles