Skip to content
This repository was archived by the owner on Dec 6, 2023. It is now read-only.

Commit c11bb38

Browse files
committed
Merge branch 'master' of https://github.com/timocb/py-earth into v0.2dev
2 parents f674909 + 9c49b6d commit c11bb38

File tree

1 file changed

+22
-22
lines changed

1 file changed

+22
-22
lines changed

README.md

Lines changed: 22 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
py-earth [![Build Status](https://travis-ci.org/scikit-learn-contrib/py-earth.png?branch=master)](https://travis-ci.org/scikit-learn-contrib/py-earth?branch=master)
22
========
33

4-
A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines algorithm,
5-
in the style of scikit-learn. The py-earth package implements Multivariate Adaptive Regression Splines using Cython and provides an interface that is compatible with scikit-learn's Estimator, Predictor, Transformer, and Model interfaces. For more information about
4+
A Python implementation of Jerome Friedman's Multivariate Adaptive Regression Splines algorithm,
5+
in the style of scikit-learn. The py-earth package implements Multivariate Adaptive Regression Splines using Cython and provides an interface that is compatible with scikit-learn's Estimator, Predictor, Transformer, and Model interfaces. For more information about
66
Multivariate Adaptive Regression Splines, see the references below.
77

88
## Now With Missing Data Support!
@@ -22,9 +22,13 @@ If there are other features or improvements you'd like to see in py-earth, pleas
2222
7. Iterative reweighting during fitting
2323

2424
## Installation
25+
#### Install from [PyPI](https://pypi.org/):
26+
```
27+
pip install sklearn-contrib-py-earth
28+
```
2529

26-
Make sure you have numpy and scikit-learn installed. Then do the following:
27-
30+
#### Manual install
31+
Make sure you have numpy and scikit-learn installed. Then do the following:
2832
```
2933
git clone git://github.com/scikit-learn-contrib/py-earth.git
3034
cd py-earth
@@ -36,22 +40,22 @@ sudo python setup.py install
3640
import numpy
3741
from pyearth import Earth
3842
from matplotlib import pyplot
39-
43+
4044
#Create some fake data
4145
numpy.random.seed(0)
4246
m = 1000
4347
n = 10
4448
X = 80*numpy.random.uniform(size=(m,n)) - 40
4549
y = numpy.abs(X[:,6] - 4.0) + 1*numpy.random.normal(size=m)
46-
50+
4751
#Fit an Earth model
4852
model = Earth()
4953
model.fit(X,y)
50-
54+
5155
#Print the model
5256
print(model.trace())
5357
print(model.summary())
54-
58+
5559
#Plot the model
5660
y_hat = model.predict(X)
5761
pyplot.figure()
@@ -62,7 +66,7 @@ pyplot.ylabel('y')
6266
pyplot.title('Simple Earth Example')
6367
pyplot.show()
6468
```
65-
69+
6670
## Other Implementations
6771

6872
I am aware of the following implementations of Multivariate Adaptive Regression Splines:
@@ -75,32 +79,28 @@ I am aware of the following implementations of Multivariate Adaptive Regression
7579
6. MARS by Salford Systems (also uses Friedman's code): http://www.salford-systems.com/products/mars
7680
7. ARESLab (written in Matlab by Gints Jekabsons): http://www.cs.rtu.lv/jekabsons/regression.html
7781

78-
The R package earth was most useful to me in understanding the algorithm, particularly because of Stephen Milborrow's
82+
The R package earth was most useful to me in understanding the algorithm, particularly because of Stephen Milborrow's
7983
thorough and easy to read vignette (http://www.milbo.org/doc/earth-notes.pdf).
80-
84+
8185
## References
8286

83-
1. Friedman, J. (1991). Multivariate adaptive regression splines. The annals of statistics,
87+
1. Friedman, J. (1991). Multivariate adaptive regression splines. The annals of statistics,
8488
19(1), 1–67. http://www.jstor.org/stable/10.2307/2241837
8589
2. Stephen Milborrow. Derived from mda:mars by Trevor Hastie and Rob Tibshirani.
8690
(2012). earth: Multivariate Adaptive Regression Spline Models. R package
8791
version 3.2-3. http://CRAN.R-project.org/package=earth
88-
3. Friedman, J. (1993). Fast MARS. Stanford University Department of Statistics, Technical Report No 110.
92+
3. Friedman, J. (1993). Fast MARS. Stanford University Department of Statistics, Technical Report No 110.
8993
https://statistics.stanford.edu/sites/default/files/LCS%20110.pdf
9094
4. Friedman, J. (1991). Estimating functions of mixed ordinal and categorical variables using adaptive splines.
91-
Stanford University Department of Statistics, Technical Report No 108.
95+
Stanford University Department of Statistics, Technical Report No 108.
9296
http://media.salford-systems.com/library/MARS_V2_JHF_LCS-108.pdf
93-
5. Stewart, G.W. Matrix Algorithms, Volume 1: Basic Decompositions. (1998). Society for Industrial and Applied
97+
5. Stewart, G.W. Matrix Algorithms, Volume 1: Basic Decompositions. (1998). Society for Industrial and Applied
9498
Mathematics.
95-
6. Bjorck, A. Numerical Methods for Least Squares Problems. (1996). Society for Industrial and Applied
99+
6. Bjorck, A. Numerical Methods for Least Squares Problems. (1996). Society for Industrial and Applied
96100
Mathematics.
97101
7. Hastie, T., Tibshirani, R., & Friedman, J. The Elements of Statistical Learning (2nd Edition). (2009).
98102
Springer Series in Statistics
99103
8. Golub, G., & Van Loan, C. Matrix Computations (3rd Edition). (1996). Johns Hopkins University Press.
100-
101-
References 7, 2, 1, 3, and 4 contain discussions likely to be useful to users of py-earth. References 1, 2, 6, 5,
102-
8, 3, and 4 were useful during the implementation process.
103104

104-
105-
106-
105+
References 7, 2, 1, 3, and 4 contain discussions likely to be useful to users of py-earth. References 1, 2, 6, 5,
106+
8, 3, and 4 were useful during the implementation process.

0 commit comments

Comments
 (0)