liveBook · Manning

Ablation study

As explained in Applied Reinforcement Learning

A method of evaluating a system by removing or disabling one component or input and comparing its effects.

An ablation study tests whether a system depends on one input by switching it off and checking the effect on performance. In a portfolio-agent environment, a news switch lets you isolate the contribution of the news signal. section 12.4

Listing 12.2 The state: four feature blocks with a news switch
def _market_features(self, day):
    lb = self.cfg.lookback
    price_win = self.prices[day - lb + 1: day + 1]  #A
    ...
    return feats.reshape(-1)
 
def _news_features(self, day):
    if not self.cfg.use_news or self.signal_matrix is None:
        return np.zeros(self.news_dim)  #B
    return self.signal_matrix[day] #C
 
def _get_state(self) -> np.ndarray:    #D
        blocks = []
        if self.cfg.include_market_features:
            blocks.append(self._market_features(self.day))
        blocks.append(self._news_features(self.day))    
        if self.cfg.include_portfolio_features:
            blocks.append(self._portfolio_features())
        if self.cfg.include_execution_features:
            blocks.append(self._execution_features())
        return np.concatenate(blocks).astype(np.float32) 

The state implementation shows how disabling news replaces its feature vector with zeros. section 12.4

How Applied Reinforcement Learning covers it

How deep it goes
Defines the test and shows a news-input switch, without reporting comparative results.
Examples
Disables the news signal, causing its state feature vector to become zeros.
What you can do after
Evaluate whether portfolio-agent performance depends on the news signal by switching that input off.
How it connects
Connects input ablation to reinforcement-learning states and environment configuration.

Also explained in

Compare how 5 books explain ablation study →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Applied Reinforcement Learning. The section links point to the parts of the book it draws on.