[scikit-learn] question regarding 'RANSACRegressor' object has no attribute 'inlier_mask_'

Shang-Rou Hsieh srhsieh at yahoo.com
Fri Jul 29 17:27:29 EDT 2022


To whom it may concern,
Belows are the codes:
-  - - - - 
from sklearn.linear_model import RANSACRegressor

ransac = RANSACRegressor(LinearRegression(), 
                         max_trials=100, # default
                         min_samples=0.95, 
                         loss='absolute_error', # default
                         residual_threshold=None, # default 
                         random_state=123)
inlier_mask = ransac.inlier_mask_



- - - - 
Here is the error message: 

AttributeError: 'RANSACRegressor' object has no attribute 'inlier_mask_'

SO I checked the attributes of RANSACRegressor using dir (RANSACRegressor) and I do not find 'inlier_mask_'
 

Any advise?Henry 


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.python.org/pipermail/scikit-learn/attachments/20220729/ef1e7352/attachment.html>


More information about the scikit-learn mailing list