# Statistics and Machine Learning

## Introduction <a href="#documentation" id="documentation"></a>

Refer to <mark style="background-color:red;">Artificial Intelligence in Healthcare / Machine Learning Resources</mark> for general information about machine learning. This section provides instructions for getting started with some of the common statistics and machine learning Julia packages.

## Getting Started <a href="#getting_started" id="getting_started"></a>

* Start Julia REPL (Read/Evaluate/Print/Loop) by typing the following in Terminal or PowerShell:

```
$ julia
```

* Go into REPL mode for Pkg, Julia’s built in package manager, by pressing ‘]’:

```
julia> ]
(@v1.4) pkg>
```

* Update package repository in Pkg REPL

```
(@v1.4) pkg> update)
```

* Add packages in Pkg REPL

```
(@v1.4) pkg> add CSV
(@v1.4) pkg> add DataFrames
(@v1.4) pkg> add Distributions
(@v1.4) pkg> add HypothesisTests
```

* Get back to the Julia REPL and exit by pressing backspace or ^C

```julia
(@v1.4) pkg>
julia> using CSV
julia> using DataFrames
julia> using Distributions
julia> using HypothesisTests
julia> exit()
```

## Machine Learning Resources

<table><thead><tr><th width="171">Resource</th><th width="259">Relevant Pages</th><th>Time</th><th width="200">Access Requirements</th><th width="389">Notes</th></tr></thead><tbody><tr><td><a href="https://alan-turing-institute.github.io/MLJ.jl/dev/">MLJ Home</a></td><td><a href="https://alan-turing-institute.github.io/MLJ.jl/dev/about_mlj/">About</a></td><td>N/A</td><td>None</td><td>Language: Julia</td></tr><tr><td><a href="https://juliaai.github.io/DataScienceTutorials.jl/">Data Science Tutorials</a></td><td><a href="https://juliaai.github.io/DataScienceTutorials.jl/#getting_started_with_mlj">Getting Started with MLJ</a></td><td>N/A</td><td><p>None, Jupyter notebook for tutorials</p><p><br></p></td><td><p>Language: Julia</p><ul><li>10 steps/pages</li><li>Walk-through of process (choosing model; fit, predict, transform; tune; ensemble, etc.)</li></ul></td></tr><tr><td><a href="https://juliaai.github.io/DataScienceTutorials.jl/#introduction_to_statistical_learning_with_mlj">Introduction to Statistical Learning with MLJ</a></td><td>N/A</td><td>None, Jupyter notebook for tutorials</td><td><p>Language: Julia</p><ul><li>8 labs</li><li>e.g. <a href="https://juliaai.github.io/DataScienceTutorials.jl/isl/lab-3/">Lab 3 Linear Regression</a></li></ul></td><td></td></tr><tr><td><a href="https://juliaai.github.io/DataScienceTutorials.jl/#end_to_end_examples_with_mlj">End to end examples with MLJ</a></td><td>N/A</td><td>None, Jupyter notebook for tutorials</td><td><p>Language: Julia</p><ul><li>11 total, 9 simple</li><li>e.g. <a href="https://juliaai.github.io/DataScienceTutorials.jl/end-to-end/breastcancer/">Breast Cancer Wisconsin</a> </li></ul></td><td></td></tr><tr><td><a href="https://www.youtube.com/watch?v=qSWbCn170HU">JuliaCon 2020</a> (YouTube video)</td><td><a href="https://github.com/ablaom/MachineLearningInJulia2020">Follow-along Tutorials</a></td><td>~ 3.5 hrs</td><td>None</td><td><p>Language: Julia</p><p><br></p></td></tr></tbody></table>

## Resources <a href="#documentation" id="documentation"></a>

* <mark style="background-color:red;">Artificial Intelligence in Healthcare / Machine Learning Resources</mark>
* [Julia Cheat Sheet](https://juliadocs.github.io/Julia-Cheat-Sheet/)
* [Julia Stats](http://juliastats.github.io/)
* Packages
  * [CSV.jl](https://juliadata.github.io/CSV.jl/stable/)
  * [DataFrames.jl](https://dataframes.juliadata.org/stable/)
  * [Distributions.jl](https://juliastats.org/Distributions.jl/latest/)
  * [HypothesisTests.jl](http://juliastats.github.io/HypothesisTests.jl/dev/)
* [Statistics Module](https://docs.julialang.org/en/v1/stdlib/Statistics/index.html)
* [Random Number Generator](https://docs.julialang.org/en/v1/stdlib/Random/index.html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.bcbi.brown.edu/codiac-for-health/computing/statistics-and-machine-learning.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
