In this post, I have shared a process to build a model using Machine Learning.
Here are three layers of ML Model
Every project you need flow. In this ML modelling, a hidden process involved.
I am explaining the steps involved in building the ML model. There is a total of three steps to developing a model.
1). Historical Data
The first thing is you need the right kind of data. The data can be your old data that acts as an input to a machine learning model.
2). Model Building
The concept of model building is you need to assign your data to your algorithm.
Data ==> Model
3). Internal Mechanism of Algorithm
data = load_data("data/people.csv") model = build_model(data, target="Marital status") new_data = load_data("data/new_people.csv") predictions = model.predict(new_data)
data = load_data(...) training_data, testing_data = split_data(data) model = build_model(training_data, target="Marital status") true_values = testing_data.extract_column("Marital status") predictions = model.predict(testing_data) accuracy = compare_predictions(predictions, true_values)
In the model evaluation, feed only some of your data to algorithm. The remaining data you can use it for evaluation/testing.
Feed input and get answers from the model, then compare these results to actual/true values. Then you will know how your model is working.
In the testing for the given input, it should tell about a person’s marital status. The accuracy of the model will be calculated based on right or wrong answers.