Commit 3404be75 authored by Florent Chatelain's avatar Florent Chatelain
Browse files

up slides

parent ff39108a
......@@ -101,21 +101,10 @@
a = -model.coef_[0][0]/model.coef_[0][1]
b = -model.intercept_[0]/model.coef_[0][1]
print('boudary equation x_2={} x_1 + {}'.format(a,b))
```
%%%% Output: error
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
<ipython-input-6-23b595ae4fed> in <module>
1 # What are the parameter values of the linear boundary equation x_2=a x_1 + b?
----> 2 a = -model.scoef_[0][0]/model.coef_[0][1]
3 b = -model.intercept_[0]/model.coef_[0][1]
4 print('boudary equation x_2={} x_1 + {}'.format(a,b))
AttributeError: 'RidgeClassifier' object has no attribute 'scoef_'
%% Cell type:markdown id: tags:
### Exercise
Change the number of informative features from `n_informative=2̀` to `n_informative=1` in the `make_classification()` procedure, regenerate the data set and fit the classification rule. Interpret now the new decision boundary: are the two variables of equal importance in predicting the class of the data?
......@@ -124,10 +113,13 @@
``` python
#get the documentation for sklearn RidgeClassification object
linear_model.RidgeClassifier?
```
%%%% Output: display_data
%% Cell type:code id: tags:
``` python
```
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment