Machine Learning: Darmok predicts the grocery bill

A background of the logic of Darmok can be found here. I have taken the logic in the blogpost and using C# I have written a predictive system called Darmok.

Lets look at Charlie Brown’s grocery bill for the las 10 years

Jan Feb Mar April May Jun Jul Aug Sept Oct Nov Dec
2008

538

780

1067

602

986

939

900

864

1066

1067

811

755

2009

967

894

960

1094

711

1191

1225

1114

940

1073

935

1350

2010

1019

877

1454

1153

920

1416

1318

708

710

879

1035

775

2011

952

750

886

739

1216

811

676

957

548

712

259

628

2012

672

851

782

451

95

199

542

792

582

501

437

161

2013

83

176

1181

977

912

1028

1173

1242

897

1026

1075

1149

2014

820

1089

750

856

1131

1207

1324

1342

1376

1048

1262

836

2015

859

857

847

925

991

673

1022

1053

779

868

1022

975

2016

851

1015

833

1098

768

834

916

899

923

918

609

915

2017

765

871

868

833

959

995

952

1083

898

652

839

1023

What we want Darmok to do

  1. Take the first 5 years 2008-2012 as initial historic data that the Darmok will use to predict.
  1. Predict data for each month for years 2013-17 each year you cumulate the history from previous years. Compare your predictions to actual result, this is how the Darmok learns and forms a logic for the data behavior.

Here is the result fed out from Darmok

Predicted
Jan Feb Mar April May Jun Jul Aug Sept Oct Nov Dec
2013

906

830

837

611

403

353

553

797

361

399

268

161

2014

382

394

1002

789

614

617

840

1063

582

668

664

629

2015

540

697

843

814

855

865

1079

1256

976

825

978

697

2016

654

758

803

863

923

742

1064

1218

903

828

1037

809

2017

723

866

774

971

866

741

1008

1123

921

853

887

851

2018

734

880

772

934

905

806

985

1132

922

763

880

923

Lets look at the standard deviation which is a measure of the difference between the actual and the predicted.

You see that by year 2017 the StDev is very low and quite stable. Darmok learned from history first and then learned from prediction errors. It helped Darmok create a profile of the event or person and predict better.

Darmok assisting IDM teams

Next we will look how Darmok can help System or Security Operations teams.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s