Skip to content

Conversation

@duncan-clark
Copy link
Collaborator

Adding some statistics to allow for network regression i.e. gaussian continuous nodal covariates with the predictors given by other nodal covariates or the sum of nodal covariates of neighbors. Added some test stats also.

@duncan-clark duncan-clark requested a review from ifellows January 7, 2025 21:08
## Use the R_HOME indirection to support installations of multiple R version
PKG_LIBS = `$(R_HOME)/bin/Rscript -e "Rcpp:::LdFlags()"`
PKG_CPPFLAGS=-I../inst/include
PKG_CXXFLAGS += -Wno-sign-compare
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

removes annoying flags when building

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

added some timing flags.

Copy link
Member

@ifellows ifellows left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great work. A couple of comments.

* Adds a statistic the absolute value of the difference between the values
* of a continuous nodal covariate
*/
template<class Engine>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Documentation for the terms should be added to the R level statistic documentation.

@duncan-clark
Copy link
Collaborator Author

In general, this is not finished. I've been experimenting with this and for example the first Y.Y parameter corresponds with (-1/sigma^2) so must always be negative.

I believe this is equivalent to the log partition function being finite issue. For gaussRegression to implement gaussian errorred regression will need to think about constrained optimization I think.

@ifellows
Copy link
Member

In general, this is not finished. I've been experimenting with this and for example the first Y.Y parameter corresponds with (-1/sigma^2) so must always be negative.

I believe this is equivalent to the log partition function being finite issue. For gaussRegression to implement gaussian errorred regression will need to think about constrained optimization I think.

Perhaps having a good approach to pseudo-likelihood based starting values would help solve this. Getting reasonable starting values would kick off the estimation procedure away from the undefined parameter space.

@duncan-clark
Copy link
Collaborator Author

In general, this is not finished. I've been experimenting with this and for example the first Y.Y parameter corresponds with (-1/sigma^2) so must always be negative.
I believe this is equivalent to the log partition function being finite issue. For gaussRegression to implement gaussian errorred regression will need to think about constrained optimization I think.

Perhaps having a good approach to pseudo-likelihood based starting values would help solve this. Getting reasonable starting values would kick off the estimation procedure away from the undefined parameter space.

Better starting values do help. I need to think about this more also. I have it working, but there is some "interesting" behaviour currently.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants