Skip to content

Commit

Permalink
Minor updates in README
Browse files Browse the repository at this point in the history
  • Loading branch information
wenjie2wang committed Apr 12, 2022
1 parent 23bd865 commit cbdb19b
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
6 changes: 4 additions & 2 deletions README.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ The package **abclass** provides implementations of the multi-category
angle-based classifiers (Zhang & Liu, 2014) with the large-margin unified
machines (Liu, et al., 2011) for high-dimensional data.

Notice that the package is still experimental and under active development.

## Installation

One can install the released version from
Expand Down Expand Up @@ -59,7 +61,7 @@ y <- factor(paste0("label_", y))
train_y <- y[train_idx]
test_y <- y[- train_idx]
### Regularization through elastic-net penalty
### regularization through elastic-net penalty
## logistic deviance loss
model1 <- abclass(train_x, train_y, nlambda = 100,
nfolds = 3, loss = "logistic")
Expand Down Expand Up @@ -88,7 +90,7 @@ pred4 <- predict(model4, test_x)
table(test_y, pred4)
mean(test_y == pred4) # accuracy
### groupwise regularization via group lasso
### variable selection via group lasso
## logistic deviance loss
model1 <- abclass(train_x, train_y, nlambda = 100, nfolds = 3,
grouped = TRUE, loss = "logistic")
Expand Down
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,9 @@ The package **abclass** provides implementations of the multi-category
angle-based classifiers (Zhang & Liu, 2014) with the large-margin
unified machines (Liu, et al., 2011) for high-dimensional data.

Notice that the package is still experimental and under active
development.

## Installation

One can install the released version from
Expand Down Expand Up @@ -58,7 +61,7 @@ y <- factor(paste0("label_", y))
train_y <- y[train_idx]
test_y <- y[- train_idx]

### Regularization through elastic-net penalty
### regularization through elastic-net penalty
## logistic deviance loss
model1 <- abclass(train_x, train_y, nlambda = 100,
nfolds = 3, loss = "logistic")
Expand Down Expand Up @@ -147,7 +150,7 @@ mean(test_y == pred4) # accuracy
## [1] 0.901

``` r
### groupwise regularization via group lasso
### variable selection via group lasso
## logistic deviance loss
model1 <- abclass(train_x, train_y, nlambda = 100, nfolds = 3,
grouped = TRUE, loss = "logistic")
Expand Down

0 comments on commit cbdb19b

Please sign in to comment.