/// <summary>
        /// Extracts an item from a given instance by delegating the call to the wrapped mapping.
        /// </summary>
        /// <param name="instanceSource">The source of instances providing the <paramref name="instance"/>.</param>
        /// <param name="instance">The instance to extract the item from.</param>
        /// <returns>The extracted item.</returns>
        public TItem GetItem(SplitInstanceSource <TInstanceSource> instanceSource, TInstance instance)
        {
            if (instanceSource == null)
            {
                throw new ArgumentNullException(nameof(instanceSource));
            }

            return(this.mapping.GetItem(instanceSource.InstanceSource, instance));
        }
        /// <summary>
        /// Extracts a rating from a given instance by delegating the call to the wrapped mapping.
        /// </summary>
        /// <param name="instanceSource">The instance source providing the <paramref name="instance"/>.</param>
        /// <param name="instance">The instance to extract the rating from.</param>
        /// <returns>The extracted rating.</returns>
        public TRating GetRating(SplitInstanceSource <TInstanceSource> instanceSource, TInstance instance)
        {
            if (instanceSource == null)
            {
                throw new ArgumentNullException("instanceSource");
            }

            return(this.mapping.GetRating(instanceSource.InstanceSource, instance));
        }
        /// <summary>
        /// Retrieves a list of instances from a given instance source.
        /// Dependent on <see cref="SplitInstanceSource{TInstanceSource}.IsTrainingSet"/>, the instances of
        /// the training or test set are returned.
        /// </summary>
        /// <param name="instanceSource">The source to retrieve instances from.</param>
        /// <returns>The list of retrieved instances.</returns>
        public IEnumerable <TInstance> GetInstances(SplitInstanceSource <TInstanceSource> instanceSource)
        {
            if (instanceSource == null)
            {
                throw new ArgumentNullException(nameof(instanceSource));
            }

            this.UpdateCachedInstances(instanceSource.InstanceSource);
            return(instanceSource.IsTrainingSet ? this.cachedTrainingSetInstances : this.cachedTestSetInstances);
        }