/// <summary>This prints out a ConcatVector by mapping to the namespace, to make debugging learning algorithms easier.</summary> /// <param name="vector">the vector to print</param> /// <param name="bw">the output stream to write to</param> /// <exception cref="System.IO.IOException"/> public virtual void DebugVector(ConcatVector vector, BufferedWriter bw) { foreach (string key in featureToIndex.Keys) { bw.Write(key); bw.Write(":\n"); int i = featureToIndex[key]; if (vector.IsComponentSparse(i)) { DebugFeatureValue(key, vector.GetSparseIndex(i), vector, bw); } else { double[] arr = vector.GetDenseComponent(i); for (int j = 0; j < arr.Length; j++) { DebugFeatureValue(key, j, vector, bw); } } } }