haizad commited on
Commit
53b80a9
·
1 Parent(s): 8a32f4d

improve description formating

Browse files
Files changed (1) hide show
  1. app.py +7 -4
app.py CHANGED
@@ -40,16 +40,19 @@ def select_features(method,num_features):
40
  toc_bwd = time()
41
  selected_features = feature_names[sfs_backward.get_support()]
42
  execution_time = toc_bwd - tic_bwd
43
- return f"Selected the following features: {','.join(selected_features)} in {execution_time:.3f} seconds"
44
 
45
  title = "Selecting features with Sequential Feature Selection"
46
  with gr.Blocks(title=title) as demo:
47
  gr.Markdown(f"## {title}")
48
  gr.Markdown("""
49
  This app demonstrates feature selection techniques using model based selection and sequential feature selection.\n\n
50
- Model based selection is based on feature importance. Each feature is assigned a score on how much influence they have on the model output. The feature with highest score is considered the most important feature.\n\n
51
- Sequential feature selection is based on greedy approach. In greedy approach, the feature is added or removed to the selected features at each iteration based on the model performance score.\n\n
52
- This app uses Ridge estimator and the diabetes dataset from sklearn. Diabetes dataset consist of quantitative measure of diabetes progression and 10 following variables obtained from 442 diabetes patients:
 
 
 
53
  1. Age (age)
54
  2. Sex (sex)
55
  3. Body mass index (bmi)
 
40
  toc_bwd = time()
41
  selected_features = feature_names[sfs_backward.get_support()]
42
  execution_time = toc_bwd - tic_bwd
43
+ return f"Selected the following features: {', '.join(selected_features)} in {execution_time:.3f} seconds"
44
 
45
  title = "Selecting features with Sequential Feature Selection"
46
  with gr.Blocks(title=title) as demo:
47
  gr.Markdown(f"## {title}")
48
  gr.Markdown("""
49
  This app demonstrates feature selection techniques using model based selection and sequential feature selection.\n\n
50
+ Model based selection is based on feature importance. Each feature is assigned a score on how much influence they have on the model output.
51
+ The feature with highest score is considered the most important feature.\n\n
52
+ Sequential feature selection is based on greedy approach. In greedy approach, the feature is added or removed to the selected features at each iteration
53
+ based on the model performance score.\n\n
54
+ This app uses Ridge estimator and the diabetes dataset from sklearn. Diabetes dataset consist of quantitative measure of diabetes progression and
55
+ 10 following variables obtained from 442 diabetes patients:
56
  1. Age (age)
57
  2. Sex (sex)
58
  3. Body mass index (bmi)