Skip to content

Commit

Permalink
update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
schalkdaniel committed Jul 27, 2018
1 parent 028a6b2 commit 8847b7e
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 7 deletions.
37 changes: 32 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,18 +4,17 @@

## C++ Spline Implementation of Compboost

## About

This repository is just for testing the spline implementation of compboost by providing the spline functions directly without any bloated code around it.

## Installation

Just install it using devtools:
#### Developer version:

```r
devtools::install_github("schalkdaniel/compboostSplines")
```

## How to Use
## Examples

This package can build spline bases for you. Ether as dense or sparse matrix. With that matrix it is possible to do e.g. spline regression or other cool stuff:
```r
Expand Down Expand Up @@ -107,4 +106,32 @@ ggplot() + geom_point(data = plot.df, mapping = aes(x = x, y = y)) +
theme_tufte() +
scale_color_brewer(palette = "Set1")
```
![Spline Viz](other/spline.png?raw=true)
![Spline Viz](other/spline.png?raw=true)

## License

© 2018 [Daniel Schalk](https://danielschalk.com)

The contents of this repository are distributed under the MIT license. See below for details:

> The MIT License (MIT)
>
> Copyright (c) 2018 Daniel Schalk
>
> Permission is hereby granted, free of charge, to any person obtaining a copy
> of this software and associated documentation files (the "Software"), to deal
> in the Software without restriction, including without limitation the rights
> to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
> copies of the Software, and to permit persons to whom the Software is
> furnished to do so, subject to the following conditions:
>
> The above copyright notice and this permission notice shall be included in all
> copies or substantial portions of the Software.
>
> THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
> IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
> FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
> AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
> LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
> OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
> SOFTWARE.
4 changes: 2 additions & 2 deletions other/test.R
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,8 @@ Rcpp::cppFunction(code = dense.crossprod, depends = "RcppArmadillo")
Rcpp::cppFunction(code = sparse.crossprod, depends = "RcppArmadillo")

(bm = microbenchmark::microbenchmark(
"dense crossprod" = createBasis(values = x, degree = 3, knots = knots),
"sparse crossprod" = createSparseBasis(values = x, degree = 3, knots = knots),
"dense crossprod" = denseCrossprod(X),
"sparse crossprod" = sparseCrossprod(X.sparse),
times = 10L
))

Expand Down

0 comments on commit 8847b7e

Please sign in to comment.