Skip to content

Commit 39cd1b0

Browse files
authored
Merge pull request #54255 from midesa/patch-2
Updated with missing functions and permissions notes
2 parents 97bf0bd + 4b0f5a9 commit 39cd1b0

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

articles/synapse-analytics/spark/apache-spark-machine-learning-mllib-notebook.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ In the following steps, you develop a model to predict whether a particular trip
4949
import matplotlib.pyplot as plt
5050
from datetime import datetime
5151
from dateutil import parser
52-
from pyspark.sql.functions import unix_timestamp
52+
from pyspark.sql.functions import unix_timestamp, date_format, col, when
5353
from pyspark.ml import Pipeline
5454
from pyspark.ml import PipelineModel
5555
from pyspark.ml.feature import RFormula
@@ -234,6 +234,9 @@ train_data_df, test_data_df = encoded_final_df.randomSplit([trainingFraction, te
234234

235235
Now that there are two DataFrames, the next task is to create the model formula and run it against the training DataFrame, then validate against the testing DataFrame. You should experiment with different versions of the model formula to see the impact of different combinations.
236236

237+
> [!Note]
238+
> To save the model, you will need the Azure Storage Blob Data Contributor RBAC role. Under your storage account, navigate to Access Control (IAM), and select Add role assignment. Assign Storage Blob Data Contributor RBAC role to your SQL Database server. Only members with Owner privilege can perform this step. For various built-in roles for Azure resources, refer to this [guide](../../role-based-access-control/built-in-roles.md?toc=/azure/synapse-analytics/sql-data-warehouse/toc.json&bc=/azure/synapse-analytics/sql-data-warehouse/breadcrumb/toc.json).
239+
237240
```python
238241
## Create a new LR object for the model
239242
logReg = LogisticRegression(maxIter=10, regParam=0.3, labelCol = 'tipped')

0 commit comments

Comments
 (0)