Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
BedrockMission!

Learn More

View all

Sign in to view all badges

Classification rule to differentiate 0 and non-zero

Avatar

Avatar
Validate 10
Level 3
vickyg28253246
Level 3

Likes

21 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
vickyg28253246
Level 3

Likes

21 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
vickyg28253246
Level 3

02-10-2018

I need tt classify the stock position as Y(if value > 0) or N (if value = 0). Since numeric classification is not available, I tried a brute force approach - creating 10 rules with "starts with" (see screenshot).

This has worked for non-zero values, but failed validation if the value is 0.

What are other options?

Thank youtd_capture1002.JPG

Accepted Solutions (1)

Accepted Solutions (1)

Avatar

Avatar
Coach
MVP
ursboller
MVP

Likes

522 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile

Avatar
Coach
MVP
ursboller
MVP

Likes

522 likes

Total Posts

1,020 posts

Correct Reply

256 solutions
Top badges earned
Coach
Contributor
Bedrock
Seeker
Springboard
View profile
ursboller
MVP

02-10-2018

use a workaround:

- Rule 1: set regex "*" to "N" (everything...)

- Rule 2: set regex "^[1-9]" to "Y"

first, all vaules get "N", but those matching the Rule 2 will get "Y" ...

remark: the classification will take the last match, just use the test interface...

Answers (1)

Answers (1)

Avatar

Avatar
Validate 10
Level 3
vickyg28253246
Level 3

Likes

21 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile

Avatar
Validate 10
Level 3
vickyg28253246
Level 3

Likes

21 likes

Total Posts

46 posts

Correct Reply

1 solution
Top badges earned
Validate 10
Validate 1
Boost 5
Boost 3
Boost 10
View profile
vickyg28253246
Level 3

03-10-2018

Thank you, makes sense.