Why not use:

list_of_scores.sort()

?



On Fri, Nov 29, 2013 at 7:34 AM, vaskonov <notifications@github.com> wrote:

> In classifiers/multilabel/Threshold.js:
>
> > +		
> > +		this.multiclassClassifier.trainBatch(dataset);
> > +
> > +		var scoresVector = [];
> > +
> > +		list_of_scores = [];
> > +
> > +		for (var i=0; i<validset.length; ++i)
> > +		{
> > + 			var scoresVector = this.multiclassClassifier.classify(validset[i].input, false, true);
> > + 			validset[i].score = scoresVector
> > + 			validset[i].output =  multilabelutils.normalizeClasses(validset[i].output);
> > + 			list_of_scores = list_of_scores.concat(multilabelutils.getvalue(scoresVector))
> > + 		}	
> > +
> > +		list_of_scores = _.sortBy(list_of_scores, function(num){ return num; });
>
> _.sortBy(list, iterator, [context])
> Returns a (stably) sorted copy of list, ranked in ascending order by the
> results of running each value through iterator. Iterator may also be the
> string name of the property to sort by (eg. length).
>
> —
> Reply to this email directly or view it on GitHub<https://github.com/erelsgl/limdu/pull/3/files#r7995147>
> .
>