Skip to content

Commit

Permalink
Incorporate methods documentations remove extra functions
Browse files Browse the repository at this point in the history
  • Loading branch information
apeterson91 committed Jul 25, 2020
1 parent 91a82e0 commit 9591982
Show file tree
Hide file tree
Showing 21 changed files with 37 additions and 301 deletions.
2 changes: 1 addition & 1 deletion DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ Package: rstapDP
Type: Package
Title: Functional Dirichlet Process Spatial Temporal Aggregated Predicators in R
Version: 0.1.0
Date: 2020-07-16
Date: 2020-07-25
Authors@R: person("Adam", "Peterson", , "atpvyc@umich.edu", c("aut", "cre"))
Encoding: UTF-8
Description: rsstap is a package that implements spatial-temporal aggregated predictor functions using splines in R. This allows for the modeling of features impact on measured subjects that can be related either through space or time.
Expand Down
2 changes: 0 additions & 2 deletions NAMESPACE
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
# Generated by roxygen2: do not edit by hand

S3method(diagnostics,stapDP)
S3method(green_loss,stapDP)
S3method(plot,stapDP)
S3method(plot_pairs,stapDP)
S3method(plotpars,stapDP)
Expand All @@ -12,7 +11,6 @@ export("%>%")
export(diagnostics)
export(fdp_staplm)
export(fdp_staplm.fit)
export(green_loss)
export(plot_pairs)
export(plotpars)
export(ppc)
Expand Down
28 changes: 0 additions & 28 deletions R/RcppExports.R
Original file line number Diff line number Diff line change
Expand Up @@ -26,31 +26,3 @@ stappDP_fit <- function(y, Z, X, S, w, alpha_a, alpha_b, sigma_a, sigma_b, tau_a
.Call(`_rstapDP_stappDP_fit`, y, Z, X, S, w, alpha_a, alpha_b, sigma_a, sigma_b, tau_a, tau_b, K, num_penalties, iter_max, burn_in, thin, seed, num_posterior_samples, fix_alpha)
}

#' Computes Green and Lau loss function with unknown classification
#'
#' @param cluster_assignment iter_total x J cluster assignment matrix
#' @param pmat J x J pairwise probability of co-clustering matrix
#' @param tau penalty parameter
green_loss_unknown <- function(cluster_assignment, pmat, tau) {
.Call(`_rstapDP_green_loss_unknown`, cluster_assignment, pmat, tau)
}

#' Computes Green and Lau Loss function with known classification
#'
#' @param cluster_assignment iter_total x J cluster assignment matrix
#' @param pmat J x J pairwise probability of co-clustering matrix
#' @param true_cluster_assignment J x J true Adjacency Matrix
#' @param a mis-classification penalty parameter
#' @param b classification penalty parameter
green_loss_known <- function(cluster_assignment, pmat, true_cluster_assignment, a, b) {
.Call(`_rstapDP_green_loss_known`, cluster_assignment, pmat, true_cluster_assignment, a, b)
}

#' Computes Square loss with unknown classification
#'
#' @param cluster_assignment iter_total x J cluster assignment matrix
#' @param pmat J x J pairwise probability of co-clustering matrix
square_error <- function(cluster_assignment, pmat) {
.Call(`_rstapDP_square_error`, cluster_assignment, pmat)
}

36 changes: 0 additions & 36 deletions R/green_loss.R

This file was deleted.

Binary file modified docs/articles/Introduction_files/figure-html/pairs-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified docs/articles/Introduction_files/figure-html/ppcs-1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion docs/pkgdown.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,5 +3,5 @@ pkgdown: 1.5.1
pkgdown_sha: ~
articles:
Introduction: Introduction.html
last_built: 2020-07-25T22:34Z
last_built: 2020-07-25T23:14Z

6 changes: 4 additions & 2 deletions docs/reference/diagnostics.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

39 changes: 29 additions & 10 deletions docs/reference/index.html

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 2 additions & 2 deletions man/diagnostics.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

36 changes: 0 additions & 36 deletions man/green_loss.Rd

This file was deleted.

