1
ML VSCode
Vision
10 Writeln 'Hi AI';
20 Goto 10;
2
Agenda BASTA 2020
• Data Preprocessing versus Regularization
• SonarLint in VS Code
• GraphViz (dot) language support, a C# wrapper
for GraphViz graph generator for dotnet core.
• MS Power BI (VS Code / Jupyter Notebook)
• Installation, Optimisation & Sources
3
Machine Learning
http://docs.codehaus.org/display/SONAR/Plugin+Library
4
Develop for Multiple Devices
https://www.tensorflow.org/
5
Now Demo: TensorFlowTest64.dproj
6
Data Truth
7
Water Pump Demo
• Barchart (Histograms, Maps, Plot)
• Confusion Matrix
• PieChart, Density Plot
• TensorFlow 1.5.0 → Demo Python, dotnet core
•
https://github.com/maxkleiner/maXbox/blob/master/waterpumpspredictor2.ipynb
GraphViz-C-Sharp-Wrapper Demo:
https://sourceforge.net/projects/maxbox/files/Examples/EKON/BASTA2020/visout.zip/download
https://github.com/helgeu/GraphViz-C-Sharp-Wrapper
8
Visualise Model
NN:= TFannNetwork.create(self)
with NN do begin
Layers.add('2')
Layers.add('3')
Layers.add('1')
LearningRate:= 0.699999988079071100
ConnectionRate:= 1.000
TrainingAlgorithm:= taFANN_TRAIN_RPROP
ActivationFunctionHidden:= afFANN_SIGMOID
ActivationFunctionOutput:= afFANN_SIGMOID
end;
9
Graph Viz
10
Graphviz
Graphviz is open source graph visualization software.
Graph visualization is a way of representing structural
information as diagrams of abstract graphs and
networks.
It has important applications in networking,
bioinformatics, software engineering, database and web
design, machine learning, and in visual interfaces for
other technical domains. Open In Colab
https://colab.research.google.com/github/maxkleiner/maXbox/blob/master/Copy_of_simple_image_classification_with_any_dataset.ipynb
https://colab.research.google.com/github/maxkleiner/
maXbox/blob/master/Copy_of_simple_image_classificat
ion_with_any_dataset.ipynb
11
GraphViz-C-Sharp-Wrapper
• using System.Collections;
• using System.Runtime.InteropServices;
• using GraphVizWrapper;
• using GraphVizWrapper.Commands;
• using GraphVizWrapper.Queries;
• using Graphviz4Net.Graphs;
• using System.Drawing.Imaging;
• using System.Drawing;
• using System.Drawing.Drawing2D;
• using System.IO; //memory stream
http://docs.codehaus.org/display/SONAR/Developers%27+Seven+Deadly+Sins
12
MS Power BI
13
14
3D or 4D ?
15
https://colab.research.google.com/github/maxkleiner/maXbox/blob/master/EKON24_SimpleImageClassificationCPU.ipynb
classes=('plane','car','bird','cat',
'deer','dog','frog','horse','ship','truck')
16
Win 10 Core Optimisation
CPU or GPU or TPU?
17
Save resized files local
• import os
• import urllib.request
• import tarfile
•
• if not os.path.isfile('cifar-10-batches-bin/data_batch_1.bin'):
• print("Downloading CIFAR-10 Files")
• url = 'https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz'
• urllib.request.urlretrieve(url, './file.tar')
•
• tar = tarfile.open("file.tar")
• tar.extractall()
• tar.close()
18
Jupyter in VS Code
https://maxbox4.wordpress.com/2020/01/26/jupyter-in-visual-studio-code/
19
Links & Sources
• Almost all files:
• https://www.sonarlint.org/vscode/
• https://www.graphviz.org/resources/
• https://powerbi.microsoft.com/en-us/
•
• https://sourceforge.net/projects/maxbox/files/Examples/EKON/EKON24/
•
• https://maxbox4.wordpress.com/blog/
•
• https://github.com/maxkleiner/maXbox4/releases
•
20
May the source be with you!
max@kleiner.com
www.softwareschule.ch

