mirror of
https://github.com/saymrwulf/prophet.git
synced 2026-11-19 09:00:59 +00:00
Rename master to main (#2090)
This commit is contained in:
parent
ba9a5a2c6e
commit
4af7a45480
10 changed files with 115 additions and 119 deletions
4
.github/workflows/build-and-test.yml
vendored
4
.github/workflows/build-and-test.yml
vendored
|
|
@ -2,9 +2,9 @@ name: Build
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
branches: [ master ]
|
branches: [ main ]
|
||||||
pull_request:
|
pull_request:
|
||||||
branches: [ master ]
|
branches: [ main ]
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CMDSTAN_VERSION: "2.26.1"
|
CMDSTAN_VERSION: "2.26.1"
|
||||||
|
|
|
||||||
|
|
@ -8,7 +8,7 @@ See [CONTRIBUTING.md](./CONTRIBUTING.md) for details on how to add or modify con
|
||||||
|
|
||||||
## Jupyter Notebooks
|
## Jupyter Notebooks
|
||||||
|
|
||||||
Most of the `doc` pages are generated from [Jupyter notebooks](http://jupyter.org/) in the [notebooks](https://github.com/facebook/prophet/tree/master/notebooks) directory at the base of the source tree. Please make changes there and then rebuild the docs:
|
Most of the `doc` pages are generated from [Jupyter notebooks](http://jupyter.org/) in the [notebooks](https://github.com/facebook/prophet/tree/main/notebooks) directory at the base of the source tree. Please make changes there and then rebuild the docs:
|
||||||
|
|
||||||
```
|
```
|
||||||
$ cd docs
|
$ cd docs
|
||||||
|
|
@ -23,7 +23,7 @@ The requirements for running a GitHub pages site locally is described in [GitHub
|
||||||
|
|
||||||
> If you have run the site before, you can start with step 1 and then move on to step 5.
|
> If you have run the site before, you can start with step 1 and then move on to step 5.
|
||||||
|
|
||||||
1. Ensure that you are in the same directory where this `README.md` exists (e.g., it could be in `/docs` on `master`, in the root of a `gh-pages` branch, etc). The below RubyGems commands, etc must be run from there.
|
1. Ensure that you are in the same directory where this `README.md` exists (e.g., it could be in `/docs` on `main`, in the root of a `gh-pages` branch, etc). The below RubyGems commands, etc must be run from there.
|
||||||
|
|
||||||
1. Make sure you have Ruby and [RubyGems](https://rubygems.org/) installed.
|
1. Make sure you have Ruby and [RubyGems](https://rubygems.org/) installed.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -122,7 +122,7 @@ This will build and install the local version of the prophet package. Then from
|
||||||
|
|
||||||
## 4. Creating a branch
|
## 4. Creating a branch
|
||||||
|
|
||||||
You want your master branch to reflect only production-ready code, so create a
|
You want your main branch to reflect only production-ready code, so create a
|
||||||
feature branch for making your changes. For example:
|
feature branch for making your changes. For example:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
|
|
@ -134,14 +134,14 @@ changes in this branch specific to one bug or feature so it is clear
|
||||||
what the branch brings to *prophet*. You can have many "new-features"
|
what the branch brings to *prophet*. You can have many "new-features"
|
||||||
and switch in between them using the ``git checkout`` command.
|
and switch in between them using the ``git checkout`` command.
|
||||||
|
|
||||||
To update this branch, you need to retrieve the changes from the master branch:
|
To update this branch, you need to retrieve the changes from the main branch:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git fetch upstream
|
$ git fetch upstream
|
||||||
$ git rebase upstream/master
|
$ git rebase upstream/main
|
||||||
```
|
```
|
||||||
|
|
||||||
This will replay your commits on top of the latest *prophet* git master. If this
|
This will replay your commits on top of the latest *prophet* git `main`. If this
|
||||||
leads to merge conflicts, you must resolve these before submitting your pull
|
leads to merge conflicts, you must resolve these before submitting your pull
|
||||||
request. If you have uncommitted changes, you will need to ``git stash`` them
|
request. If you have uncommitted changes, you will need to ``git stash`` them
|
||||||
prior to updating. This will effectively store your changes and they can be
|
prior to updating. This will effectively store your changes and they can be
|
||||||
|
|
@ -185,7 +185,7 @@ or for just running a single test script like ``test_diagnostics.R`` from the R
|
||||||
|
|
||||||
## 6. Generating documentation
|
## 6. Generating documentation
|
||||||
|
|
||||||
Most of the `doc` pages are generated from [Jupyter notebooks](http://jupyter.org/) in the [notebooks](https://github.com/facebook/prophet/tree/master/notebooks) directory at the base of the source tree. Please make changes there and then rebuild the docs:
|
Most of the `doc` pages are generated from [Jupyter notebooks](http://jupyter.org/) in the [notebooks](https://github.com/facebook/prophet/tree/main/notebooks) directory at the base of the source tree. Please make changes there and then rebuild the docs:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ cd docs
|
$ cd docs
|
||||||
|
|
@ -263,12 +263,12 @@ When you’re ready to ask for a code review, file a pull request. Before you do
|
||||||
1. Navigate to your repository on GitHub – https://github.com/your-user-name/prophet
|
1. Navigate to your repository on GitHub – https://github.com/your-user-name/prophet
|
||||||
2. Click on Branches
|
2. Click on Branches
|
||||||
3. Click on the Compare button for your feature branch
|
3. Click on the Compare button for your feature branch
|
||||||
4. Select the base and compare branches, if necessary. This will be master and new-feature, respectively.
|
4. Select the base and compare branches, if necessary. This will be `main` and new-feature, respectively.
|
||||||
|
|
||||||
|
|
||||||
## 10. Making a pull request
|
## 10. Making a pull request
|
||||||
|
|
||||||
If everything looks good, you are ready to make a pull request. A pull request is how code from a local repository becomes available to the GitHub community and can be reviewed and eventually merged into the master version. This pull request and its associated changes will eventually be committed to the master branch and available in the next release. To submit a pull request:
|
If everything looks good, you are ready to make a pull request. A pull request is how code from a local repository becomes available to the GitHub community and can be reviewed and eventually merged into the `main` version. This pull request and its associated changes will eventually be committed to the `main` branch and available in the next release. To submit a pull request:
|
||||||
|
|
||||||
1. Navigate to your repository on GitHub
|
1. Navigate to your repository on GitHub
|
||||||
2. Click on the Pull Request button
|
2. Click on the Pull Request button
|
||||||
|
|
@ -287,7 +287,7 @@ This will automatically update your pull request with the latest code and restar
|
||||||
|
|
||||||
## 11. Delete your merged branch
|
## 11. Delete your merged branch
|
||||||
|
|
||||||
Once your feature branch is merged into ``upstream master``, you can delete your remote branch via the ``Delete branch`` option in the PR and the local copy by running:
|
Once your feature branch is merged into ``upstream main``, you can delete your remote branch via the ``Delete branch`` option in the PR and the local copy by running:
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ git branch -d new-feature
|
$ git branch -d new-feature
|
||||||
|
|
|
||||||
|
|
@ -19,7 +19,7 @@ subsections:
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
Prophet can make forecasts for time series with sub-daily observations by passing in a dataframe with timestamps in the `ds` column. The format of the timestamps should be YYYY-MM-DD HH:MM:SS - see the example csv [here](https://github.com/facebook/prophet/blob/master/examples/example_yosemite_temps.csv). When sub-daily data are used, daily seasonality will automatically be fit. Here we fit Prophet to data with 5-minute resolution (daily temperatures at Yosemite):
|
Prophet can make forecasts for time series with sub-daily observations by passing in a dataframe with timestamps in the `ds` column. The format of the timestamps should be YYYY-MM-DD HH:MM:SS - see the example csv [here](https://github.com/facebook/prophet/blob/main/examples/example_yosemite_temps.csv). When sub-daily data are used, daily seasonality will automatically be fit. Here we fit Prophet to data with 5-minute resolution (daily temperatures at Yosemite):
|
||||||
|
|
||||||
|
|
||||||
```R
|
```R
|
||||||
|
|
@ -200,4 +200,3 @@ In monthly data, yearly seasonality can also be modeled with binary extra regres
|
||||||
|
|
||||||
|
|
||||||
Holiday effects are applied to the particular date on which the holiday was specified. With data that has been aggregated to weekly or monthly frequency, holidays that don't fall on the particular date used in the data will be ignored: for example, a Monday holiday in a weekly time series where each data point is on a Sunday. To include holiday effects in the model, the holiday will need to be moved to the date in the history dataframe for which the effect is desired. Note that with weekly or monthly aggregated data, many holiday effects will be well-captured by the yearly seasonality, so added holidays may only be necessary for holidays that occur in different weeks throughout the time series.
|
Holiday effects are applied to the particular date on which the holiday was specified. With data that has been aggregated to weekly or monthly frequency, holidays that don't fall on the particular date used in the data will be ignored: for example, a Monday holiday in a weekly time series where each data point is on a Sunday. To include holiday effects in the model, the holiday will need to be moved to the date in the history dataframe for which the effect is desired. Note that with weekly or monthly aggregated data, many holiday effects will be well-captured by the yearly seasonality, so added holidays may only be necessary for holidays that occur in different weeks throughout the time series.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -22,7 +22,7 @@ The input to Prophet is always a dataframe with two columns: `ds` and `y`. The
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
As an example, let's look at a time series of the log daily page views for the Wikipedia page for [Peyton Manning](https://en.wikipedia.org/wiki/Peyton_Manning). We scraped this data using the [Wikipediatrend](https://cran.r-project.org/package=wikipediatrend) package in R. Peyton Manning provides a nice example because it illustrates some of Prophet's features, like multiple seasonality, changing growth rates, and the ability to model special days (such as Manning's playoff and superbowl appearances). The CSV is available [here](https://github.com/facebook/prophet/blob/master/examples/example_wp_log_peyton_manning.csv).
|
As an example, let's look at a time series of the log daily page views for the Wikipedia page for [Peyton Manning](https://en.wikipedia.org/wiki/Peyton_Manning). We scraped this data using the [Wikipediatrend](https://cran.r-project.org/package=wikipediatrend) package in R. Peyton Manning provides a nice example because it illustrates some of Prophet's features, like multiple seasonality, changing growth rates, and the ability to model special days (such as Manning's playoff and superbowl appearances). The CSV is available [here](https://github.com/facebook/prophet/blob/main/examples/example_wp_log_peyton_manning.csv).
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -296,8 +296,7 @@ library(prophet)
|
||||||
R[write to console]: Loading required package: rlang
|
R[write to console]: Loading required package: rlang
|
||||||
|
|
||||||
|
|
||||||
|
First we read in the data and create the outcome variable. As in the Python API, this is a dataframe with columns `ds` and `y`, containing the date and numeric value respectively. The ds column should be YYYY-MM-DD for a date, or YYYY-MM-DD HH:MM:SS for a timestamp. As above, we use here the log number of views to Peyton Manning's Wikipedia page, available [here](https://github.com/facebook/prophet/blob/main/examples/example_wp_log_peyton_manning.csv).
|
||||||
First we read in the data and create the outcome variable. As in the Python API, this is a dataframe with columns `ds` and `y`, containing the date and numeric value respectively. The ds column should be YYYY-MM-DD for a date, or YYYY-MM-DD HH:MM:SS for a timestamp. As above, we use here the log number of views to Peyton Manning's Wikipedia page, available [here](https://github.com/facebook/prophet/blob/master/examples/example_wp_log_peyton_manning.csv).
|
|
||||||
|
|
||||||
|
|
||||||
```R
|
```R
|
||||||
|
|
@ -372,4 +371,3 @@ An interactive plot of the forecast using Dygraphs can be made with the command
|
||||||
|
|
||||||
|
|
||||||
More details about the options available for each method are available in the docstrings, for example, via `?prophet` or `?fit.prophet`. This documentation is also available in the [reference manual](https://cran.r-project.org/web/packages/prophet/prophet.pdf) on CRAN.
|
More details about the options available for each method are available in the docstrings, for example, via `?prophet` or `?fit.prophet`. This documentation is also available in the [reference manual](https://cran.r-project.org/web/packages/prophet/prophet.pdf) on CRAN.
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -289,7 +289,7 @@ The holidays for each country are provided by the `holidays` package in Python.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
In Python, most holidays are computed deterministically and so are available for any date range; a warning will be raised if dates fall outside the range supported by that country. In R, holiday dates are computed for 1995 through 2044 and stored in the package as `data-raw/generated_holidays.csv`. If a wider date range is needed, this script can be used to replace that file with a different date range: https://github.com/facebook/prophet/blob/master/python/scripts/generate_holidays_file.py.
|
In Python, most holidays are computed deterministically and so are available for any date range; a warning will be raised if dates fall outside the range supported by that country. In R, holiday dates are computed for 1995 through 2044 and stored in the package as `data-raw/generated_holidays.csv`. If a wider date range is needed, this script can be used to replace that file with a different date range: https://github.com/facebook/prophet/blob/main/python/scripts/generate_holidays_file.py.
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -671,4 +671,3 @@ Extra regressors are put in the linear component of the model, so the underlying
|
||||||
|
|
||||||
|
|
||||||
To extract the beta coefficients of the extra regressors, use the utility function `regressor_coefficients` (`from prophet.utilities import regressor_coefficients` in Python, `prophet::regressor_coefficients` in R) on the fitted model. The estimated beta coefficient for each regressor roughly represents the increase in prediction value for a unit increase in the regressor value (note that the coefficients returned are always on the scale of the original data). If `mcmc_samples` is specified, a credible interval for each coefficient is also returned, which can help identify whether each regressor is "statistically significant".
|
To extract the beta coefficients of the extra regressors, use the utility function `regressor_coefficients` (`from prophet.utilities import regressor_coefficients` in Python, `prophet::regressor_coefficients` in R) on the fitted model. The estimated beta coefficient for each regressor roughly represents the increase in prediction value for a unit increase in the regressor value (note that the coefficients returned are always on the scale of the original data). If `mcmc_samples` is specified, a credible interval for each coefficient is also returned, which can help identify whether each regressor is "statistically significant".
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -18,7 +18,7 @@
|
||||||
{% else %}
|
{% else %}
|
||||||
{{ content }}
|
{{ content }}
|
||||||
|
|
||||||
<p><a class="edit-page-link" href="https://github.com/{{ site.ghrepo }}/blob/master/docs/{{ page.path }}" target="_blank">Edit on GitHub</a></p>
|
<p><a class="edit-page-link" href="https://github.com/{{ site.ghrepo }}/blob/main/docs/{{ page.path }}" target="_blank">Edit on GitHub</a></p>
|
||||||
{% endif %}
|
{% endif %}
|
||||||
</article>
|
</article>
|
||||||
{% include doc_paging.html %}
|
{% include doc_paging.html %}
|
||||||
|
|
|
||||||
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in a new issue