Thank you @Olivier, your explanation is elaborate and complete. :)

On 9/22/2013 9:20 PM, Olivier Grisel wrote:
> Just run:
>
> $ nosetests --with-coverage
>
> And consider only the lines related to your module in the report.
>
> Offcourse you can always run a specific test and see how it covers
> your module as well:
>
> $ nosetests --with-coverage sklearn/ensemble/tests/test_gradient_boosting.py
>
> Under unix systems (like Mac or Linux) you can directly grep from the
> console report to filter it out:
>
> $ nosetests --with-coverage
> sklearn/ensemble/tests/test_gradient_boosting.py 2>&1 | grep
> sklearn.ensemble.gradient_boosting
> sklearn.ensemble.gradient_boosting                      404     13
> 97%   56, 85, 191, 218, 531, 536, 541-543, 546, 557, 671, 774-775
>
> Also useful: when you run the tests with the `--with-coverage` flag,
> an HTML report is generated in the `coverage` folder. You can open the
> HTML file for you module of interest to see the annotated code with a
> red background for the lines that miss coverage. In the previous case
> the file for the gradient boosted module is:
>
> coverage/sklearn_ensemble_gradient_boosting.html
>


------------------------------------------------------------------------------
LIMITED TIME SALE - Full Year of Microsoft Training For Just $49.99!
1,500+ hours of tutorials including VisualStudio 2012, Windows 8, SharePoint
2013, SQL 2012, MVC 4, more. BEST VALUE: New Multi-Library Power Pack includes
Mobile, Cloud, Java, and UX Design. Lowest price ever! Ends 9/20/13. 
http://pubads.g.doubleclick.net/gampad/clk?id=58041151&iu=/4140/ostg.clktrk
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to