-
Notifications
You must be signed in to change notification settings - Fork 2
Docs: V0.2-tutorials/least square example #129
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds a "Tutorials" section to the documentation, specifically including a least squares example that demonstrates how to use the RLinearAlgebra.jl package's SparseSign compression method. The purpose is to provide hands-on examples for new users to quickly understand the package usage.
- Adds a complete tutorials framework with introduction and getting started guides
- Creates a comprehensive least squares solving example using SparseSign compression
- Adds development documentation including style guides, contributing guidelines, and checklists
Reviewed Changes
Copilot reviewed 22 out of 22 changed files in this pull request and generated 6 comments.
Show a summary per file
File | Description |
---|---|
src/Compressors/sparse_sign.jl | Fixes typo in documentation comment |
readme.md | Comments out Aqua QA badge |
docs/src/tutorials/ | Adds new tutorial section with introduction and getting started guide |
docs/src/manual/introduction.md | Adds comprehensive manual introduction to randomized linear algebra |
docs/src/dev/ | Adds development documentation including style guide, design docs, and contributing checklists |
docs/make.jl | Updates documentation structure and deployment configuration |
.github/workflows/ | Adds new CI/CD workflows for automated version management and documentation |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think removing Dev Docs from this PR and splitting up the tutorials into increasingly more customized pieces would be a better approach.
# Introduction | ||
|
||
The purpose of these tutorials is to use examples help | ||
new users quickly get hands on the usage of `RLinearAlgebra.jl`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
new users quickly get hands on the usage of `RLinearAlgebra.jl`. | |
new users quickly get hands experience using `RLinearAlgebra.jl`. |
## How tutorials are structured | ||
|
||
Problem sets: | ||
- Least squre problem, solving $$\min_{x} \|Ax - b\|_2^2$$ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- Least squre problem, solving $$\min_{x} \|Ax - b\|_2^2$$ | |
- Least squares problem, solving $$\min_{x} \|Ax - b\|_2^2$$ |
deploydocs( | ||
repo = "github.com/numlinalg/RLinearAlgebra.jl" | ||
repo = "github.com/numlinalg/RLinearAlgebra.jl", | ||
devbranch = "master", # master's newest commit will become dev |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should be "main"
"Home" => "index.md", | ||
"Tutorials" => [ | ||
"Introduction" => "tutorials/introduction.md", | ||
"Least square" => "tutorials/least_square.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"Least square" => "tutorials/least_square.md" | |
"Least squares" => "tutorials/least_square.md" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Change filename to "least_squares.md"
|
||
$$\min_{x} \|Ax - b\|_2^2$$ | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Since we are looking at a consistent linear system in this example, I think we should not present the least squares formulation.
|
||
* **Matrix `A`**: A random $1000 \times 20$ matrix. | ||
* **Vector `b`**: Calculated as $b = A x_{\text{true}}$, with dimensions $1000 \times 1$. | ||
* **Goal**: Find a solution $x$ that is as close as possible to $x_{\text{true}}$. | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would remove this. The previous sentence explains things well.
|
||
```@example SparseSignExample | ||
# Import relevant libraries | ||
using RLinearAlgebra, Random, LinearAlgebra |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you do not need Random
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Be sure to respect the 92 character limit even in markdown files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe split up the tutorials into pieces
Description
Docs:
RLinearAlgebra.jl
to solve typical linear algebra problems.tutorials/introduction.md
tutorials/getting_started.md
.dev/checklists
contributing.md
,design.md
, andstyle_guide.md
.custom_html.css
to format the HTML block in the documents.Fix: Some spellings and CI's inconsistencies.
Motivation and Context
Refer to the JuMP.jl Tutorials section.
How has this been tested
First, download the
RLinearAlgebra.jl
to your local Julia environment.Then, open Julia in the folder of
RLinearAlgebra.jl
, and use the following codes to see the document:Types of changes
Checklists:
Code and Comments
If this PR includes modification to the code base, please select all that apply.
API Documentation
Manual Documentation
Testing
@code_lowered and
@code_typed)