<jupyter_start><jupyter_text>This example comes from the ML.NET documentation: https://docs.microsoft.com/en-us/dotnet/api/microsoft.ml.kernelexpansioncatalog.approximatedkernelmap?view=ml-dotnetdotnet<jupyter_code>class DataPoint
{
    [VectorType(7)]
    public float[] Features { get; set; }
}
var mlContext = new MLContext();
var samples = new List<DataPoint>()
{
    new DataPoint(){ Features = new float[7] { 1, 1, 0, 0, 1, 0, 1} },
    new DataPoint(){ Features = new float[7] { 0, 0, 1, 0, 0, 1, 1} },
    new DataPoint(){ Features = new float[7] {-1, 1, 0,-1,-1, 0,-1} },
    new DataPoint(){ Features = new float[7] { 0,-1, 0, 1, 0,-1,-1} }
};
var data = mlContext.Data.LoadFromEnumerable(samples);<jupyter_output><empty_output><jupyter_text>ApproximatedKernel map takes data and maps it's to a random low -dimensional space.<jupyter_code>var approximation = mlContext.Transforms.ApproximatedKernelMap("Features", rank: 4, generator: new GaussianKernel(gamma: 0.7f), seed: 1);
var tansformer = approximation.Fit(data);
var transformedData = tansformer.Transform(data);
transformedData.GetColumn<float[]>("Features")<jupyter_output><empty_output>
{'fraction_non_alphanumeric': 0.1523809523809524, 'fraction_numerical': 0.032034632034632034, 'mean_word_length': 5.605714285714286, 'pattern_counts': {'":': 0, '<': 11, '<?xml version=': 0, '>': 11, 'https://': 1, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'chain_length': '2', 'dir': 'jupyter-structured-clean-dedup', 'id': '321543', 'license': 'MIT', 'n_tokens_mistral': 419, 'n_tokens_neox': 389, 'n_words': 97, 'path': 'ApproximatedKernelMap.ipynb', 'repo_name': 'rvernagus/simple-ml.net-examples', 'size': '1155'}