-
Support
-
April 2025 M T W T F S S 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 -
-
Latest Posts
-
-
Business Central – My Settings
Posted in Business Central, Microsoft Dynamics 365
Tagged business, central, my, settings
Comments Off on Business Central – My Settings
Business Central – Search
Posted in Business Central, Microsoft Dynamics 365
Tagged business, central, search
Comments Off on Business Central – Search
Business Central – User Interface
Posted in Business Central, Microsoft Dynamics 365
Tagged business, central, interface, user
Comments Off on Business Central – User Interface
Basics of Machine Learning
In this article we will go through the basics of ML terminologies which will be useful for Data Processing and Data Visualization.
Mean
Median
Mode
Range
Probability
Mean
It is the average of all the values.
Mean = Sum of all observations / Number of observations |
For example:
Mean = 62800 / 11
= $ 5709.09
Median
It is the numerical middle value of the sorted observations with equal number if observations on both sides.
For example, if we plot the same data as above in ascending order in straight line, you will see that there are equal number of observations on both the sides of “5800”. Hence this is the median value of this sample set.
In case you are wondering about its significance, well, then this helps us understand on which side majority of the observations are tilted. So, in case of data clean-up process if some observations have missing values, we can either replace them with mean or median values.
Mode
It is the value that appears most often in a set of data. In our above sample data, the value “6400” occurs 3 times, which is higher that the occurrences of all the other values. So the mode of this set of observations is “6400”.
This can also be used for replacing missing values in a dataset.
Range
It is the difference of highest and lowest values in a sample of observations. So as per the our sample dataset:
Range = 7000 – 4000
= 3000
This helps us understand how widely the values are spread in a given set of observations.
Probability
This is one of the most important term in machine learning and we all have heard this term in one way or another.
Probability is a numerical way of describing how likely something is going to happen.
Probability is derived from a Sample Space (S). Sample Space is set of possible outcomes that might be observed for an event.
If all this sound Greek to you then let us take a simple example of dice. So when we throw a dice, what are the possible outcome? The only possible outcome is one of the following: 1,2,3,4,5 or 6. So the sample space for dice is the following:
Dice Sample Space (S) = {1,2,3,4,5,6} |
Now if we want to know what is the Probability of 3, i.e. if we roll the dice, what is the likelihood of getting a 3?
It is 1 out of 6.
P(A) = 1/6 = 0.1667 OR 16.67% |
Similarly, what is the probability of getting an even number?
P(A) = 3/6 = 0.5 OR 50% |
Does it make sense now? This is one of the most important topic and many machine learning algorithms such as Naive Bayes, Logistic Regression, etc. are based on fundamental principles of probability.
Stay tuned for more!
Data Types in Machine Learning
In our previous article we looked into the definition of machine learning, how machine learns, how machine learning is different than traditional rule based systems and various machine learning categories, i.e. Supervised, Unsupervised and Reinforcement Learning.
Type of Variables
Data Type
Category
We also know that historical data is crucial for any machine learning algorithms we use, but how to read the data and how to interpret it, so that we can make effective use of it in our algorithm.
Remember garbage in is garbage out.
So, let us understand the data with an example. Let’s say following is the data from a bank which that wants to create an algorithm to determine whether a customer loan should be approved or not.
Now, let’s look at what kind of data we are dealing with here.
In any data set there are three main important factors that we need to understand, before we start working on solving the problem using Machine Learning.:
Type of Variables
So, in this example, we are trying to determine whether the loan application of the customer will be approved or not, in other words the approval is based on the events in the past, because we want our Machine Learning algorithm to predict similar results.
Data Type
At a high level we can safely assume that the data that has been provided to us has some variables as Character/String and some variables as Numeric values. There can be more type or subtype within them, such as integer, float, etc., but as long as we understand these two broad types we are good.
Now, what would happen to the data type, if the bank says that we are going to treat all the customers same, if they have three or more dependents on them. In that case the values above three or the number of dependents does not have any impact and we should change it to “3+”. In such a scenario the “Dependent” variable will become a string type variable.
So, you should pay very close attention to such details coming from the data provider to avoid any data errors in the data processing stage.
Category
Category of the data is a very important aspect. Now, if you look closely some variables contain options such as male, female; yes, no; etc. Such variables are called Categorical variables. Whereas other variables are Continuous variables, where the values can have any possible range.
These are small things but very important for reading and processing the data.
Stay tuned for more articles!
Machine Learning Categories
Machine Learning can be categorized into following categories:
Supervised Learning
Unsupervised Learning
Reinforcement Learning
- Supervised Learning
- Unsupervised Learning
- Reinforcement Learning
For example, when you were a kid, solutions were provided to you by your parents. These solutions and decisions were based on their past experience. You learnt as you grew. That is Supervised Learning.
However, when you start taking your own decisions without any such result or outcome-based intelligence, that is Unsupervised Learning. Same is true with the machine.
Let’s have a look at it technically.
Supervised Learning
In case of supervised learning:
- The data is labelled, which means both the dependent and independent variables are provided.
-
There is an Input variable “X” or set of input variables and an output variable “Y”.
Y = f(X)
- The function is approximated to predict new values of Y given X.
-
Examples:
- Regression: Output variable is a real value such as Amount, Height, Weight, etc.
- Classification: Output variable is category, such as Yes, No, red, Blue, Yellow, etc.
Loan_ID | Gender | Married | Dependents | Self_Employed | Income | LoanAmt | Term | Credit History | Property_Area | Status |
LP001002 | Male | No | 0 | No | $5849.00 | 60 | 1 | Urban | Y | |
LP001003 | Male | Yes | 1 | No | $4583.00 | 120 | 1 | Rural | N | |
LP001005 | Male | Yes | 0 | Yes | $3000.00 | $66.00 | 60 | 1 | Urban | Y |
LP001006 | Male | Yes | 2 | No | $2583.00 | $120.00 | 60 | 1 | Urban | Y |
Unsupervised Learning
In case of Unsupervised Learning:
- Only X (input) variable is known.
- The goal for Unsupervised Learning is to model the underlying structure or distribution in the data in order to learn more about the data.
- There is no correct answer here and there Is no teacher.
- Algorithms are left on their own to discover and present the interesting structure in the data.
-
Example:
- Clustering: Customer behaviour grouping, such as spending patterns, their preferences, their likes and dislikes.
- Association: Recommendation model, for a product which may be liked by a set of customers.
Reinforcement Learning
How do we know if those decisions taken in Unsupervised manner are going to give us desired result? There is where the Reinforcement Learning help us by rewarding the good decisions and penalizing the bad ones.
The idea is to maximize the gain or reward. It’s something like you pay your bills on time and the result is a good credit history.
Similarly, Supervised Learning may group a set of customers correctly using their spending pattern and let’s say now your marketing department wants to show them a set of advertisements. Now, without any past data, how do we maximize the reward or gain, which in this case Is click through rate and this is achieved by reinforcement learning.
Posted in AI & ML
Tagged ai, category, learning, ml, reinforced, supervised, unsupervised
Comments Off on Machine Learning Categories
Get Started With Azure Machine Learning Services
Purpose
This article shows you how to:
- Create service accounts for Azure Machine Learning services
- Install and log in to Azure Machine Learning Workbench
- Create a project in Workbench
- Run a Python Script
- Access the command-line interface (CLI)
Prerequisites
You would require:
- Azure subscription with adequate permissions. If you don’t have an Azure subscription, create a free account before you begin.
- Windows 10 or Windows Server 2016 or macOS Sierra or High Sierra for installing machine Learning Workbench.
Create service accounts for Azure Machine Learning services
Provision your Azure Machine Learning accounts on Azure Portal.
-
Create a new Resource Group to manage all your services.
-
In the Resource Group:
- Click Add.
- Search for Machine Learning in Market Place.
- From the list select Machine Learning Experimentation (preview)
- Click Create to begin defining your experimentation account. This will open the ML Experimentation form.
-
Fill the Machine Learning Experimentation form and click Create.
NOTE: This can take a few moments to create. You can check on the status of the deployment process by clicking the Notifications icon (bell) on the Azure portal toolbar.
Install and log in to Azure Machine Learning Workbench
Azure Machine Learning Workbench is available for Windows or macOS.
Download and launch the latest Machine Learning Workbench installer:
NOTE: Download the installer fully on disk, and then run it from there. Do not run it directly from your browser’s download widget. Also, the installation might take around 30 minutes to complete.
Follow the on-screen instructions in your installer to completion. The installer will download and set up all the necessary dependencies, such as Python, Miniconda, and other related libraries. This installation also includes the Azure cross-platform command-line tool, or Azure CLI.
Once the installation is completed, Launch the workbench.
NOTE: The installation might take around 30 minutes to complete.
Sign in with Microsoft to authenticate with the Azure Machine Learning Workbench. Use the same credentials you used in the Azure portal to create the Experimentation and Model Management accounts.
Once you are signed in, Workbench uses the first Experimentation account it finds in your Azure subscriptions, and displays all workspaces and projects associated with that account. However, you can switch to a different Experimentation account using the icon in the lower-left corner of the Workbench application window.
Create a project in Workbench
In Azure Machine Learning, a project is the logical container for all the work being done to solve a problem. It maps to a single folder on your local disk, and you can add any files or subfolders to it.
Here, we are creating a new Workbench project using a template that includes the Iris flower dataset.
NOTE: Upcoming articles will depend on this data to build a model that predicts the type of iris based on some of its physical characteristics.
Select the plus sign (+) in the PROJECTS pane and choose New Project.
Fill out of the form fields and select the Create button to create a new project in the Workbench.
A new project is created and the project dashboard opens with that project.
Run a Python Script
Now, you can run the iris_sklearn.py script on your local computer. This script is included by default with the Classifying Iris project template. The script builds a logistic regression model using the popular Python scikit-learn library.
- In the command bar at the top of the Project Dashboard page, select local as the execution target and select iris_sklearn.py as the script to run.
-
In the Arguments text box, enter 0.01. This number corresponds to the regularization rate, and is used in the script to configure the logistic regression model.
-
Select Run to start the execution of the script on your computer. The iris_sklearn.py job immediately appears in the Jobs panel on the right so you can monitor the script’s execution. Congratulations! You’ve successfully run a Python script in Azure Machine Learning Workbench.
- Repeat steps 2 – 3 several times using different argument values ranging from 0.001 to 10 (for example, using powers of 10). Each run appears in the Jobs pane.
-
Inspect the run history by selecting the Runs view and then iris_sklearn.py in the Runs list. This view shows every run that was executed on iris_sklearn.py. The run history dashboard also displays the top metrics, a set of default graphs, and a list of metrics for each run.
- You can customize this view by configuring the parts.
-
Select a completed run in the Jobs pane to see a detailed view for that specific execution. Details include additional metrics, the files that it produced, and other potentially useful logs.
Access Command Line Interface (CLI)
The CLI interface allows you to access and interact with your Azure Machine Learning services using the az commands to perform all tasks required for an end-to-end data science workflow. Learn more.
You can launch the Azure Machine Learning CLI from the Workbench’s toolbar using File > Open Command Prompt.
You can get help on commands in the Azure Machine Learning CLI using the –help argument.
az ml –help |
You have now created the necessary Azure Machine Learning accounts and installed the Azure Machine Learning Workbench application. You have also created a project, ran a script, and explored the run history of the script.
Stay in tune for a more in-depth experience of this workflow.
Azure Machine Learning Documentation Links
Learn how to use Azure Machine Learning, with its fully managed services for building, deploying, and managing machine learning and AI models in the cloud. Tutorials, quick starts, references, and examples show you how to build and deploy models for any of your applications.
The following table provides links to various documentation available for:
Azure Machine Learning Services.
Azure Machine Learning Studio.
![]() |
![]() |
![]() |
||
5-Minute Quick Starts |
||||
Setup | Link | Link | Link | |
Build a Model | Link | Link | ||
Step-by-Step Tutorials |
Prepare Data | Link | Link | |
Build a Model | Link | Link | ||
Operationalize a Model | Link | Link | ||
Consume a Model | Link | Link |
More Microsoft Machine Learning Technologies
![]() |
Team Data Science Process |
![]() |
SQL Server Machine Learning Services |
![]() |
Microsoft Machine Learning Server |
![]() |
Batch AI Training |
![]() |
Cognitive Services |
![]() |
Microsoft Cognitive Toolkit |
Art, Science & Tools of Machine Learning
How can we tell if a drink is beer or wine? Machine learning, of course! In this article of Cloud AI & Machine Learning, we walk you through the 7 steps involved in applied machine learning.
From detecting skin cancer, to sorting cucumbers, to detecting accelerators that need repair, Machine Learning has granted computer systems entirely new abilities, but how does it really work under the hood?
Let’s walk through a basic example and use that as an excuse to go through the process of getting answers from your data using Machine Learning.
Let’s pretend that we have been asked to create a System that answers the question if a drink in Wine or Beer! Now this question answering system that we build is called a Model and this model of created by a process called Training.
So, Machine Learning is the goal of creating an accurate Model that answers our questions correctly most of the time
However, to train a model, we need to collect data and this is where we begin.
Collecting Data to Train
Our data will be collected from glasses of win and beer. Now, there are many aspects of drinks that we can collect data on, anything from the amount of foam to the shape of the glass. But for our purposes, we will pick two simple ones:
COLOUR | |
13.5 % Alc/Volume | ALCOHOL |
- The colour as the wavelength of light.
- Alcohol content as a percentage.
The hope is that we can split our two types of drink along these two factors (or features) alone.
So, the first step would be run up to the local liquor store and buy up some different drinks and get some instruments to do our measurements, like Spectrometer for measuring the colour and Hydrometer to measure the alcohol content.
Once all the booze and tools are setup, its time for the first step of machine learning, gathering the data. This step is very important, because the quality and quantity of the data that you gather will directly determine how good your predictive model will be!
So after few hours of measurements we gather our training data and hopefully were not too drunk .
Colour (nm) | Alcohol % | Wine or Beer? |
610 | 5 | Beer |
599 | 13 | Wine |
693 | 14 | Wine |
Data Preparation
Now it’s time for our next step, which is Data Preparation, where we load our data into a suitable place and prepare it for use in our machine learning training.
We will first put all our data together and then randomize the order of our data. We would not want the order of our data to affect how we learn since that is not part of determining whether a drink is a beer or a wine. In other words, we want to make determination of what the drink is, independent of what drink came before or after it in the sequence.
This is also a good time to do an impertinent visualizations of your data, helping you to see if there are any relationships between different variables, as well as show you if there are any data imbalances, for instance if we collected way more data points for beer than wine, then the model we train will be heavily biased and virtually everything it sees would be beer, and it would be right most of the time. However, in real world the model will see beer and wine in equal amounts and this would mean that it would be guessing beer wrong half the time.
We also need to split our data. The first part which will used fir Training our model will be majority of our data set and second part would be for Evaluating our trained model performance. This is because we don’t want to use the same data that the model was trained on for evaluation, since it would have memorized the questions.
Sometimes, the data we collected would other adjustments and manipulations such as deduplication, normalization, error correction, and others. These will all happen in the data preparation step.
Choosing a Model
In our case we just have two features, colour and alcohol percentage. So, we can use a small data model, which is simple and can get the job done.
Training
Now we move on to the bulk of machine learning, which is called the Training. In this step we will use our data to incrementally improve our model’s ability to project that a given drink is beer or wine.
In a way this is like someone learning to drive. At first, they do not know what is the function of various, buttons, knobs, pedals or when they should be used, however, after a lot of practice and driving a licensed driver emerges. Moreover, after a year of driving, they become quite adapt to driving. The act of driving and reacting to real world data has adapted to their driving abilities honing their skills.
We will do this in much smaller scale with our drinks. The formula for a straight line is:
y = m * x + b |
x is the input
m is slope of the line
b is the y-intercept
y is value of the line at that position x
Now the values that we must adjust, or train are just m and b. There is no other way to affect the position of the line since all the other variables are x the input and y the output.
In machine learning there are many m as there may be many features. The collection of these values is usually formed into matrix and is denoted w for the Weights matrix. Similarly, for b we arrange them together which are called Biases.
The training process involves initializing some random values from w and b and attempting to predict output from those values. As you might imagine it does poorly at first. But we can compare output of our models’ predictions with the output that it should have produced and adjust the values in w and b, so that we can have more accurate predictions next time around.
So, this process then repeats and each iteration or cycle of updating weights and biases is called one training step.
What does that mean? Well, when we first start training, its like we drew a random line through the data, then as each step of the training progresses, the line moves step by step closer to the ideal separation of the beer and wine.
Evaluation
Once training is complete, it’s time to see if the model is any good by Evaluation. This is where our data set, that we set aside earlier, comes into play.
Evaluation allows us to test our model against the data that has never been used for training. This matrix allows us to see how the model might perform against the data that it has not yet seen. It’s meant to be representative of how the model might perform in the real world.
A good rule of thumb for Training and Evaluation split would be in the order or 80% and 20% or 70% and 30%. Much of this depends on the size if the original data set. If you have a lot of data, perhaps you don’t need as big of a fraction of evaluation data set.
Further Improvement
Once you have done the evaluation, you may want to see if you can further improve your model in any way. We can do this by further tuning some of our parameters. There are few that we implicitly assumed when we did our training and now is the good time to go back and look at those assumptions and try other values.
One examples of parameter we can tune is how many times we run through the training set during training. we can show the data multiple times. So, by doing that we will potentially lead to higher accuracies.
Another example can be learning rate. This defines how far we shift the line during each step, based on the information form previous training step.
These values all play a role in how accurate our model can become and how long the training takes.
For more complex models, initial congestions can play a significant role as well in determining outcome of the training. Differences can be seen depending whether our model starts off training with values initialized as zeroes versus some distribution of values and what that distribution is.
As you can see that there are various considerations during this phase of the training and it’s important that you define what makes the model good enough for you, otherwise we might find ourselves tweaking parameters for a long period of time.
Now these parameters are referred to as Hyper Parameters. The adjustment of these hyper parameters remains more of an art rather than science. Its more experimental in nature which depends on your dataset, model and training process.
Prediction
Once you are happy with your training and hyper parameters, guided by the evaluation data set, its finally time to do something useful with your model.
Machine Learning is using data to answer your questions, so Prediction or Inference is that step where we finally get to answer some questions.
Once you are happy with your training and hyper parameters, guided by the evaluation data set, its finally time to do something useful with your model.
Machine Learning is using data to answer your questions, so Prediction or Inference is that step where we finally get to answer some questions.
This is the step with all this work the value of machine learning is realized.
We can finally use our model to predict whether a given drink in a wine or beer, given its colour and alcohol percentage. The power of machine learning is that we were able to determine this using our model, rather than using a manual human judgement.
Summary
You can extrapolate the idea presented here to other problem sets as well. The same principles will apply, i.e.
- Gathering the data
- Preparing the data
- Choosing the model
- Training the model
- Evaluating the model
- Doing your hyper parameter tuning
- Prediction
Stay in tune for upcoming blog articles!
Some Useful Resources
TensorFlow Playground: http://playground.tensorflow.org
Machine Learning Workflow: https://goo.gl/SwLnSz
Hands-on intro level lab Baseline: Data, ML, AI → http://bit.ly/2tCPLaL