Tic Tac Toe

Last Updated on May 3, 2021

About

its the X/O game once the player matches three X or O wins the game.

More Details: tic tac toe

Submitted By


Share with someone who needs it

Iris Flower Prediction

Last Updated on May 3, 2021

About

Understanding the scenario

Let’s assume that a hobby botanist is interested in distinguishing the species of some iris flowers that she has found. She has collected some measurements associated with each iris, which are:

  • the length and width of the petals
  • the length and width of the sepals, all measured in centimetres.

She also has the measurements of some irises that have been previously identified by an expert botanist as belonging to the species setosa, versicolor, or virginica. For these measurements, she can be certain of which species each iris belongs to. We will consider that these are the only species our botanist will encounter.

The goal is to create a machine learning model that can learn from the measurements of these irises whose species are already known, so that we can predict the species for the new irises that she has found.

Modules imported

  • SkLearn is a pack of Python modules built for data science applications (which includes machine learning). Here, we’ll be using three particular modules:
  • load_iris: The classic dataset for the iris classification problem. (NumPy array)
  • train_test_split: method for splitting our dataset.
  • KNeighborsClassifier: method for classifying using the K-Nearest Neighbor approach.
  • NumPy is a Python library that makes it easier to work with N-dimensional arrays and has a large collection of mathematical functions at its disposal. It’s’ base data type is the “numpy.ndarray”.

Building our model

As we have measurements for which we know the correct species of iris, this is a supervised learning problem. We want to predict one of several options (the species of iris), making it an example of a classification problem. The possible outputs (different species of irises) are called classes. Every iris in the dataset belongs to one of three classes considered in the model, so this problem is a three-class classification problem. The desired output for a single data point (an iris) is the species of the flower considering it’s features. For a particular data point, the class / species it belongs to is called its label.

As already stated, we will use the Iris Dataset already included in scikit-learn.

Now, let’s print some interesting data about our dataset:

ACCURACY we get an accuracy of 93%

OUTPUT IN THIS CASE    as we have 2 samples [[3,5,4,2], [2,3,5,4]]

so the iris type predicted by our model based on the given features are

predictions:  ['versicolor', 'virginica']

for more details this is my Github repository

ml-2/iris_flower.ipynb at main · THC1111/ml-2 (github.com)




More Details: Iris Flower Prediction

Submitted By


Image Classification Using Machine Learning

Last Updated on May 3, 2021

About

This is a prototype that shows the given specific image will belong to which category. Here any images can be taken to classify the difference. The main theme is to predict that the given image will belong to which category we had considered.

In this prototype I downloaded images of three different dog breeds named Doberman, golden retriever and shihtzu. The first step is to preprocess data which basically means converting the images into an numpy array and this process named as flattening the image. This numpy array should be the input of the image.


After preprocessing the data, the next step is to check the best suitable parameters for the machine learning algorithm. After getting the parameters, I passed them into the machine learning algorithm as arguments and fit the model. From Sklearn import classification report, accuracy score, confusion matrix which helps us to get brief understanding about our model. The model can be loaded into file using pickle library.


Now the last step is to predict the output. For this I took a input field which takes a URL as an input. The URL should be the image of the dog for which the output is predicted. In the same way we have to flatten the image into a numpy array and predict output for that. The output will show the predicted output that is which breed that the dog belongs to and the image we are checking the output for.


The main theme of this project is to train the computer to show the difference between different classes considered.

More Details: Image Classification using Machine learning

Submitted By


Truth-Sockets

Last Updated on May 3, 2021

About

About


A website where you can go and play the game of truth game in sync.


In the game, you can create or join an existing room, Once you have joined the room you are asked to add your questions which you might ask someone in the game. Once everyone has entered their questions and is ready to play. You click on begin the game, which starts a 10-sec countdown after which all the entered questions from all the users in the room are laid out randomly on cards that are flipped so you can't see the questions.

And a random person is chosen by the game to flip the card and answer the question, which is also flipped in sync across all the users in the room


WORKING

The project is built in a Node.js environment and uses Socket.io to communicate with servers and across all the users in a room. When a user selects a card, a message regarding that particular card is sent to the server which in turn broadcasts the message to all the clients in a room and thus allowing the game to be played in sync. The server maintains the status of all the rooms and their current state.


Usage

Clone the repo, and move to the folder, and run the command node server.js



More Details: Truth-sockets

Submitted By


Project - Mercedes-Benz Greener Manufacturing

Last Updated on May 3, 2021

About

DESCRIPTION

Reduce the time a Mercedes-Benz spends on the test bench.

Problem Statement Scenario:

Since the first automobile, the Benz Patent Motor Car in 1886, Mercedes-Benz has stood for important automotive innovations. These include the passenger safety cell with the crumple zone, the airbag, and intelligent assistance systems. Mercedes-Benz applies for nearly 2000 patents per year, making the brand the European leader among premium carmakers. Mercedes-Benz cars are leaders in the premium car industry. With a huge selection of features and options, customers can choose the customized Mercedes-Benz of their dreams.

To ensure the safety and reliability of every unique car configuration before they hit the road, Daimler’s engineers have developed a robust testing system. As one of the world’s biggest manufacturers of premium cars, safety and efficiency are paramount on Daimler’s production lines. However, optimizing the speed of their testing system for many possible feature combinations is complex and time-consuming without a powerful algorithmic approach.

You are required to reduce the time that cars spend on the test bench. Others will work with a dataset representing different permutations of features in a Mercedes-Benz car to predict the time it takes to pass testing. Optimal algorithms will contribute to faster testing, resulting in lower carbon dioxide emissions without reducing Daimler’s standards.


I have done Data exploration, checking for Missing values and Outliers. Treat the outliers. Applied Label Encoding on categorical variables. I have scaled the data. Applied PCA to reduce the dimension of data but no effect of it on the result. In the prediction, I used Random Forest, KNN, and XGBoost modelling. In all of them, XGBoost has given good result.


More Details: Project - Mercedes-Benz Greener Manufacturing

Submitted By


Rock Paper Scissors

Last Updated on May 3, 2021

About

This is a handy game which is generally played between 2 players and which is certainly loved by every child on the earth. Each player performs 1 out of 3 shapes that is Rock, Paper, Scissors.

Rock beats scissors, Paper beats Rock and Scissors beat Paper.

There are 2 outcomes of this game which is loose or win. Random module is used in this game project. The random module will select a value between the given range. So as to install the random module, simply go to command prompt and type “pip install random”

There are 2 functions in this code which is “choose_option_for_user" and "computer_option".

In first function, it allows the player to choose one among rock paper and scissors and in the second function it allows the computer to make its choice. Here, the computer will choose the option randomly with the help of random module. And the last is the while loop, where we determine whether the player or the computer wins the round or whether it’s a tie.

The main logic of the game is that the player will choose their choice then the computer will choose the choice then both the choices will be compared and winner will be determined. If the player wants to play again then they can choose yes/no in it and if they doesn’t want to play it will break the loop.

 


More Details: Rock Paper Scissors

Submitted By