You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Running least-squares-modelling/ as one script (the chapter's own contract) against process-improve 1.78.0:
Blocks that fail
investigating-an-existing-linear-model.rst:185 sets pd.options.plotting.backend = "plotly". Two later blocks were written for the matplotlib backend and break once that option is set: summary-of-steps-to-build-and-investigate-a-linear-model.rst:153-158 (subset.plot.scatter(...).set_title(...): a plotly Figure has no set_title) and multiple-linear-regression.rst:230 (.plot(..., grid=True): plotly's line() rejects grid). Either use plotly idioms in those blocks (the book's stated style) or stop switching the backend mid-chapter.
least-squares-exercises.rst:975-981: digester.hist(figsize=..., bins=30, color="lightblue") fails under the plotly backend (color must be a column), and digester.corr()["Y-Kappa"] raises ValueError: could not convert string to float: '31-00:00' because the Kamyr file's Observation column is text. The question at line 955 says to drop non-numeric identifier columns; the starter code never does.
covariance-and-correlation.rst:158-180 is a fill-in-the-blank exercise (___) and cannot run; it needs a .. code-check: skip marker with the reason.
Claims that do not hold
least-squares-models-with-a-single-x-variable.rst:269-271: "everything shown here carries over unchanged to scikit-learn's own LinearRegression". The block below reads mymodel.coefficients_ (sklearn has coef_, not coefficients_) and relies on print(mymodel) rendering an R-style summary; neither carries over. Only intercept_, fit, predict and score do.
multiple-linear-regression.rst:286-288: "a single column of random noise moves R2 only in the fifth decimal (0.93831 to 0.93832)". Over 1000 seeds the median new R2 is 0.93849 (fourth decimal; expected increase (1-R2)/(n-k) = 0.00042); only 6% of seeds round to 0.93832. No seed is given, so the sentence is not reproducible as written.
Smaller items
enrichment-topics.rst:130 and least-squares-models-with-a-single-x-variable.rst:268 link to github.com/kgdunn/process_improve (underscore, HTTP 403).
least-squares-exercises.rst:894 calls a process_improve block "A Pandas / scikit-learn version".
least-squares-models-with-a-single-x-variable.rst:208-211: the comment shows const / x1 labels, but mod_ls.params on an ndarray prints an unlabelled array. :296: "the shape these estimators expect"; OLS.fit reshapes 1-D input itself.
least-squares-exercises.rst:865: the upper bound 9.49 is written as 9.4.
enrichment-topics.rst:148-152: comment says "slope ... and intercept", the print shows intercept first.
All 54 quoted numbers in these files reproduced except the fifth-decimal claim. Found by executing every code block of the book (#274).
Running
least-squares-modelling/as one script (the chapter's own contract) against process-improve 1.78.0:Blocks that fail
investigating-an-existing-linear-model.rst:185setspd.options.plotting.backend = "plotly". Two later blocks were written for the matplotlib backend and break once that option is set:summary-of-steps-to-build-and-investigate-a-linear-model.rst:153-158(subset.plot.scatter(...).set_title(...): a plotlyFigurehas noset_title) andmultiple-linear-regression.rst:230(.plot(..., grid=True): plotly'sline()rejectsgrid). Either use plotly idioms in those blocks (the book's stated style) or stop switching the backend mid-chapter.least-squares-exercises.rst:975-981:digester.hist(figsize=..., bins=30, color="lightblue")fails under the plotly backend (colormust be a column), anddigester.corr()["Y-Kappa"]raisesValueError: could not convert string to float: '31-00:00'because the Kamyr file'sObservationcolumn is text. The question at line 955 says to drop non-numeric identifier columns; the starter code never does.covariance-and-correlation.rst:158-180is a fill-in-the-blank exercise (___) and cannot run; it needs a.. code-check: skipmarker with the reason.Claims that do not hold
least-squares-models-with-a-single-x-variable.rst:269-271: "everything shown here carries over unchanged to scikit-learn's ownLinearRegression". The block below readsmymodel.coefficients_(sklearn hascoef_, notcoefficients_) and relies onprint(mymodel)rendering an R-style summary; neither carries over. Onlyintercept_,fit,predictandscoredo.multiple-linear-regression.rst:286-288: "a single column of random noise moves R2 only in the fifth decimal (0.93831 to 0.93832)". Over 1000 seeds the median new R2 is 0.93849 (fourth decimal; expected increase(1-R2)/(n-k) = 0.00042); only 6% of seeds round to 0.93832. No seed is given, so the sentence is not reproducible as written.Smaller items
enrichment-topics.rst:130andleast-squares-models-with-a-single-x-variable.rst:268link togithub.com/kgdunn/process_improve(underscore, HTTP 403).least-squares-exercises.rst:894calls aprocess_improveblock "A Pandas / scikit-learn version".outliers-discrepancy-leverage-and-influence-of-the-observations.rst:108-110says unconditionally thatleverage_andinfluence_are provided; the library computes them only for a single predictor with an intercept and returns NaN otherwise (OLS.leverage_ and OLS.influence_ are silently NaN for multiple regression and for fit_intercept=False process-improve#545).least-squares-models-with-a-single-x-variable.rst:208-211: the comment showsconst/x1labels, butmod_ls.paramson an ndarray prints an unlabelled array.:296: "the shape these estimators expect";OLS.fitreshapes 1-D input itself.least-squares-exercises.rst:865: the upper bound 9.49 is written as 9.4.enrichment-topics.rst:148-152: comment says "slope ... and intercept", the print shows intercept first.All 54 quoted numbers in these files reproduced except the fifth-decimal claim. Found by executing every code block of the book (#274).