Giter Site home page Giter Site logo

cylance / introductiontomachinelearningforsecuritypros Goto Github PK

View Code? Open in Web Editor NEW
148.0 27.0 57.0 64.85 MB

Example code for our book Introduction to Artificial Intelligence for Security Professionals

License: GNU General Public License v3.0

HTML 4.53% JavaScript 3.41% Python 91.25% Shell 0.81%

introductiontomachinelearningforsecuritypros's Introduction

IntroductionToMachineLearningForSecurityPros

introductiontomachinelearningforsecuritypros's People

Contributors

bwall avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

introductiontomachinelearningforsecuritypros's Issues

Syntax error in extract_features_from_prevectors.py

When running the python script extract_features_from_prevectors.py it throws a syntax error in line 7:

line 7: syntax error near unexpected token (' line 7: with open ("prevectors.json", "r") as f:'

It also prints out: "from: too many arguments"

I'VE LOOKED AT THE CODE BUT COULD NOT FIND ANYTHING WRONG. ANY IDEAS?

"Cannot convert argument type %s to rgba array" % type(c))

In visualize_vectors.py on line 16 the third paramater zs passed to plt.scatter() causes and exception to be thrown when trying to convert to an rgba array. I was able to resolve this issue with minor fixes.

Python Version: 2.7.12
Matplotlib Version: 1.5.1
Numpy Version: 1.11.0

Exception Thrown:

chris@chris-HP-EliteBook-820-G3:~/Projects/IntroductionToMachineLearningForSecurityPros/clustering_example$ python visualize_vectors.py -i secrepo.h5
(10000, 3)
Traceback (most recent call last):
File "visualize_vectors.py", line 32, in
visualize(vectors)
File "visualize_vectors.py", line 17, in visualize
s=200,
File "/usr/lib/python2.7/dist-packages/matplotlib/pyplot.py", line 3251, in scatter
edgecolors=edgecolors, data=data, **kwargs)
File "/usr/lib/python2.7/dist-packages/mpl_toolkits/mplot3d/axes3d.py", line 2273, in scatter
patches = Axes.scatter(self, xs, ys, s=s, c=c, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/matplotlib/init.py", line 1814, in inner
return func(ax, *args, **kwargs)
File "/usr/lib/python2.7/dist-packages/matplotlib/axes/_axes.py", line 3893, in scatter
alpha=alpha
File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 831, in init
Collection.init(self, **kwargs)
File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 117, in init
self.set_facecolor(facecolors)
File "/usr/lib/python2.7/dist-packages/matplotlib/collections.py", line 612, in set_facecolor
self._facecolors = mcolors.colorConverter.to_rgba_array(c, self._alpha)
File "/usr/lib/python2.7/dist-packages/matplotlib/colors.py", line 391, in to_rgba_array
"Cannot convert argument type %s to rgba array" % type(c))

Book Errata - Page 52

The command shown has -m set to 2 and above the paragraph states you will set M to 5 . Not super important, but thought you might wish to be aware.

errata_01

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.