let{learn, classify}=require('svm-light');learn({// file path for input, modelinput: 'train.dat',model: 'model.dat',// on stream process data in heredata: (data)=>{console.log(data+'');},// on error hereerror: (err)=>{console.log(err+'');},}).then(()=>{// if finished, something do in here! });classify({// file path for input, model, resultinput: 'test.txt',model: 'model.dat',result: 'result.txt',// on stream data in heredata: (data)=>{console.log(data+'');},// on error hereerror: (err)=>{console.log(err+'');}}).then(()=>{// if finished, something do in here!})
let{learn, classify}=require('svm-light');learn({input: 'yeast_4.txt',model: 'model.dat',// apply options like this c: 500,v: 1,data: (data)=>{console.log(data+'');},error: (err)=>{console.log(err+'');},}).then(()=>{// if finished, something do in here! });