docs: @Override
      public void plotVocab(BarnesHutTsne tsne, int numWords, UiConnectionInfo connectionInfo) {
          try {
              final List<String> labels = fitTnseAndGetLabels(tsne, numWords);
              final INDArray reducedData = tsne.getData();
              StringBuilder sb = new StringBuilder();
              for (int i = 0; i < reducedData.rows() && i < numWords; i++) {
                  String word = labels.get(i);
                  INDArray wordVector = reducedData.getRow(i);
                  for (int j = 0; j < wordVector.length(); j++) {
                      sb.append(String.valueOf(wordVector.getDouble(j))).append(",");
                  }
                  sb.append(word);
              }
  
              String address = connectionInfo.getFirstPart() + "/tsne/post/" + connectionInfo.getSessionId();
              //            System.out.println("ADDRESS: " + address);
              URI uri = new URI(address);
  
              HttpURLConnection connection = (HttpURLConnection) uri.toURL().openConnection();
              connection.setRequestMethod("POST");
              connection.setRequestProperty("User-Agent", "Mozilla/5.0");
              //            connection.setRequestProperty("Content-Type", "application/json");
              connection.setRequestProperty("Content-Type", "multipart/form-data; boundary=-----TSNE-POST-DATA-----");
              connection.setDoOutput(true);
  
              final OutputStream outputStream = connection.getOutputStream();
              final PrintWriter writer = new PrintWriter(outputStream);
              writer.println("-------TSNE-POST-DATA-----");
              writer.println("Content-Disposition: form-data; name=\"fileupload\"; filename=\"tsne.csv\"");
              writer.println("Content-Type: text/plain; charset=UTF-16");
              writer.println("Content-Transfer-Encoding: binary");
              writer.println();
              writer.flush();
  
              DataOutputStream dos = new DataOutputStream(outputStream);
              dos.writeBytes(sb.toString());
              dos.flush();
              writer.println();
              writer.flush();
              dos.close();
              outputStream.close();
  
              try {
                  int responseCode = connection.getResponseCode();
                  System.out.println("RESPONSE CODE: " + responseCode);
  
                  if (responseCode != 200) {
                      BufferedReader in = new BufferedReader(new InputStreamReader(connection.getInputStream()));
                      String inputLine;
                      StringBuilder response = new StringBuilder();
  
                      while ((inputLine = in.readLine()) != null) {
                          response.append(inputLine);
                      }
                      in.close();
  
                      log.warn("Error posting to remote UI - received response code {}\tContent: {}", response,
                                      response.toString());
                  }
              } catch (IOException e) {
                  log.warn("Error posting to remote UI at {}", uri, e);
              }
          } catch (Exception e) {
              throw new RuntimeException(e);
          }
      }