<commit_before># LinearBayes

A simple `python 2` implementation of the Bayesian approach to fitting a straight 
line to two-dimensional data with covariant errors on the two coordinates and some outliers 
(see e.g. [Hogg, Bovy & Lang (2010)](http://arxiv.org/abs/1008.4686) for discussion). Depends 
on `numpy`, `scipy`, `matplotlib` and [`emcee`](https://github.com/dfm/emcee).

To install using `pip`, download the zipped repo and run

`pip install LinearBayes-master.zip`

to install the module (and any dependicies which aren't already installed). The function that 
does all of the work is called `fit_data` and has an explanatory docstring.

Example snippet, which runs a test on some mock data and produces two plots (shown below):

```python
import linear_bayes as lb

lb.mock_test(nproc=8) #run the test case and parallelise over 8 threads

```

![Alt text](mock_fit.png?raw=true)
![Alt text](mock_triangle.png?raw=true)<commit_msg>changed install instructions<commit_after># LinearBayes

A simple `python 2` implementation of the Bayesian approach to fitting a straight 
line to two-dimensional data with covariant errors on the two coordinates and some outliers 
(see e.g. [Hogg, Bovy & Lang (2010)](http://arxiv.org/abs/1008.4686) for discussion). Depends 
on `numpy`, `scipy`, `matplotlib` and [`emcee`](https://github.com/dfm/emcee).

To install using `pip`, run

`pip install https://github.com/anguswilliams91/LinearBayes/archive/master.zip`

to install the module (and any dependicies which aren't already installed). The function that 
does all of the work is called `fit_data` and has an explanatory docstring.

Example snippet, which runs a test on some mock data and produces two plots (shown below):

```python
import linear_bayes as lb

lb.mock_test(nproc=8) #run the test case and parallelise over 8 threads

```

![Alt text](mock_fit.png?raw=true)
![Alt text](mock_triangle.png?raw=true)
{'fraction_non_alphanumeric': 0.10088865656037638, 'fraction_numerical': 0.0167276529012023, 'mean_word_length': 5.056962025316456, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 3, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 1, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3646127', 'n_tokens_mistral': 638, 'n_tokens_neox': 574, 'n_words': 234}