@@ -4,28 +4,36 @@ Scikit-garden or skgarden (pronounced as skarden) is a garden for scikit-learn c
4
4
5
5
## Installation
6
6
7
- ### Dependencies
8
-
9
- scikit-garden depends on NumPy, SciPy, scikit-learn and Cython. So make sure these dependencies are installed using pip
7
+ Scikit-Garden depends on NumPy, SciPy, Scikit-Learn and Cython. So make sure these dependencies are installed using pip:
10
8
11
9
```
12
- pip3 install numpy scipy scikit-learn cython
10
+ pip install setuptools numpy scipy scikit-learn cython
13
11
```
14
12
15
- After that scikit-garden can be installed like any other package .
13
+ After that Scikit-Garden can be installed using pip .
16
14
17
15
```
18
- git clone https://github.com/scikit-garden/scikit-garden
19
- cd scikit-garden
20
- python3 setup.py install
16
+ pip install scikit-garden
21
17
```
22
18
23
- and then you can do
19
+ ## Usage
20
+
21
+ The estimators in Scikit-Garden are Scikit-Learn compatible and can serve as a drop-in replacement for Scikit-Learn's trees and forests.
24
22
25
23
``` python
26
- >> > import skgarden
24
+ from sklearn.datasets import load_boston
25
+ X, y = make_boston()
26
+
27
+ # ## Use MondrianForests for variance estimation
28
+ from skgarden import MondrianForestRegressor
29
+ mfr = MondrianForestRegressor()
30
+ mfr.fit(X, y)
31
+ y_mean, y_std = mfr.predict(X, return_std = True )
32
+
33
+ # ## Use QuantileForests for quantile estimation
34
+ from skgarden import RandomForestQuantileRegressor
35
+ rfqr = RandomForestQuantileRegressor(random_state = 0 )
36
+ rfqr.fit(X, y)
37
+ y_mean = rfqr.predict(X)
38
+ y_median = rfqr.predict(X, 50 )
27
39
```
28
-
29
- from anywhere outside the root directory.
30
-
31
- ### Available models.
0 commit comments