Example #1
0
 /// <summary>
 /// Creates a <see cref="SupportVectorMachine"/> from the specified byte array.
 /// </summary>
 /// <param name="buffer">The buffer to read the <see cref="SupportVectorMachine"/> from.</param>
 /// <returns>The <see cref="SupportVectorMachine"/> this method creates.</returns>
 public static SupportVectorMachine FromMemory(byte[] buffer) => SupportVectorMachine.FromString(UTF8Encoding.UTF8.GetString(buffer));
Example #2
0
 /// <summary>
 /// Creates a <see cref="SupportVectorMachine"/> from the specified file.
 /// </summary>
 /// <param name="fileName">A string that contains the name of the file from which to create the <see cref="SupportVectorMachine"/>.</param>
 /// <returns>The <see cref="SupportVectorMachine"/> this method creates.</returns>
 public static SupportVectorMachine FromFile(string fileName) => SupportVectorMachine.FromString(File.ReadAllText(fileName, Encoding.UTF8));