Skip to content
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

Sample 2 #106

Open
wants to merge 18 commits into
base: main
Choose a base branch
from
Open

Sample 2 #106

wants to merge 18 commits into from

Conversation

nickhaf
Copy link
Collaborator

@nickhaf nickhaf commented Jul 19, 2023

Simple draft for extracting Structurals from LatentPathmodels and sample randomly.
Also renamed structural_model - Argument, see b083ce7.
Closes #98

I ran into a question concerning the resulting type of the sampled StenoGraph-Vector:

using StenoGraphs

graph_1 = StenoGraphs.@StenoGraph begin
    # latent regressions
    fac1  fac2
end

struct NodeLabel_2 <: NodeModifier
    l
end
graph_2 = StenoGraphs.@StenoGraph begin
    # latent regressions
    fac1  fac2^NodeLabel_2("Home an der Spree")
end

# These two graphs have slightly different types:
typeof(graph_1)
typeof(graph_2)

# When putting them into a vector, the Vector gets the type `Vector{Vector}`:
[graph_1, graph_2]

I would think, something like Vector{AbstractEdge} would be more appropriate? However, i'm not quite sure how to achive that. I played around with convert() a bit, but wasn't successfull.

@nickhaf nickhaf marked this pull request as draft July 19, 2023 09:33
@github-actions
Copy link
Contributor

Docs can be previewed here: https://github.com/formal-methods-mpi/Taxonomy.jl/previews/PR106

@nickhaf nickhaf requested a review from aaronpeikert July 19, 2023 10:09
@nickhaf nickhaf marked this pull request as ready for review July 19, 2023 13:23
@aaronpeikert
Copy link
Contributor

Simple draft for extracting Structurals from LatentPathmodels and sample randomly. Also renamed structural_model - Argument, see b083ce7. Closes #98

I ran into a question concerning the resulting type of the sampled StenoGraph-Vector:

using StenoGraphs

graph_1 = StenoGraphs.@StenoGraph begin
    # latent regressions
    fac1  fac2
end

struct NodeLabel_2 <: NodeModifier
    l
end
graph_2 = StenoGraphs.@StenoGraph begin
    # latent regressions
    fac1  fac2^NodeLabel_2("Home an der Spree")
end

# These two graphs have slightly different types:
typeof(graph_1)
typeof(graph_2)

# When putting them into a vector, the Vector gets the type `Vector{Vector}`:
[graph_1, graph_2]

I would think, something like Vector{AbstractEdge} would be more appropriate? However, i'm not quite sure how to achive that. I played around with convert() a bit, but wasn't successfull.

Can you open this as an issue in StenoGraphs?

@nickhaf
Copy link
Collaborator Author

nickhaf commented Jul 25, 2023

Simple draft for extracting Structurals from LatentPathmodels and sample randomly. Also renamed structural_model - Argument, see b083ce7. Closes #98
I ran into a question concerning the resulting type of the sampled StenoGraph-Vector:

using StenoGraphs

graph_1 = StenoGraphs.@StenoGraph begin
    # latent regressions
    fac1  fac2
end

struct NodeLabel_2 <: NodeModifier
    l
end
graph_2 = StenoGraphs.@StenoGraph begin
    # latent regressions
    fac1  fac2^NodeLabel_2("Home an der Spree")
end

# These two graphs have slightly different types:
typeof(graph_1)
typeof(graph_2)

# When putting them into a vector, the Vector gets the type `Vector{Vector}`:
[graph_1, graph_2]

I would think, something like Vector{AbstractEdge} would be more appropriate? However, i'm not quite sure how to achive that. I played around with convert() a bit, but wasn't successfull.

Can you open this as an issue in StenoGraphs?

Done: aaronpeikert/StenoGraphs.jl#56

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.

Implement function to sample structural model from taxons
2 participants