private ICollection <ICollection <double> > rawExamplesFromDataSet(DataSet ds, INumerizer numerizer) { // assumes all values for inout and target are doubles ICollection <ICollection <double> > rds = CollectionFactory.CreateQueue <ICollection <double> >(); for (int i = 0; i < ds.size(); ++i) { ICollection <double> rexample = CollectionFactory.CreateQueue <double>(); Example e = ds.getExample(i); Pair <ICollection <double>, ICollection <double> > p = numerizer.Numerize(e); ICollection <double> attributes = p.GetFirst(); foreach (double d in attributes) { rexample.Add(d); } ICollection <double> targets = p.getSecond(); foreach (double d in targets) { rexample.Add(d); } rds.Add(rexample); } return(rds); }
private IList <IList <double> > RawExamplesFromDataSet(DataSet ds, INumerizer numerizer) { // assumes all values for inout and target are doubles IList <IList <double> > rds = new List <IList <double> >(); for (int i = 0; i < ds.Count; i++) { IList <double> rexample = new List <double>(); Example e = ds.GetExample(i); Pair <IList <double>, IList <double> > p = numerizer.Numerize(e); IList <double> attributes = p.GetFirst(); foreach (double d in attributes) { rexample.Add(d); } IList <double> targets = p.GetSecond(); foreach (double d in targets) { rexample.Add(d); } rds.Add(rexample); } return(rds); }