Explorar el Código

Update of run simulation script and documentation

Jérôme BUISINE hace 5 años
padre
commit
8f8e54fd15

+ 3 - 2
README.md

@@ -17,12 +17,13 @@ Filters list:
 pip install -r requirements.txt
 ```
 
-Generate all needed data for each features (which requires the the whole dataset. In order to get it, you need to contact us).
+Generate all needed data for each features (which requires the whole dataset. In order to get it, you need to contact us).
 
 ```bash
 python generate/generate_all_data.py --feature all
 ```
 
+
 ## Project structure
 
 ### Link to your dataset
@@ -73,7 +74,7 @@ ln -s /path/to/your/data dataset
 
 - **data/\***: folder which will contain all generated *.train* & *.test* files in order to train model.
 - **saved_models/\***: all scikit learn or keras models saved.
-- **models_info/\***: all markdown files generated to get quick information about model performance and prediction.obtained after running runAll_maxwell.sh script.
+- **models_info/\***: all markdown files generated to get quick information about model performance and prediction obtained after running `run/runAll_*.sh` script.
 - **results/**:  This folder contains `model_comparisons.csv` file used for store models performance.
 
 

+ 6 - 2
generate/generate_all_data.py

@@ -162,9 +162,9 @@ def main():
 
     parser = argparse.ArgumentParser(description="Compute and prepare data of feature of all scenes (keep in memory min and max value found)")
 
+   
     parser.add_argument('--feature', type=str, 
-                                    help="feature choice in order to compute data (use 'all' if all features are needed)", 
-                                    choices=features_choices)
+                                    help="feature choice in order to compute data (use 'all' if all features are needed)")
 
     args = parser.parse_args()
 
@@ -177,6 +177,10 @@ def main():
             generate_data_svd(m, 'svdn')
             generate_data_svd(m, 'svdne')
     else:
+
+        if p_feature not in features_choices:
+            raise ValueError('Unknown feature choice : ', features_choices)
+            
         generate_data_svd(p_feature, 'svd')
         generate_data_svd(p_feature, 'svdn')
         generate_data_svd(p_feature, 'svdne')

+ 2 - 2
simulation/run_maxwell_simulation_filters_statistics.sh

@@ -24,8 +24,8 @@ for nb_zones in {4,6,8,10,12}; do
             # only compute if necessary (perhaps server will fall.. Just in case)
             if grep -q "${MODEL_NAME}" "${simulate_models}"; then
 
-                echo "${MODEL_NAME} results already generated..."
-            else
+                echo "Run simulation for ${MODEL_NAME}..."
+
                 # Use of already generated model
                 # python generate/generate_data_model_random.py --output ${FILENAME} --interval "0,${size}" --kind ${mode} --feature ${feature} --scenes "${scenes}" --nb_zones "${nb_zones}" --percent 1 --renderer "maxwell" --step 40 --random 1 --custom ${CUSTOM_MIN_MAX_FILENAME}
                 # python train_model.py --data ${FILENAME} --output ${MODEL_NAME} --choice ${model}