Page 1 of 1

Features selection function

Posted: Fri Jun 14, 2024 12:33 pm
by sjurado
Hello,
Could you provide some more informations on the features selection step ?
There are various functions available, how to choose the right one ?

For example, I have tried the function get_n_optimal_sc_ft as following:

Code: Select all

nscales = 10
    nfeats = 10
    eval_sc = 5
    best_ft = get_n_optimal_sc_ft(trads, testds, nscales, nfeats, eval_sc, threshold=0.85)
 
And I have the following result :

Code: Select all

{'Feats': array(['PLANA_PC1@1.15', 'PLANA_PC1@0.8', 'PLANA_PC1@0.5', 'ZRANGE_PC1@5',
       'PLANA_PC1@5', 'ZRANGE_PC1@2', 'PLANA_PC1@2'], dtype='<U14'), 'Scales': array([1.15, 0.8 , 0.5 , 5.  , 5.  , 2.  , 2.  ]), 
       'feat_imp': array([0.05502378, 0.01943835, 0.00219957, 0.38108057, 0.28447151,
       0.15420824, 0.10357798]), 'Indices': array([11,  9,  1, 19, 21, 16, 18]), 
       'Freq': array([1., 1., 1., 2., 2.]), 'OA': 0.8752, 'Fscore': 0.8783815358354078, 
       'Confidence': 0.2, 'Recall': 0.8751999999999999, 'Precision': 0.916803186088362, 
       'Class_UA': array([0.99948665, 0.62044951, 0.96906419, 0.99501558, 1.        ]), 
       'Class_PA': array([0.9735, 0.98  , 0.6265, 0.7985, 0.9975]), 
       'Class_Fscore': array([0.98632219, 0.75983718, 0.7610082 , 0.88599168, 0.99874844]), 
       'Class_confidence': array([0.2, 0.2, 0.2, 0.2, 0.2]), 'Class_recall': array([0.9735, 0.98  , 0.6265, 0.7985, 0.9975]), 
       'Class_precision': array([0.99948665, 0.62044951, 0.96906419, 0.99501558, 1.        ]), 
       'Labels': array([ 1.,  2.,  5., 10., 11.], dtype=float32)}
Can you help me read the valuable information about which features to keep ?

Thanks

Re: Features selection function

Posted: Tue Jun 18, 2024 10:35 am
by paul.leroy
There is some documentation here https://lidar-platform.readthedocs.io/e ... imal_sc_ft.

get_n_optimal_sc_ft will select at most n_features and n_scales among the available ones. I do not know how many features and scales you had in your datasets but the optimizer selected for you 7 features which are described in the output dictionary. The optimizer is useful when you want to select the best features and scales among a lot of possibilities.

You may want to try other optimizers to see whether you can get better results.