BASTA 2020 VS Code Data Visualisation

  • 1.
    1 ML VSCode Vision 10 Writeln'Hi AI'; 20 Goto 10;
  • 2.
    2 Agenda BASTA 2020 •Data Preprocessing versus Regularization • SonarLint in VS Code • GraphViz (dot) language support, a C# wrapper for GraphViz graph generator for dotnet core. • MS Power BI (VS Code / Jupyter Notebook) • Installation, Optimisation & Sources
  • 3.
  • 4.
    4 Develop for MultipleDevices https://www.tensorflow.org/
  • 5.
  • 6.
  • 7.
    7 Water Pump Demo •Barchart (Histograms, Maps, Plot) • Confusion Matrix • PieChart, Density Plot • TensorFlow 1.5.0 → Demo Python, dotnet core • https://github.com/maxkleiner/maXbox/blob/master/waterpumpspredictor2.ipynb GraphViz-C-Sharp-Wrapper Demo: https://sourceforge.net/projects/maxbox/files/Examples/EKON/BASTA2020/visout.zip/download https://github.com/helgeu/GraphViz-C-Sharp-Wrapper
  • 8.
    8 Visualise Model NN:= TFannNetwork.create(self) withNN do begin Layers.add('2') Layers.add('3') Layers.add('1') LearningRate:= 0.699999988079071100 ConnectionRate:= 1.000 TrainingAlgorithm:= taFANN_TRAIN_RPROP ActivationFunctionHidden:= afFANN_SIGMOID ActivationFunctionOutput:= afFANN_SIGMOID end;
  • 9.
  • 10.
    10 Graphviz Graphviz is opensource graph visualization software. Graph visualization is a way of representing structural information as diagrams of abstract graphs and networks. It has important applications in networking, bioinformatics, software engineering, database and web design, machine learning, and in visual interfaces for other technical domains. Open In Colab https://colab.research.google.com/github/maxkleiner/maXbox/blob/master/Copy_of_simple_image_classification_with_any_dataset.ipynb https://colab.research.google.com/github/maxkleiner/ maXbox/blob/master/Copy_of_simple_image_classificat ion_with_any_dataset.ipynb
  • 11.
    11 GraphViz-C-Sharp-Wrapper • using System.Collections; •using System.Runtime.InteropServices; • using GraphVizWrapper; • using GraphVizWrapper.Commands; • using GraphVizWrapper.Queries; • using Graphviz4Net.Graphs; • using System.Drawing.Imaging; • using System.Drawing; • using System.Drawing.Drawing2D; • using System.IO; //memory stream http://docs.codehaus.org/display/SONAR/Developers%27+Seven+Deadly+Sins
  • 12.
  • 13.
  • 14.
  • 15.
  • 16.
    16 Win 10 CoreOptimisation CPU or GPU or TPU?
  • 17.
    17 Save resized fileslocal • import os • import urllib.request • import tarfile • • if not os.path.isfile('cifar-10-batches-bin/data_batch_1.bin'): • print("Downloading CIFAR-10 Files") • url = 'https://www.cs.toronto.edu/~kriz/cifar-10-binary.tar.gz' • urllib.request.urlretrieve(url, './file.tar') • • tar = tarfile.open("file.tar") • tar.extractall() • tar.close()
  • 18.
    18 Jupyter in VSCode https://maxbox4.wordpress.com/2020/01/26/jupyter-in-visual-studio-code/
  • 19.
    19 Links & Sources •Almost all files: • https://www.sonarlint.org/vscode/ • https://www.graphviz.org/resources/ • https://powerbi.microsoft.com/en-us/ • • https://sourceforge.net/projects/maxbox/files/Examples/EKON/EKON24/ • • https://maxbox4.wordpress.com/blog/ • • https://github.com/maxkleiner/maXbox4/releases •
  • 20.
    20 May the sourcebe with you! max@kleiner.com www.softwareschule.ch