Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import numpy as np | |
def produce_transformation(tuples,tuples_t): | |
""" | |
Given points in some 2d space, and points in a transformed | |
2d space, produces function to tranform one space to other. | |
tuples : points in original space (list of x,y tuples) | |
tuples_t : corresponding points in transformed space (") | |
""" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
license: gpl-3.0 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
## Makes a monitor where the mean of last x oob improvements | |
## are used to determine early stopping. This can be ammended | |
## to any stopping criteria one sees as fit - consecutive x | |
## negatives, more negatives than positives in last x, etc. | |
def make_monitor(running_mean_len): | |
def monitor(i,self,args): | |
if np.mean(self.oob_improvement_[max(0,i-running_mean_len+1):i+1])<0: | |
return True | |
else: |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.