다음을 통해 공유


Azure Machine Learning: Student Pass or Fail Prediction Experiment

Scenario

Student dataset collection in .csv file like name of student, illness in percentage on semester, attendance in percentage in semester, SSC result, HSC result, father education  12 means 12 pass 13 means graduation 14 means post graduation, mothers education, whether that student reside in hostel yes on no, study ours spending per day, student actively participating in sports activities yes or no, disability if any, schooling medium english or local language. below is screenshot of dataset

Procedure

Click on New -> Data Services -> Machine Learning -> Quick Create, than enter Workspace Name, Select Location, Create a new storage account, Give name of New storage account and Click Correct Sign.

Workspace will be created and shows online than Click below Open In Studio button after selection of your workspace Name ( if more than one workspace ).  Than separate (https://studio.azureml.net) Online Studio will be loaded in new browser tab.

Left side Menu Experiments, Web Services, Datasets, Trained Models, Settings.

Click on DATASETS (Left Menu). In Datasets two tabs are there MY DATASETS and SAMPLES, where MY DATASETS means your used or uploaded datasets listed below and SAMPLES means you can see Sample already available Datasets of studio.

If you want to upload your  ( .csv ) file than click below button NEW than Browse your .csv file, Enter a name for the Dataset than Click Right Button below. Your Dataset File (.CSV) will be uploaded. You can see uploaded dataset in MY DATASETS. 

Click on EXPERIMENTS in Left Main Menu, you will find MY EXPERIMENRS (Already created Experiments by User) and SAMPLES (Already readymade available Experiments to study). We want to create our own than select below NEW button. Select EXPERIMENT and Blank Experiment button ( +  Logo ).

You can click on Experiment created on mm/dd/yy and Rename your Experiment (Give your experiment Name). Write dataset name which you have uploaded recently in search bar left side, and that dataset will be loaded below in My Datasets, You simply Drag that Dataset from left side menu and Drop it in Experiment Space. 

Likewise you search Split, Train Model, Score Model and evaluate model and Drag and Drop all item in Experiment space one by one like shown in above snapshot.

Split – Split we use for Data Transformation, we will give 70% Data of CSV file to train the Model and remaining 30% Data to test the train model.

Train Model – Train Model having two inputs one input is of ML Algorithm and second input is for 70 % Data from Split.

Score Model – This model also have two inputs one from Train model and second input from 30% Data from Split to taste the Train Model.

Evaluate Model – This model evaluate the score results and calculate the ML parameters like True Positive, True Negative, False Positive, False Negative, ROC, Precision, Recall, Accuracy of Experiment, F1 Score, AUC etc. for classification algorithm.

Give connection of .CSV file to Split, Select Split and click Properties in Right side Menu where you can divide database for train model and score model (e.g. 80% - 20%, 75 % - 25 %, 70% - 30 %) ideally 70% for Train the model and remaining 30% for Score Model, So in Property enter 0.7 (means 70 % for Train Model 30 % data for Score Model) value in Fraction of Rows.

Now do connections like shown in snapshot, first output of split to train model and second output to score model, output of train model to first input of score model, output of score model to evaluate model. Type Classification in search bar left side it will load 14 Classification Algorithms, Drag Two-Class Decision Jungle Algorithm from Left side and Drop above Train Model. Give output of that Algorithm to First input of Train Model. Select Train Model Right Side click on Property, Select Launch Column SelectorWherein Select Include -> Column Names -> Result field and Click right mark button. Click on RUN button in below tiled menu

Click on RUN button in below tiled menu. You will find Green Right Mark on each Model that means you have no errors in each model. Right Click on output point of score model and press Visualize. Two extra field will be added after Result field, which is Scored Labels and Scored Probabilities. Scored Labels means Train Model has predicted the Result of that 30% Data which we have passed in Score Model. Right Click on output point of Evaluate Model and Press Visualization.

Once again Save the experiment and Run the Experiment than Create Scoring Experiment button will be activated than Click Create Scoring Experiment. Now your experiment converted into two Tabs Training Experiment and Scoring Experiment, In Scoring Experiment your Split, Two Class Decision Jungle Algorithm will be merged in Student Pass Fail Prediction Model, and score model have Web service input and Web service output and .CSV Dataset will be disabled.

Now Press Save Button and Press Run Button of Scoring Experiment.

After Run the Score Experiment your score model has green right mark that means successfully run the experiment after that you need to convert the score experiment to Web service view by Click the Switch to Web Service View button below. Now we want score Label (Result) as a web service output from values which we will insert in web service input So, we need to set web service output as score label. Search Project Column in search bar and Drag and Drop Project Column between Score model and Web service output.

Apply Score model output to Project Column and output of Project Column to Web Service output. Than Select Project Column -> Click Property Right Side -> Select Launch Column Selector.

Select No Column -> Include -> Column Names -> Select Scored Labels from Dropdown (Do not type). Click Right Mark

Now Experiment ready to publish as Web Service. For that click on PUBLISH WEB SERVICE button below tiled Menu.

Dashboard of Web Service below

Web Service API Key also available, Press TEST Button to test the web service and get output. Whether Student will Pass or Fail this web service will predict the Result. Enter Data to see the Predicted result of Student whether he will Pass or Fail?  Enter Data one by one and press Right Mark Button.

Result prediction is below: