mikexcohen / LinAlg4DataScience

Code that accompanies the book "Linear Algebra for Data Science"
284 stars 144 forks source link

Mismatch of the terminology #3

Open capissimo opened 1 year ago

capissimo commented 1 year ago

On page 91 you enumerate matrix spaces, mentioning that the fourth one is right null space, but in the Resume on page 106 you again enumerate them, but this time mentioning left-null space. Which one is correct? Where can I find errata?

mikexcohen commented 1 year ago

Ah, that's a little typo. Great catch, Andrey! And thanks for letting me know.

There are two null spaces: left and right. When people write only "null space" they are referring to the left null space. Therefore, that list of spaces should be "column, row, null, right-null."

The book errata are listed on the O'Reilly book page, and will be incorporated into the next publishing of the digital versions.

Best wishes and happy learning :) Mike

On Tue, Feb 14, 2023 at 12:03 AM Andrey Logunov @.***> wrote:

On page 91 you enumerate matrix spaces, mentioning that the fourth one is right null space, but in the Resume on page 106 you again enumerate them, but this time mentioning left-null space. Which one is correct? Where can I find errata?

— Reply to this email directly, view it on GitHub https://github.com/mikexcohen/LinAlg4DataScience/issues/3, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKKLIZ5VY2BI7ZTJJPJLUDWXJEMNANCNFSM6AAAAAAU2MABI4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Mike X Cohen, PhD Fresh look: mikexcohen.com

capissimo commented 1 year ago

Thanks for your feedback, Mike.

Here's one more point. The code sample in Exercise 3-3 does not work with the latest version of plotly. In order for it to work you need to prepend it with following 2 lines;

import plotly.io as pio pio.renderers.default = 'iframe'

In full:

import plotly.io as pio pio.renderers.default = 'iframe' import plotly.graph_objects as go

...

fig = go.Figure( data=[go.Scatter3d(x=points[:,0], y=points[:,1], z=points[:,2], mode='markers', marker=dict(size=6, color='black') )]) fig.update_layout(margin=dict(l=0, r=0, b=0, t=0)) plt.savefig('images\Figure_03_07b.png', dpi=300) fig.show()

And here's a shorter version of your code:

import plotly.io as pio pio.renderers.default = 'iframe' import plotly.graph_objects as go

...

fig = go.Figure(data=go.Scatter3d(x=points[:,0], y=points[:,1], z=points[:,2], mode='markers', marker=dict(size=6, color='black'))) fig.show()

If I find anything more, I'll certainly let you know. I like your book. It is well written and very understandable for such a difficult topic. Will there be a second edition of it in paper?

B.R. Andrey

ср, 15 февр. 2023 г. в 10:12, Mike X Cohen @.***>:

Ah, that's a little typo. Great catch, Andrey! And thanks for letting me know.

There are two null spaces: left and right. When people write only "null space" they are referring to the left null space. Therefore, that list of spaces should be "column, row, null, right-null."

The book errata are listed on the O'Reilly book page, and will be incorporated into the next publishing of the digital versions.

Best wishes and happy learning :) Mike

On Tue, Feb 14, 2023 at 12:03 AM Andrey Logunov @.***> wrote:

On page 91 you enumerate matrix spaces, mentioning that the fourth one is right null space, but in the Resume on page 106 you again enumerate them, but this time mentioning left-null space. Which one is correct? Where can I find errata?

— Reply to this email directly, view it on GitHub https://github.com/mikexcohen/LinAlg4DataScience/issues/3, or unsubscribe < https://github.com/notifications/unsubscribe-auth/ARKKLIZ5VY2BI7ZTJJPJLUDWXJEMNANCNFSM6AAAAAAU2MABI4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Mike X Cohen, PhD Fresh look: mikexcohen.com

— Reply to this email directly, view it on GitHub https://github.com/mikexcohen/LinAlg4DataScience/issues/3#issuecomment-1430563232, or unsubscribe https://github.com/notifications/unsubscribe-auth/AANORXIPFRR236FQGHL5B4TWXQNNVANCNFSM6AAAAAAU2MABI4 . You are receiving this because you authored the thread.Message ID: @.***>

mikexcohen commented 1 year ago

Hi Andrey,

Annoyingly, some features of Python, like visualizations, are IDE-dependent. My code works without errors or warnings on google-colab, and adding your suggestion actually broke the code and prevented any graphs from appearing.

As I wrote in the intro to the book, I recommend using colab to follow along with the book, and any other IDE is fine but you may need to make some modifications to the code. It's just not feasible for me to ensure the code will work on all IDEs and all versions, so I chose to focus on one IDE that will be easy for most readers.

Best wishes and happy linear-algebraing :) Mike

On Thu, Feb 16, 2023 at 12:54 AM Andrey Logunov @.***> wrote:

Thanks for your feedback, Mike.

Here's one more point. The code sample in Exercise 3-3 does not work with the latest version of plotly. In order for it to work you need to prepend it with following 2 lines;

import plotly.io as pio pio.renderers.default = 'iframe'

In full:

import plotly.io as pio pio.renderers.default = 'iframe' import plotly.graph_objects as go

...

fig = go.Figure( data=[go.Scatter3d(x=points[:,0], y=points[:,1], z=points[:,2], mode='markers', marker=dict(size=6, color='black') )]) fig.update_layout(margin=dict(l=0, r=0, b=0, t=0)) plt.savefig('images\Figure_03_07b.png', dpi=300) fig.show()

And here's a shorter version of your code:

import plotly.io as pio pio.renderers.default = 'iframe' import plotly.graph_objects as go

...

fig = go.Figure(data=go.Scatter3d(x=points[:,0], y=points[:,1], z=points[:,2], mode='markers', marker=dict(size=6, color='black'))) fig.show()

If I find anything more, I'll certainly let you know. I like your book. It is well written and very understandable for such a difficult topic. Will there be a second edition of it in paper?

B.R. Andrey

ср, 15 февр. 2023 г. в 10:12, Mike X Cohen @.***>:

Ah, that's a little typo. Great catch, Andrey! And thanks for letting me know.

There are two null spaces: left and right. When people write only "null space" they are referring to the left null space. Therefore, that list of spaces should be "column, row, null, right-null."

The book errata are listed on the O'Reilly book page, and will be incorporated into the next publishing of the digital versions.

Best wishes and happy learning :) Mike

On Tue, Feb 14, 2023 at 12:03 AM Andrey Logunov @.***> wrote:

On page 91 you enumerate matrix spaces, mentioning that the fourth one is right null space, but in the Resume on page 106 you again enumerate them, but this time mentioning left-null space. Which one is correct? Where can I find errata?

— Reply to this email directly, view it on GitHub https://github.com/mikexcohen/LinAlg4DataScience/issues/3, or unsubscribe <

https://github.com/notifications/unsubscribe-auth/ARKKLIZ5VY2BI7ZTJJPJLUDWXJEMNANCNFSM6AAAAAAU2MABI4

. You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Mike X Cohen, PhD Fresh look: mikexcohen.com

— Reply to this email directly, view it on GitHub < https://github.com/mikexcohen/LinAlg4DataScience/issues/3#issuecomment-1430563232 , or unsubscribe < https://github.com/notifications/unsubscribe-auth/AANORXIPFRR236FQGHL5B4TWXQNNVANCNFSM6AAAAAAU2MABI4

. You are receiving this because you authored the thread.Message ID: @.***>

— Reply to this email directly, view it on GitHub https://github.com/mikexcohen/LinAlg4DataScience/issues/3#issuecomment-1431590421, or unsubscribe https://github.com/notifications/unsubscribe-auth/ARKKLI3V572NN4KPQYM3ZODWXT32JANCNFSM6AAAAAAU2MABI4 . You are receiving this because you commented.Message ID: @.***>

-- Mike X Cohen, PhD Fresh look: mikexcohen.com