Giter VIP home page Giter VIP logo

islp's Introduction

islp

Solutions to 'An Introduction to Statistical Learning with Applications in R'... in Python!

HOW TO

Installation

  • install anaconda, and create env based on environment.yml

From scratch

create anaconda env 'islp', python 3.5

source activate islp

pip install jupyterlab

pip install numpy

pip install pandas

pip install matplotlib

pip install sklearn

pip install seaborn

pip install ipywidgets (so that seaborn import warning goes away)

pip install mkdocs

pip install mkdocs-cinder pip install pymdown-extensions #for latex

pip install mlxtend

pip install statsmodels

Windows

islp's People

Contributors

ricojoaom 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

Watchers

 avatar  avatar  avatar

islp's Issues

Simplify Ch3 Exercise 8 (a) IV

First off all, thank you for your work in making these solutions available in python in such an elegant format. It has helped me a lot in my studies!

In your answer to chapter 3 exercise 8 part a question iv, you ask

This exercise is a bit trickier to do in Python, since there's no standard out-of-the-box function for it (please let us know if you could find one).

statsmodels now provides this functionality (where res is the result of the model fit):

pred = res.get_prediction(exog={'horsepower':98})
pred.summary_frame(alpha=0.05)

This returns a dataframe with one row per prediction (in this case only 1 row) with all the values that we need (and matching exactly your current answer)
mean_ci_[lower|upper] is the confidence interval
obs_ci_[lower|upper] is the prediction interval

        mean   mean_se  mean_ci_lower  mean_ci_upper  obs_ci_lower  obs_ci_upper
0  24.467077  0.251262      23.973079      24.961075     14.809396     34.124758

Happy to submit a PR if you'd like to see this changed

Exercise 6.3 d missing

Answer for exercise 6.3 part d is missing (the answer probably have similar reasoning as part a), and the answer for part e is written under part c instead of the header part e.

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.