Closed markdouglasphd closed 1 year ago
This requires a change of design since this the domain size is not contained in the csv. This needs to be discussed. Few possible options: 1) allow the user to correct or indicate model domain size by hand; 2) a dummy point could be automatically added to samples to indicate the domain size (visible to the csv user); 3) a new field with some base64 encoded string may be added to the csv (visible to the csv user); 4) serialize samples as json and add functionality to auto extract and create/load a csv file from the json; 5) use two files within a zip (probably a bad idea)
Hi Cedric,
I like your first answer best. The user enters the dimensions in 'Analysis & Creation' before the model is exported. The user only needs to do this once. All 3 test reports use this size that's in the model. Even if the user puts in a smaller measurement area for the Test Set, the report is based on the size from the model.
Here's how it would look:
Hi @cbujard. I think that there should be some error checking here. So it should check if x and y are too small (points are outside) or too big (> 10% larger than xmax and ymax?).
Hi @markdouglasphd , @SCA-ZMT Ok so there are two different layers of checks here:
1) a model always contains a sample: the model.contains(testsample) checks the validity of testsample with respect to the sample that underlines the model. This check is absolutely necessary, for scientific reasons and should not be influenced by the frontend. Note: A model is only defined in the range [-xmax, xmax] for xmax = ceil( max(abs(df[x])) x 1.05) and similarly for y.
2) a model contains a metadata field which is independent from the underlying sample. The backend is not concerned with this data at all, it only saves/reads it to/from serialization and leaves its definition to the caller (who will typically use a dict of his choice). This is where user entered data should be stored. This check is only cosmetic: is only about interfacing with the user.
Point 1) is already implemented and should always be fully performed. Simone can add a function that performs 2).
Hi @odeimaiz and @SCA-ZMT,
I spoke with Cedric. Let's do the following:
@markdouglasphd @SCA-ZMT @odeimaiz So just to summarize and correct point 2 above (the above example has incorrect values since inputted xsize and xmax have different magnitudes): a model always contains a sample with auto generated metadata = {'xmax': xmax, 'ymax': ymax}, and the model should contain corresponding metadata parameters (let's say for ex: xsize, ysize) such that:
2 max(abs(x)) <= xsize <= 2 xmax and similarly for y.
Note: this gives a very small margin for the user to pick xsize and ysize
I'm planning to add smthg today that should really help handle this. A sample will contain two metadata for x and y each: xmax will be changed to be the max absolute value present in the sample, xsup will become what currently is xmax. Many checks will automatically be performed internally. In the end all you have to do in the front end is check that the xsize value given by the user satisfies:
2 xmax <= xsize <= 2 xsup 2 ymax <= ysize <= 2 ysup
and to record this xsize, ysize value as metadata into the model. This will also help in the future when freq becomes adjustable.
v1.0.12
after "Export Model", the report that's generated has a measurement area (106 x 210) that does not match the area that was given by the training set (100 x 200). These should match.