kausalflow / hamilflow

Dataset of simple physical systems.
http://kausalflow.com/hamilflow/
MIT License
2 stars 1 forks source link

Package Design Discussions #15

Open emptymalei opened 4 months ago

emptymalei commented 4 months ago

I am thinking about the high level design of this package and came up with this:

flowchart LR

subgraph "Models"

subgraph "Physics"

subgraph "Analytical"

harmonic_oscillator["Harmonic Oscillators"]

models_physics_more["..."]

end

subgraph "Numerical"

three_body["Three Body Problem"]

models_physics_numerical_more["..."]

end

end

subgraph "Statistics"

poison_process["Poison Process"]

models_statistics_more["..."]

end

end

subgraph "Combining Data (May not be important/urgent)"

adding["+ values in multiple datasets:\nmodel_1 + model_2"]

multiplying["* values in multiple datasets:\nmodel_1 * model_2"]

end

subgraph "Config"

config_for_model["Yaml config of model"]

pre_configged_models["Pre-configged models and \ngenerate dataset from config"]

end

I don't think we need to code everything by ourselves. We just need ~a few~ some representative examples.

Models

We create pandas dataframes (maybe series for 1d data?) as the output.

Physics (Analytical)

Physics models with analytical solutions are the easiest to build. We might just include some initial value problems and for that, we have three key components:

Physics (Numerical)

There might be models we want to build but they have no analytical solutions. We could simply apply scipy to solve some simple cases, for now.

Statistics

These are usually some iterative or repetitive processes. Sample or iterate to generate a series.

Combining Data

I ran into many situations that I need to combine different models to make the data useful. For example, I need to combine a harmonic oscillator and some Gaussian noise to test how my model reacts to noise.

Config

Starting from the first model #8 , we made it easy to create models using configs. This will be our core design principles.

In the end, we will create different sets of configs, be it yaml or json, to define datasets. Then we can easily rebuild and release datasets.

cmp0xff commented 3 months ago

I need a more explicit example for the diagram, e.g. for the yaml file. I cannot easily get the ideas as they are represented here.

emptymalei commented 3 months ago

I need a more explicit example for the diagram, e.g. for the yaml file. I cannot easily get the ideas as they are represented here.

See #46 #47