@@ -61,7 +61,7 @@ Getting Started
61
61
... [- 2.79 , - 0.02 , - 0.85 ],
62
62
... [- 1.34 , - 0.48 , - 2.55 ],
63
63
... [ 1.92 , 1.48 , 0.65 ]]
64
- >>> y = [0 , 1 , 0 , 1 ]
64
+ >>> y = [[ 0 , 0 ], [ 1 , 1 ], [ 0 , 0 ], [ 1 , 0 ]] # Multioutput feature selection
65
65
>>> selector = FastCan(n_features_to_select = 2 , verbose = 0 ).fit(X, y)
66
66
>>> selector.get_support()
67
67
array([ True, True, False])
@@ -70,14 +70,14 @@ array([0, 1])
70
70
>>> selector.indices_ # Indices in selection order
71
71
array([1, 0], dtype=int32)
72
72
>>> selector.scores_ # Scores for selected features in selection order
73
- array([0.64276838 , 0.09498243 ])
73
+ array([0.91162413 , 0.71089547 ])
74
74
>>> # Here Feature 2 must be included
75
75
>>> selector = FastCan(n_features_to_select = 2 , indices_include = [2 ], verbose = 0 ).fit(X, y)
76
76
>>> # We can find the feature which is useful when working with Feature 2
77
77
>>> selector.indices_
78
- array([2, 1 ], dtype=int32)
78
+ array([2, 0 ], dtype=int32)
79
79
>>> selector.scores_
80
- array([0.16632562 , 0.50544788 ])
80
+ array([0.34617598 , 0.95815008 ])
81
81
82
82
83
83
Citation
0 commit comments