Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/ying531/MCMC-SymReg
Symbolic Regression using MCMC sampling
https://github.com/ying531/MCMC-SymReg
Last synced: 11 days ago
JSON representation
Symbolic Regression using MCMC sampling
- Host: GitHub
- URL: https://github.com/ying531/MCMC-SymReg
- Owner: ying531
- Created: 2019-05-30T03:11:41.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2022-01-22T08:19:16.000Z (almost 3 years ago)
- Last Synced: 2024-08-01T16:54:22.832Z (3 months ago)
- Language: Python
- Homepage:
- Size: 1.94 MB
- Stars: 24
- Watchers: 2
- Forks: 8
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# MCMC-SymReg
Bayesian symbolic regression using mcmc sampling.Paper here: https://arxiv.org/abs/1910.08892
## API and Usage
### Codes location
`codes/BSR.py`: API interface of BSR class
`codes/bsr_class.py`: definition of BSR class
`codes/simulations.py`: part of simulation settings in the paper
`codes/funcs.py`: basic sampling functions
### Usage Example
```python
K = 3 # number of trees
MM = 50 # number of iterations
# set hyperparameters alternatively
hyper_params = [{'treeNum': 3, 'itrNum':50, 'alpha1':0.4, 'alpha2':0.4, 'beta':-1}]
# initialize BSR object
my_bsr = BSR(K,MM)
# train (need to fill in parameters)
# train_X is dataframe with each row a datapoint
# train_y is series with default index
my_bsr.fit(train_X,train_y)
# fit new values
# new_X is dataframe of new data
fitted_y = my_bsr.predict(new_X)
# display fitted trees
my_bsr.model()
# complexity, including complexity of each tree & total
complexity = my_bsr.complexity()
```>>>>>>>
## Pdf files
`bsr_paper.pdf`: paper for Bayesian Symbolic Regression
`Symbolic_Regression_Tree_MCMC.pdf`: note for proposed algorithm