First fit, then transform.
497489
def fit_transform(self,
                      X,
                      num_epochs=10,
                      updates_epoch=10,
                      stop_param_updates=dict(),
                      batch_size=1,
                      show_progressbar=False,
                      show_epoch=False):
        """"""
        self.fit(X,
                 num_epochs,
                 updates_epoch,
                 stop_param_updates,
                 batch_size,
                 show_progressbar,
                 show_epoch)

        return self.transform(X, batch_size=batch_size)
955939
function applyTransformers(options, state, file) {
    var transformationSucceededAtLeastOnce = false;
    if (options.transformations && state.ext == "js") {
        options.transformations.forEach(function (transformation) {
            transformationSucceededAtLeastOnce |= transformAndTest(transformation, options, state, file);
        });
    }
    return transformationSucceededAtLeastOnce;
}
882213
def fit(self, X, y=None):
        
        for columns, transformer in self.mapping:
            if transformer is not None:
                transformer.fit(self._get_columns(X, columns))
        return self
1327101
def fit(self, X, y):
        
        self.X = X
        self.y = y
1168088
def save_fits(self, data, name):
        
        data = data.reshape(1, 1, data.shape[0], data.shape[0])
        new_file = pyfits.PrimaryHDU(data,self.img_hdu_list[0].header)
        new_file.writeto("{}".format(name), overwrite=True)
143579
def _make_fits(self):
        """"""
        a = self.tests[self.active]
        args = self.curargs
        #We need to generate a fit for the data if there are any fits specified.
        if len(args["fits"]) > 0:
            for fit in list(args["fits"].keys()):
                a.fit(args["independent"], fit, args["fits"][fit], args["threshold"], args["functions"])
135053
def fit(self, X):
        
        D = self._initialize(X)
        for i in range(self.max_iter):
            gamma = self._transform(D, X)
            e = np.linalg.norm(X - gamma.dot(D))
            if e < self.tol:
                break
            D, gamma = self._update_dict(X, D, gamma)

        self.components_ = D
        return self
869194
def fit(self, X):
        
        self.categorical_encoder = self.encoder_class(cols=list(X))
        self.categorical_encoder.fit(X)
        return self
1239286
public void fit(INDArray[] inputs, INDArray[] labels) {
        fit(inputs, labels, null, null);
    }
1082867
def MakeFITS(model, fitsfile=None):
    '''
    

    '''

    # Get the fits file name
    if fitsfile is None:
        outfile = os.path.join(model.dir, model._mission.FITSFile(
            model.ID, model.season, model.cadence))
    else:
        outfile = os.path.join(model.dir, fitsfile)
    if os.path.exists(outfile) and not model.clobber:
        return
    elif os.path.exists(outfile):
        os.remove(outfile)

    log.info('Generating FITS file...')

    # Create the HDUs
    primary = PrimaryHDU(model)
    lightcurve = LightcurveHDU(model)
    pixels = PixelsHDU(model)
    aperture = ApertureHDU(model)
    images = ImagesHDU(model)
    hires = HiResHDU(model)

    # Combine to get the HDUList
    hdulist = pyfits.HDUList(
        [primary, lightcurve, pixels, aperture, images, hires])

    # Output to the FITS file
    hdulist.writeto(outfile)

    return
329375
def transform(self, offset, newseqid=None):
        """"""
        for feature in self:
            feature._range.transform(offset)
            if newseqid is not None:
                feature.seqid = newseqid
1054514
function layoutNext(lines, maxWidth, fakeText) {

  var originalLine = lines.shift(),
      fitLine = originalLine;

  var textBBox;

  for (;;) {
    textBBox = getTextBBox(fitLine, fakeText);

    textBBox.width = fitLine ? textBBox.width : 0;

    // try to fit
    if (fitLine === ' ' || fitLine === '' || textBBox.width < Math.round(maxWidth) || fitLine.length < 2) {
      return fit(lines, fitLine, originalLine, textBBox);
    }

    fitLine = shortenLine(fitLine, textBBox.width, maxWidth);
  }
}
1321509
def fit(self, inputs, outputs, epochs=1):
        
        self.model.fit(inputs, outputs, epochs=epochs)
28995
def fit(self, X, y, **fit_params):
        
        return default_client().sync(self._fit, X, y, **fit_params)
284336
def reshape_like(a, b):
  """"""
  ret = tf.reshape(a, tf.concat([tf.shape(b)[:-1], tf.shape(a)[-1:]], 0))
  if not tf.executing_eagerly():
    ret.set_shape(b.get_shape().as_list()[:-1] + a.get_shape().as_list()[-1:])
  return ret
500742
def fromfits(infilename, hdu = 0, verbose = True):
    
    
    pixelarray, hdr = pyfits.getdata(infilename, hdu, header=True)
    pixelarray = np.asarray(pixelarray).transpose()
    
    pixelarrayshape = pixelarray.shape
    if verbose :
        print "FITS import shape : (%i, %i)" % (pixelarrayshape[0], pixelarrayshape[1])
        print "FITS file BITPIX : %s" % (hdr["BITPIX"])
        print "Internal array type :", pixelarray.dtype.name
    
    return pixelarray, hdr
65417
def fit_transform(self, X, y=None):
        

        self.label_encoders = [None] * X.shape[1]
        self.label_maxes = [None] * X.shape[1]

        for i, col in enumerate(X.columns):
            self.label_encoders[i], self.label_maxes[i] = \
                self._get_label_encoder_and_max(X[col])

            X.loc[:, col] = X[col].fillna(NAN_INT).map(self.label_encoders[i]).fillna(0)

        return X