def make_dataset(X, y, sample_weight, random_state=None):
 rng = check_random_state(random_state)
 seed = rng.randint(1, np.iinfo(np.int32).max)
 if sp.issparse(X):
  dataset = CSRDataset(X.data, X.indptr, X.indices, y, sample_weight, seed=seed)
  intercept_decay = SPARSE_INTERCEPT_DECAY
 else:
  dataset = ArrayDataset(X, y, sample_weight, seed=seed)
  intercept_decay = 1.0
 return (dataset, intercept_decay)

def make_dataset ( X , y , sample_weight , random_state = None ) : rng = check_random_state ( random_state ) seed = rng . randint ( 1 , np . iinfo ( np . int32 ) . max ) if sp . issparse ( X ) : dataset = CSRDataset ( X . data , X . indptr , X . indices , y , sample_weight , seed = seed ) intercept_decay = SPARSE_INTERCEPT_DECAY else : dataset = ArrayDataset ( X , y , sample_weight , seed = seed ) intercept_decay = 1.0 return ( dataset , intercept_decay )
create dataset abstraction for sparse and dense inputs .