January 2018
Intermediate to advanced
332 pages
7h 36m
English
Although generating the training dataset can be done manually, it's not fun. So, let's write a small script, which will help us to create the dataset:
// input attributes and the target valuesvar _ = require('lodash');var creditScore = ['Excellent', 'Good', 'Average', 'Poor'];var creditAge = ['>10', '>5', '>2', '>=1'];var remarks = ['0', '1', '2', '>=3'];var utilization = ['Low', 'Medium', 'High'];var hardInquiries = ['0', '1', '2', '>=3'];// expected output structure/* { "creditScore": "", "creditAge": "", "remarks": "", "utilization": "", "hardInquiries": "", "approval": "" } */var all = [];var even = [];var odd = [];// does not have to be optimal, this is a one time script_.forEach(creditScore, function(credit) ...Read now
Unlock full access