22 changes: 0 additions & 22 deletions man/green_loss_known.Rd

This file was deleted.

18 changes: 0 additions & 18 deletions man/green_loss_unknown.Rd

This file was deleted.

1 change: 0 additions & 1 deletion man/plot.stapDP.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plot_pairs.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/plotpars.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion man/ppc.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

16 changes: 0 additions & 16 deletions man/square_error.Rd

This file was deleted.

1 change: 0 additions & 1 deletion man/traceplots.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

43 changes: 0 additions & 43 deletions src/RcppExports.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,52 +35,9 @@ BEGIN_RCPP
return rcpp_result_gen;
END_RCPP
}
// green_loss_unknown
Eigen::ArrayXd green_loss_unknown(const Eigen::ArrayXXi& cluster_assignment, const Eigen::ArrayXXd& pmat, const double& tau);
RcppExport SEXP _rstapDP_green_loss_unknown(SEXP cluster_assignmentSEXP, SEXP pmatSEXP, SEXP tauSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Eigen::ArrayXXi& >::type cluster_assignment(cluster_assignmentSEXP);
Rcpp::traits::input_parameter< const Eigen::ArrayXXd& >::type pmat(pmatSEXP);
Rcpp::traits::input_parameter< const double& >::type tau(tauSEXP);
rcpp_result_gen = Rcpp::wrap(green_loss_unknown(cluster_assignment, pmat, tau));
return rcpp_result_gen;
END_RCPP
}
// green_loss_known
Eigen::ArrayXd green_loss_known(const Eigen::ArrayXXi& cluster_assignment, const Eigen::ArrayXXd& pmat, const Eigen::ArrayXXi& true_cluster_assignment, const double& a, const double& b);
RcppExport SEXP _rstapDP_green_loss_known(SEXP cluster_assignmentSEXP, SEXP pmatSEXP, SEXP true_cluster_assignmentSEXP, SEXP aSEXP, SEXP bSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Eigen::ArrayXXi& >::type cluster_assignment(cluster_assignmentSEXP);
Rcpp::traits::input_parameter< const Eigen::ArrayXXd& >::type pmat(pmatSEXP);
Rcpp::traits::input_parameter< const Eigen::ArrayXXi& >::type true_cluster_assignment(true_cluster_assignmentSEXP);
Rcpp::traits::input_parameter< const double& >::type a(aSEXP);
Rcpp::traits::input_parameter< const double& >::type b(bSEXP);
rcpp_result_gen = Rcpp::wrap(green_loss_known(cluster_assignment, pmat, true_cluster_assignment, a, b));
return rcpp_result_gen;
END_RCPP
}
// square_error
Eigen::ArrayXd square_error(const Eigen::ArrayXXi& cluster_assignment, const Eigen::ArrayXXd& pmat);
RcppExport SEXP _rstapDP_square_error(SEXP cluster_assignmentSEXP, SEXP pmatSEXP) {
BEGIN_RCPP
Rcpp::RObject rcpp_result_gen;
Rcpp::RNGScope rcpp_rngScope_gen;
Rcpp::traits::input_parameter< const Eigen::ArrayXXi& >::type cluster_assignment(cluster_assignmentSEXP);
Rcpp::traits::input_parameter< const Eigen::ArrayXXd& >::type pmat(pmatSEXP);
rcpp_result_gen = Rcpp::wrap(square_error(cluster_assignment, pmat));
return rcpp_result_gen;
END_RCPP
}

static const R_CallMethodDef CallEntries[] = {
{"_rstapDP_stappDP_fit", (DL_FUNC) &_rstapDP_stappDP_fit, 19},
{"_rstapDP_green_loss_unknown", (DL_FUNC) &_rstapDP_green_loss_unknown, 3},
{"_rstapDP_green_loss_known", (DL_FUNC) &_rstapDP_green_loss_known, 5},
{"_rstapDP_square_error", (DL_FUNC) &_rstapDP_square_error, 2},
{NULL, NULL, 0}
};

Expand Down
Loading

0 comments on commit 9591982

Please sign in to comment.