You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Put your MCVE code hereimportdaskimportdask.bagasdbimportriver# Create a Dask bag from your datadf=pd.DataFrame([[0]*2],columns=['VendorID','fare_amount'])
data=db.from_sequence(df, npartitions=4)
# Define a function to process and train on each partitiondefprocess_and_train(partition):
X_train,X_test,y_train,y_test=get_dask_train_test(partition)
model=river.linear_model.LinearRegression(optimizer=river.optim.SGD(0.01), l2=0.1)
# Stream learning from the DataFramefor_,rowinpartition.iterrows():
y=row['fare_amount'] # Targetx=row.drop('fare_amount') # Featuresmodel=model.learn_one(x, y)
print("done")
returnmodel# Use Dask to process and train in parallelmodels=data.map(process_and_train).compute()
Anything else we need to know?:
Environment:
Dask version:
Python version:3.10
Operating System:
Install method (conda, pip, source):pip
The text was updated successfully, but these errors were encountered:
Describe the issue:
Minimal Complete Verifiable Example:
Anything else we need to know?:
Environment:
The text was updated successfully, but these errors were encountered: