This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2015-01-01/deploymentParameters.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "kind": { | |
| "value": "Default" | |
| }, | |
| "location": { | |
| "value": "australiaeast" | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "$schema": "https://schema.management.azure.com/schemas/2019-04-01/deploymentTemplate.json#", | |
| "contentVersion": "1.0.0.0", | |
| "parameters": { | |
| "workspaceName": { | |
| "type": "string", | |
| "metadata": { | |
| "description": "Specifies the name of the Azure Machine Learning workspace." | |
| } | |
| }, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # -*- coding: utf-8 -*- | |
| """DS Agent - Walmart Stocks Data 2025 (Unfiltered).ipynb | |
| Automatically generated by Colab. | |
| Original file is located at | |
| https://colab.research.google.com/drive/1xQPflL75hlDCGRRntyEBdSt_DgegxlTi | |
| # Task | |
| Hey Data Science Agent, can you help with the data analysis on this dataset? It includes EDA, descriptive stats, and some data visualizations. If you can, could you also suggest some time-series modeling? |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import azureml.core | |
| # Display the core SDK version number | |
| print("Azure ML SDK Version: ", azureml.core.VERSION) | |
| # Define an environment | |
| from azureml.core.environment import Environment | |
| from azureml.core.conda_dependencies import CondaDependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| import numpy as np | |
| import matplotlib.pyplot as plt | |
| import azureml.core | |
| # Display the core SDK version number | |
| print("Azure ML SDK Version: ", azureml.core.VERSION) | |
| # Define an environment | |
| from azureml.core.environment import Environment | |
| from azureml.core.conda_dependencies import CondaDependencies |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| %%writefile score.py | |
| import json | |
| import numpy as np | |
| import os | |
| import pickle | |
| import joblib | |
| def init(): | |
| global model | |
| ################################################################################################## |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Import libraries | |
| import json | |
| import numpy as np | |
| from azureml.core.model import Model | |
| import joblib | |
| # Load model | |
| model_path = Model.get_model_path(model_name="sklearn_regression_model.pkl") | |
| model = joblib.load(model_path) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Get hold of the current run | |
| run = Run.get_context() | |
| # Experiment parameters | |
| args = { | |
| "n_estimators": 120 | |
| } | |
| reg_model = RandomForestRegressor(**args) | |
| reg_model.fit(data["train"]["X"], data["train"]["y"]) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Load data in Pandas | |
| df = dataset.to_pandas_dataframe() | |
| print(df.shape) | |
| df.head() | |
| # Preprocess data | |
| df = df.drop_duplicates() | |
| df = df.drop(["dateCrawled","dateCreated","lastSeen", "seller", "name", "postalCode"] , axis = 1) | |
| df["notRepairedDamage"] = df["notRepairedDamage"].fillna("nein") | |
| df["fuelType"] = df["fuelType"].fillna("benzin") |
NewerOlder