def fit_model(ts, regressors, method="cochrane-orcutt", optimizationArgs=None, sc=None):
    """
    Parameters
    ----------
    ts:
        time series to which to fit an ARIMA model as a Numpy array
    regressors:
        regression matrix as a Numpy array
    method:
        Regression method. Currently, only "cochrane-orcutt" is supported.
    optimizationArgs:
        
    sc:
        The SparkContext, required.
    
    returns an RegressionARIMAModel
    """
    assert sc != None, "Missing SparkContext"
    
    jvm = sc._jvm
    
    jmodel = jvm.com.cloudera.sparkts.models.RegressionARIMA.fitModel(_nparray2breezevector(sc, ts), _nparray2breezematrix(sc, regressors), method, _py2scala_seq(sc, optimizationArgs))
    return RegressionARIMAModel(jmodel=jmodel, sc=sc)
Parameters
    ----------
    ts:
        time series to which to fit an ARIMA model as a Numpy array
    regressors:
        regression matrix as a Numpy array
    method:
        Regression method. Currently, only "cochrane-orcutt" is supported.
    optimizationArgs:
        
    sc:
        The SparkContext, required.
    
    returns an RegressionARIMAModel