Comments (9)
Hi @daijob00. The main difference between the two is the presence of the error collection, but you can call the simple_trick
function in the first one (see how below).
If you want to use simple_trick
in the second linear_regression
function, you'll need to comment out the learning_rate
argument as well and adjust the parenthesis like so because the simple_trick
only takes four arguments.
# Uncomment one of the following 3 lines to use the simple, the absolute, or the square trick
price_per_room, base_price = simple_trick(base_price,
# price_per_room, base_price = absolute_trick(base_price,
# price_per_room, base_price = square_trick(base_price,
price_per_room,
num_rooms,
price,
#learning_rate=learning_rate)
)
Also, feel free to try the refactored version as well. I did my best to make switching between the different functions a bit more intuitive.
from manning.
Hello,
I am getting an error of attribute name, even after installing the utils (pip install python-utils) package
utils.plot_points(features, labels)
AttributeError: module 'utils' has no attribute 'plot_points'
may i know how to fix this.?
from manning.
@vilas273 Don't confuse python-utils with utils.py provided with the code.
How are you running it? Can you check the refactored version to see if you're getting the same issue?
from manning.
Hello @dhern023 Can you advise what Python software to use with your book (Grokking Machine Learning)? PyCharm or VS Code. I tried to use your coding in Jupyter, or Google Colab, but with files you provided I guess it's better to use an installed software.
from manning.
@ArmanbekAlkin What breaks for you?
Did you install the requirements.txt in your conda environment before you ran the code on juptyer? You can also to the same thing on Google Collab.
Afterwards, did you try the refactored version(s)?
from manning.
@dhern023 Hi Luis. Thank you for the reply. I haven't seen the requirements.txt file. Let me check your repository for this file, and look at the requirements. I am reading your book (Grokking Machine Learning), and trying to use your codes examples in PyCharm software application. I haven't used Refactored versions, as I noticed the difference with the book and didn't know if they are working. I will try them. My problem was, that for example, I use linear regression coding file from Chapter 3 and trying to execute code line by line and haven't seen the graphs you showed in the book. Now I see that you in refactored version of the file you have plt.show() functions. Let me play with refactored files and see how it goes. I like to use PyCharm to keep all my files and projects in one folder and track the difference with GIT.
from manning.
@dhern023 Hi Luis. I tried non-refactored version and it worked just fine, looks like I just didn't install some libraries. Although Turicreate is not working (I realized it's not working on Win10 OS), but it's OK. I am able to move forward to next topic. Thank you!
from manning.
from manning.
@dhern023 Oh, my apoloigies! I thought this is the Author's repository and that he is replying to me )) I'm sorry my friend. I will play with refactored versions then as well to understand the concept. Thank you one more time for your support.
from manning.
Related Issues (10)
- Files Error due to dependency on Turicreate on Windows10 HOT 1
- Found some typos HOT 1
- Ensemble Chapter : sklearn.externals.six HOT 2
- Python version HOT 1
- Mac OSX running "A graphical example"
- Perceptron notebook doesn't follow book
- utils.plot_points(features, labels) doesn't work in Google Colab.
- Installing TuriCreate on Apple M1 Silicon machine
- RSME argument might be features instead of features[0]
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manning.