-
Notifications
You must be signed in to change notification settings - Fork 6
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Refactor SEM Specification #203
Refactor SEM Specification #203
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## devel #203 +/- ##
==========================================
- Coverage 69.66% 69.64% -0.03%
==========================================
Files 52 51 -1
Lines 2423 2421 -2
==========================================
- Hits 1688 1686 -2
Misses 735 735 ☔ View full report in Codecov by Sentry. |
It looks like SymbolicsUtils 1.6 broke |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Finally done with the review^^ Very nice changes, the only things to do before merging are
- resolve my comments
- fix docs
- decide on
params
orparameters
I can have a look at what's preventing the docs from building. As we discussed in the issue, I would prefer parameters
over params
, and then have parameters()
and nparameters()
accordingly. @aaronpeikert maybe you can give a preference, and then we decide by majority^^ (Altough there are many occurences, finding and replacing all instances of param
with parameter
should do the trick.)
I prefer parameters. But its more like a 60/40 preference. |
@Maximilian-Stefan-Ernst Thank you for the review, I'll address your comments in a next few days. Regarding the
|
Docs are fixed. |
W.r.t. the Fun fact: I tried to see what Julia |
for clarity and aligning to Julia naming conventions
Co-authored-by: Maximilian-Stefan-Ernst <[email protected]>
* do tests inside * use param_values()/lavaan_param_values()
Co-authored-by: Maximilian-Stefan-Ernst <[email protected]>
so the downstream code doesn't rely on the order of tuple elements
for clarity
causes problems with sparsehessian(). It is a temporary fix until the compatibility issues are resolved in Symbolics.jl
Co-authored-by: Maximilian-Stefan-Ernst <[email protected]>
Co-authored-by: Maximilian-Stefan-Ernst <[email protected]>
don't allow missing n_obs
@Maximilian-Stefan-Ernst I've revised your
Eventually, SEM specification objects could cache param_indices map, and the removed method could be readded. OTOH I find using param_indices(sem) Dict directly is quite straightforward. |
@Maximilian-Stefan-Ernst Let me know if there's anything else to tweak for this PR. Otherwise I am ready to rebase #193 once this one gets merged and extract the next round of changes :) |
55f9087
into
StructuralEquationModels:devel
Sorry, just too much other stuff to do :) |
This is a part of #193 that mostly refactors the code for SEM specification types (
RAMMatrices
,ParameterTable
,StenoGraph
andEnsembleParameterTable
):SemSpecification
type, which is a parent to all the classes that specify SEMgraph
kw argument made positional.RAMMatrices(a::RAMMatrices) = a
) withconvert(RAMMatrices, a::RAMMatrices) = a
-- that's howBase.convert()
is designed to work in Julia.ParameterTable
: switched frompartable.variables[:observed_vars]
topartable.observed_vars
parameter_type
torelation
in theParameterTable
columns (part of Variables/Parameters/Observations terminology & API Cleanup #199)identifier
toparam
in theParameterTable
columns (part of Variables/Parameters/Observations terminology & API Cleanup #199)identifier()
,get_par_npar_identifier()
methods withparams()
call which returns a vector of SEM parameter IDs (part of Variables/Parameters/Observations terminology & API Cleanup #199)n_par()
intonparams()
(part of Variables/Parameters/Observations terminology & API Cleanup #199)params
field toParameterTable
to explicitly define the order of parameters -- simplifies the logic of SEM ensembles and checking/updating parametersparam_values
/lavaan_param_values()
-- moved the code for extracting the parameter values from the parameter tables from tests into the SEM API.Base.sort!(::ParameterTable)
tosort_vars!()
as it was not clear what this function sorts