# How to select best parameter setting? (bin width)

**URL:** <https://discourse.slicer.org/t/how-to-select-best-parameter-setting-bin-width/21877>\
**Category:** Radiomics\
**Tags:** pyradiomics\
**Created:** [February 9, 2022, 8:01pm UTC](https://discourse.slicer.org/t/how-to-select-best-parameter-setting-bin-width/21877 "2022-02-09T20:01:51Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 9, 2022, 8:01pm UTC](https://discourse.slicer.org/t/how-to-select-best-parameter-setting-bin-width/21877/1 "2022-02-09T20:01:51Z")

</div>

I am new to pyradiomics. I want to extract feature from a ct scan of lungs. I want to know what the best parameter settings are to extract my feature. Every time I use a different binwidth I get different results. I just wanted to know how to verify which is the best option or setting. Any help on this is appreciated.

---

<div class="post-metadata">

**Author:** ![akshay\_pillai](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/akshay_pillai/32/8301_2.png) [@akshay\_pillai](https://discourse.slicer.org/u/akshay_pillai)\
**Post date:** [February 9, 2022, 9:46pm UTC](https://discourse.slicer.org/t/how-to-select-best-parameter-setting-bin-width/21877/2 "2022-02-09T21:46:19Z")

</div>

I found these statements in the example files of pyradiomics: " Image discretization:  
The ideal number of bins is somewhere in the order of 16-128 bins. A possible way to define a good binwidt is to extract firstorder:Range from the dataset to analyze, and choose a binwidth so, that range/binwidth remains approximately in this range of bins." and “This parameter should be estimated by analyzing the dataset firstorder range and chosen to be as close as possible to the 30-130 range”. but everytime I change the binwidth and look at the feature Range, it does not change it remains the same for all binwidths. Any information on this is appreciated. Thanks.

---

<div class="post-metadata">

**Author:** ![salma\_el](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.slicer.org/salma_el/32/69928_2.png) [@salma\_el](https://discourse.slicer.org/u/salma_el)\
**Post date:** [April 6, 2024, 2:44am UTC](https://discourse.slicer.org/t/how-to-select-best-parameter-setting-bin-width/21877/3 "2024-04-06T02:44:40Z")

</div>

Hi please i need you help , am working on lung cancer and also ct scan , did you use 3Dslicer in your segmentation
