Skip to content

Fix occasional error in debias#161

Open
ilariagabusi wants to merge 7 commits into
daducci:release/v2.4.3from
ilariagabusi:fix_debias
Open

Fix occasional error in debias#161
ilariagabusi wants to merge 7 commits into
daducci:release/v2.4.3from
ilariagabusi:fix_debias

Conversation

@ilariagabusi
Copy link
Copy Markdown
Collaborator

Fix error in saving results (RMSE and NRMSE maps) after debias, happening with some datasets when using BS or SZB models (Fixes #159).

@ilariagabusi ilariagabusi requested a review from daducci May 12, 2026 16:55
@ilariagabusi ilariagabusi changed the title Fix debias Fix occasional error in debias May 12, 2026
self.ICv = DICTIONARY['IC']['vox']
self.ICo = DICTIONARY['IC']['dir']
self.ICeval = DICTIONARY['IC']['eval']
self.ICm = DICTIONARY['IC']['mask']
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about DICTIONARY['IC']['debias_mask]?

unsigned int [::1] ICv
unsigned int [::1] ECv
unsigned int [::1] ISOv
unsigned int [::1] ICeval
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about IC_debias_mask?

Comment thread commit/core.pyx


def build_operator( self ) :
def build_operator( self, mask_ic=None ) :
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What about ic_debias_mask? In the future, we might also have ec_debias_mask etc

Comment thread commit/core.pyx
debias : boolean
If true, a debiasing step will be performed after the main fitting
procedure. Highly suggested when using a regularisation. (default : False)
debias_cond : float
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is de facto a threshold; what about debias_thr?

Comment thread commit/core.pyx
logger.info( 'Running debias' )
logger.subinfo('')
logger.info( f'Running debias' )
logger.subinfo( f'Creating mask for IC compartment with the condition: <={debias_cond:.2e}', indent_lvl=1, indent_char='*' )
Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Perhaps, to be clearer, we can write Keeping columns whose corresponding x.....?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants