Пример #1
0
        public override void Train(Split split)
        {
            UpdateFeatureBuilder(split);

            List <string> train = split.Train.Select(f => FeatureBuilder.GetLibFmFeatureVector(f)).ToList();

            _libFm.CreateTrainSet(train, split.Container.MinTarget, split.Container.MaxTarget,
                                  FeatureBuilder.GetNumMappedValues(), FeatureBuilder.Mapper.NumberOfEntities);

            Logger.Current.Trace("Training with LibFm recommender...");
            PureTrainTime = (int)Wrap.MeasureTime(delegate()
            {
                _libFm.Train();
            }).TotalMilliseconds;
        }