Giter Club home page Giter Club logo

themlbook's People

Contributors

aburkov avatar cclauss 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  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

themlbook's Issues

Failed in running gradient_descent.py.

Hello, I have installed all the Software Libraries required, and removed the header (the first line of Advertising.csv), removed the ids (the first column of Advertising.csv), and then replaced the comas by tabs (real tabs, not 2/4/8 spaces). However, I still failed in running it.
PS C:\Users\DELL> & C:/Users/DELL/AppData/Local/Programs/Python/Python36/python.exe "e:/Work/2020-Summer/other/Research Project/Report/ML/from future import print_function.py"
epoch: 0 loss: 92.32078294903626
w, b: 0.7412639000000002 0.028045000000000007
Traceback (most recent call last):
File "e:/Work/2020-Summer/other/Research Project/Report/ML/from future import print_function.py", line 74, in
w, b = train(x, y, 0.0, 0.0, 0.001, 15000)
File "e:/Work/2020-Summer/other/Research Project/Report/ML/from future import print_function.py", line 60, in train
fig1.savefig('../../Illustrations/gradient_descent-' + str(image_counter) + '.eps', format='eps', dpi=1000, bbox_inches = 'tight', pad_inches = 0)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\figure.py", line 2203, in savefig
self.canvas.print_figure(fname, **kwargs)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\backend_bases.py", line 2126, in print_figure
**kwargs)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\backends\backend_ps.py", line 831, in print_eps
return self._print_ps(outfile, 'eps', *args, **kwargs)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\backends\backend_ps.py", line 851, in _print_ps
orientation, papertype, **kwargs)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\cbook\deprecation.py", line 358, in wrapper
return func(*args, **kwargs)
File "C:\Users\DELL\AppData\Local\Programs\Python\Python36\lib\site-packages\matplotlib\backends\backend_ps.py", line 1076, in _print_figure
with open(outfile, 'w', encoding='latin-1') as fh:
FileNotFoundError: [Errno 2] No such file or directory: '../../Illustrations/gradient_descent-2.eps'
PS C:\Users\DELL>
How to solve this problem.
Thank you very much.

How to run gradient_descent.py?

Hi,

I tried running gradient_descent.py.
But it failed.

$ python gradient_descent.py 
Traceback (most recent call last):
  File "gradient_descent.py", line 73, in <module>
    x, y = np.loadtxt("data.txt", delimiter= "\t", unpack = True)
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1146, in loadtxt
    for x in read_data(_loadtxt_chunksize):
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1074, in read_data
    items = [conv(val) for (conv, val) in zip(converters, vals)]
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1074, in <listcomp>
    items = [conv(val) for (conv, val) in zip(converters, vals)]
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 781, in floatconv
    return float(x)
ValueError: could not convert string to float: 'The dataset for gradient descent example can be downloaded from: http://themlbook.com/wiki/doku.php?id=gradient_descent'

I downloaded the CSV pointed in data.txt and loaded it instead of it, but it didn't work as well:

$ python gradient_descent.py
Traceback (most recent call last):
  File "gradient_descent.py", line 73, in <module>
    x, y = np.loadtxt("Advertising.csv", delimiter= "\t", unpack = True)
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1146, in loadtxt
    for x in read_data(_loadtxt_chunksize):
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1074, in read_data
    items = [conv(val) for (conv, val) in zip(converters, vals)]
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 1074, in <listcomp>
    items = [conv(val) for (conv, val) in zip(converters, vals)]
  File "/Users/fujisho/.pyenv/versions/3.7.4/lib/python3.7/site-packages/numpy/lib/npyio.py", line 781, in floatconv
    return float(x)
ValueError: could not convert string to float: ',TV,radio,newspaper,sales'

It would be helpful if you can provide any tips to solve the problem.

Prediction strength

Hi,
I was wondering if you will be interested to improve the running time of prediction strenght file. I did some tests and it takes so long. I can volunteer to optimized it

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.