{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "### Draws a Correlation Chart or Heatmap on the Titanic data set" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### NuGet package installation" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [ { "data": { "text/html": [ "Installing package MathNet.Numerics, version 4.9.0.....................................done!" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Successfully added reference to package MathNet.Numerics, version 4.9.0" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Installing package Microsoft.ML, version 1.4.0.........done!" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Successfully added reference to package Microsoft.ML, version 1.4.0" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Installing package XPlot.Plotly, version 3.0.1........done!" ] }, "metadata": {}, "output_type": "display_data" }, { "data": { "text/html": [ "Successfully added reference to package XPlot.Plotly, version 3.0.1" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "#r \"nuget:MathNet.Numerics, 4.9.0\"\n", "#r \"nuget:Microsoft.ML, 1.4.0\"\n", "#r \"nuget:XPlot.Plotly, 3.0.1\"" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Namespaces" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "using Microsoft.ML;\n", "using Microsoft.ML.Data;\n", "using XPlot.Plotly;\n", "using MathNet.Numerics.Statistics;" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Simple heatmap sample\n", "Warming up ..." ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
" ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "var graph = new Graph.Heatmap()\n", "{\n", " x = new [] { \"one\", \"two\", \"three\"},\n", " y = new [] { \"three\", \"two\", \"one\" },\n", " z = new List