Giter Club home page Giter Club logo

applied-predictive-modeling-with-python's People

Contributors

brianray avatar leig 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

applied-predictive-modeling-with-python's Issues

Wrong axis name

Hi, Thank you very much for doing this. I found the figure in out[67] in Chapter 6.ipynb might have wrong axis names. The y label should be percentage of total variance, and the x label should be component.

Not able to fetch data

I am new to python. As the code was written some 4 years back, I am not able to use some functionalities. Currently I am using Python version 3.7.3 and it no longer supports pandas.rpy.common. So I am importing pandas2ri from rpy2.robjects to tackle this.

In the function convert_datafiles(datasets_folder) in the loop for var in robj, I am replacing first myRData = com.load(var) with myRData=pandas.ri2py(var).
But I am not getting any success in it. Please help me out in this.

Thanks for doing this

I'm the first author (Max). Thanks for doing the translations to python. I'd like to offer any top-level help that I can (e.g. "why did you do it that way" or "what exactly does this do").

There are probably a few models not in scikit-learn but we can probably find something fairly similar.

One request though... please try not to copy/paste a lot of text directly from the book. Our publisher might go apeshit over that.

Code changes to make fetch_data.py work in Python 3.10.x

Hi All
As we all know, this was written way back and since not been actively maintained. Here are the code changes to be done to make it work on python 3.

Step1: Changes to the import
Remove:
import pandas.rpy.common as com
Add:

from rpy2.robjects import r
from rpy2.robjects import pandas2ri
from rpy2.robjects.conversion import localconverter

Step2 : Change URL value

In line #16, remove

APM_URL = ('http://cran.r-project.org/src/contrib/'
            'AppliedPredictiveModeling_1.1-6.tar.gz')

and instead add

APM_URL = ('https://cran.r-project.org/src/contrib/Archive/AppliedPredictiveModeling/'
            'AppliedPredictiveModeling_1.1-6.tar.gz')

Step 3: Modify the function convert_datafiles in line#123

Remove line# 140
myRData = com.load_data(var)

Instead add the following lines

r.data(var)
myRData=r[var]
with localconverter(robjects.default_converter + pandas2ri.converter):
    myRData = robjects.conversion.rpy2py(myRData)

That's it. You may encounter problems with R - make sure you install R and the R path is exported in the PATH variable. Otherwise, the above changes should work. Please note that I tested my changes only on Mac OS X.

Are PRs being considered?

Hi,
Thanks a lot for creating these notebooks. They are great!
I have a PR to add a particular plot in one of the notebooks. Are they being considered?
Please let me know.
Regards,
Keshav

Issue with Fetchdata.py

Hello, Thanks for your effort as these notebooks are very helpful. However, i am facing issues with fetchdata as pandas.rpy.common have become obsolete and could not be used anymore, though i have tried using rpy2 but it does not work as expected. Could you please share your .csv files for datasets or if you could help with the code. Thanks.

Source Data

Hi thanks for sharing the notebooks! Could you please share the .csv files that you use for the analysis?

Chapter 9 and 10

Hi,

Could you share chapter 9 and 10 as well? Or do you intentionally deleted them?

Thanks!

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.