using System;
using System.Linq;

namespace CognitiveToolkit
{
    internal static class HelperFunctions
    {
        public static float[] SoftMax(float[] values)
        {
            var denom = (from v in values select Math.Exp(v)).Sum();
            return (from v in values select (float)(Math.Exp(v) / denom)).ToArray();
        }
    }
}

