How the EasyPrediction works?

Prediction of car maintenance

The EasyPrediction is a Naive Bayes Algorithm used for the prediction of particular targets based on historical series. EasyPrediction has many use cases that could be applied for prediction: from medical (if patient has a particular disease or not) to social or business purpose (if someone wants to buy a product or not). In the follow an example of Naive Bayes Algorithm application.

We suppose to have an historical series of defects in production lots.

We want to know if a car should to be in maintenance or not.

See the training table below in which there are attributes like kind of car, kind of driving, kind of street, km carried out, car price

Wew want to know if an runabout car, sportly driving in mixed street, 200000 km and price 12000 EUR is now in MAINTENANCE on NOT


Try to change testing table...
Attribute1 Attribute2 Attribute3 Attribute4 Attribute5 NumAttribute1 NumAttribute2 NumAttribute3 NumAttribute4 NumAttribute5 DateAttribute Target

Training Table Sample

Attribute1 Attribute2 Attribute3 Attribute4 Attribute5 NumAttribute1 NumAttribute2 NumAttribute3 NumAttribute4 NumAttribute5 DateAttribute Target Created
runaboutjobhighway70000100000000-00-00 00:00:00MAINTENANCE2017-11-13 16:25:29
SUVjobmixed2500001200000000-00-00 00:00:00MAINTENANCE2017-11-13 16:25:29
MPVjobcity80000400000000-00-00 00:00:00NO MAINTENANCE2017-11-13 16:25:29
MPVsportymixed4000650000000-00-00 00:00:00NO MAINTENANCE2017-11-13 16:25:29
runaboutsportycity8000200000000-00-00 00:00:00MAINTENANCE2017-11-13 16:25:29
SUVwalkingmixed15000800000000-00-00 00:00:00NO MAINTENANCE2017-11-13 16:25:29
SUVsportymixed4000650000000-00-00 00:00:00NO MAINTENANCE2017-11-13 16:25:29
runaboutwalkingcity80000300000000-00-00 00:00:00MAINTENANCE2017-11-13 16:25:29

Testing Table Sample

Attribute1 Attribute2 Attribute3 Attribute4 Attribute5 NumAttribute1 NumAttribute2 NumAttribute3 NumAttribute4 NumAttribute5 DateAttribute Target Created
runaboutsportlymixed200000120000000-00-00 00:00:00TO PREDICT...2017-11-13 16:29:34

MATHS CALCULATIONS

Array ( [runaboutT1] => 0.75 [SUVT1] => 0.25 [MPVT1] => 0 [jobT1] => 0.5 [sportyT1] => 0.25 [walkingT1] => 0.25 [highwayT1] => 0.25 [mixedT1] => 0.25 [cityT1] => 0.5 [T1] => NAN [200000T1] => NAN [12000T1] => 2.6399617613893E-6 ) Array ( [runaboutT2] => 0 [SUVT2] => 0.5 [MPVT2] => 0.5 [jobT2] => 0.25 [sportyT2] => 0.5 [walkingT2] => 0.25 [highwayT2] => 0 [mixedT2] => 0.75 [cityT2] => 0.25 [T2] => NAN [200000T2] => NAN [12000T2] => 1.0172673671046E-5 )
TargetAttribute1Attribute2Attribute3Attribute4Attribute5

T1: MAINTENANCE

T2: NO MAINTENANCE

#T1: 4

#T2: 4

#T1+#T2: 8

P(MAINTENANCE): 0.5

P(NO MAINTENANCE): 0.5

P(runabout|MAINTENANCE): 0.75

P(SUV|MAINTENANCE): 0.25

P(MPV|MAINTENANCE): 0

P(runabout|NO MAINTENANCE): 0

P(SUV|NO MAINTENANCE): 0.5

P(MPV|NO MAINTENANCE): 0.5

P(job|MAINTENANCE): 0.5

P(sporty|MAINTENANCE): 0.25

P(walking|MAINTENANCE): 0.25

P(job|NO MAINTENANCE): 0.25

P(sporty|NO MAINTENANCE): 0.5

P(walking|NO MAINTENANCE): 0.25

P(highway|MAINTENANCE): 0.25

P(mixed|MAINTENANCE): 0.25

P(city|MAINTENANCE): 0.5

P(highway|NO MAINTENANCE): 0

P(mixed|NO MAINTENANCE): 0.75

P(city|NO MAINTENANCE): 0.25

P(|MAINTENANCE): 0

P(|NO MAINTENANCE): 0

P(|MAINTENANCE): 0

P(|NO MAINTENANCE): 0

Avg(T1):

Avg(T2):

DevStand(T1) :

DevStand(T2) :

Numeric Attribute: 200000

P(NUM_A1|MAINTENANCE): NAN

P(NUM_A1|NO MAINTENANCE): NAN

Avg(T1): 102000

Avg(T2): 25750

DevStand(T1) :103678.991764645

DevStand(T2) :36536.5114189446

Numeric Attribute: 12000

P(NUM_A2|MAINTENANCE): 2.6399617613893E-6

P(NUM_A2|NO MAINTENANCE): 1.0172673671046E-5

Avg(T1): 45000

Avg(T2): 62500

DevStand(T1) :50662.2805119022

DevStand(T2) :16583.123951777

Numeric Attribute:

P(NUM_A3|MAINTENANCE): 5.3077568818334E-6

P(NUM_A3|NO MAINTENANCE): 1.9804882439285E-8

Avg(T1):

Avg(T2):

DevStand(T1) :

DevStand(T2) :

Numeric Attribute:

P(NUM_A4|MAINTENANCE): NAN

P(NUM_A4|NO MAINTENANCE): NAN

Avg(T1):

Avg(T2):

DevStand(T1) :

DevStand(T2) :

Numeric Attribute:

P(NUM_A5|MAINTENANCE): NAN

P(NUM_A5|NO MAINTENANCE): NAN

Prediction Set

TextAttribute1: runabout

TextAttribute2: sportly

TextAttribute3: mixed

TextAttribute4:

TextAttribute5:

NumAttribute1: 200000

NumAttribute2: 12000

NumAttribute3:

NumAttribute4:

NumAttribute5:

target1

PROD P(An|MAINTENANCE): 1 * 0.75 * 0.25 * 2.6399617613893E-6

target2

PROD P(An|NO MAINTENANCE): 1 * 0.75 * 1.0172673671046E-5

Predicted Value

PROD P(An|T1): 2.4749641513025E-7

PROD P(An|T2): 3.8147526266423E-6

PREDICTED VALUE IS NO MAINTENANCE : 3.8147526266423E-6