double r=example.getValue(ui);
training_data.Add(uid, iid, r);
}
UserItemBaseline recommendAlg=new UserItemBaseline();
recommendAlg.user_mapping=user_mapping;
recommendAlg.item_mapping=item_mapping;
int num_iter=getParameterAsInt("num_iter");
double regU=getParameterAsDouble("reg_u");
recommendAlg.RegU=regU;
double regI=getParameterAsDouble("reg_i");
recommendAlg.RegI=regI;
recommendAlg.NumIter=num_iter;
recommendAlg.SetMinRating(getParameterAsInt("Min Rating"));
recommendAlg.SetMaxRating(recommendAlg.GetMinRating()+getParameterAsInt("Range"));
recommendAlg.SetRatings(training_data);
recommendAlg.Train();
exampleSetOutput.deliver(exampleSet);
exampleSetOutput1.deliver(recommendAlg);
}