Skip to content

[WIP] Feature/more tests#66

Open
kkondo1981 wants to merge 33 commits intodevelopfrom
feature/more-tests
Open

[WIP] Feature/more tests#66
kkondo1981 wants to merge 33 commits intodevelopfrom
feature/more-tests

Conversation

@kkondo1981
Copy link
Copy Markdown
Owner

See #65 .

@kkondo1981 kkondo1981 added the WIP Work In Progress label Jun 12, 2021
@kkondo1981
Copy link
Copy Markdown
Owner Author

  • Added vehicle insurance dataset with Gamma(link=log) AGLM
  • Fixed residuals() to handle general case. Note that old implementation other than deviance residuals seems easy to integrated into the new implementation, but remain it for a while because I need some regression test before changing it.

@kkondo1981
Copy link
Copy Markdown
Owner Author

  • Added a demo for French mortor TPL dataset with Poisson(link=log) AGLM.
  • Simplified residuals() as written in the previous comment, because I checked new implementation doesn't change results with Poisson case.

@kkondo1981
Copy link
Copy Markdown
Owner Author

  • Added a demo for MultinomialExample in glmnet with family="multinomial".
  • Modified plot.AccurateGLM() and coef.AccurateGLM() so that they can be used with multinomial regression. Note that residual.AccurateGLM() is not modified and couldn't handle with multinomial cases properly.
  • Added "demo/README.md" to show results of demos.

@kkondo1981
Copy link
Copy Markdown
Owner Author

  • Added a demo for the banknotes dataset with family="binomial".
  • Update all other demos and demo/README.md to compare AGLM with simple GLM (with cross-validation for alpha and lambda).
  • Modified aglm() and cv.aglm() to cope with binomial and multinomial regressions. Also modified residuals.AccurateGLM() to cope with binomial regressions (actually there was a bug and I fixed it) , but not finished for multinomial regressions.

… plot in multinomial cases.

- Added `use_legend` and `margin` for `plot.AccurateGLM()` for adjusting (mainly) improving plotting for multinomial cases.
- apply margins for barplot case too,
- use legends in multinomial cases for barplot,
- add the `color` parameter which works in all the cases of `lines`, `barplot`, `boxplot`.
…` for changing colors of graphic components.
@kkondo1981
Copy link
Copy Markdown
Owner Author

kkondo1981 commented Jul 11, 2021

Modified plot.AccurateGLM(), mainly to adjust visuals in the case of multinomial regression.
Now plot.AccurateGLM():

  • draws components curves (or bars) of multiple classes in one plot instead of multiple plots,
  • has the parameter to use legends to distinguish components curves (or bars) of multiple classes (use_legend),
  • and has the parameters to adjusting colors of graphic components (col, resid_col, smooth_col, rug_col).

Furthermore, I disallowed to use resid=TRUE in multinomial cases, because plotting those may result slightly too complicated graphs.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

WIP Work In Progress

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant