Health Insurance Cost: Explorative And Predictive Analysis

Last Updated on May 3, 2021

About

I did this project under Knowledge Solutions India. It was a health insurance cost predictor project. We had to predict using different machine learning models. It was a group project wherein we also had to present the report to our teacher. Different machine learning models used are as follows :-

  • Multiple Linear Regression(MLR)
  • Random Forest Regression(RFR)
  • MLR with PCA
  • RFR with PCA 


I had the task to work on prediction using MLR with PCA. Atlast , we concluded that RFR model performed the best to Predict the Insurance Cost.

More Details: Health Insurance Cost: Explorative and Predictive Analysis

Submitted By


Share with someone who needs it

Face Detection And Recognise

Last Updated on May 3, 2021

About

Project is Build In three parts as follows:-



  1. Face Dataset:- Recognise the face of a person and takes 30 Images of that`s persons Face.

Code as Follow

''''
Capture multiple Faces from multiple users to be stored on a DataBase (dataset directory)
   ==> Faces will be stored on a directory: dataset/ (if does not exist, pls create one)
   ==> Each face will have a unique numeric integer ID as 1, 2, 3, etc                       


Developed by Ujwal,Yash,adinath,sanket under guidance of prianka ma`am group no. 49

'''

import cv2
import os

cam = cv2.VideoCapture(0)
cam.set(3, 640) # set video width
cam.set(4, 480) # set video height

face_detector = cv2.CascadeClassifier('haarcascade_frontalface_default.xml')

# For each person, enter one numeric face id
face_id = input('\n enter user id end press <return> ==>  ')

print("\n [INFO] Initializing face capture. Look the camera and wait ...")
# Initialize individual sampling face count
count = 0

while(True):

    ret, img = cam.read()
    img = cv2.flip(img, 1) # flip video image vertically
    gray = cv2.cvtColor(img, cv2.COLOR_BGR2GRAY)
    faces = face_detector.detectMultiScale(gray, 1.3, 5)

    for (x,y,w,h) in faces:

        cv2.rectangle(img, (x,y), (x+w,y+h), (255,0,0), 2)     
        count += 1

        # Save the captured image into the datasets folder
        cv2.imwrite("dataset/User." + str(face_id) + '.' + str(count) + ".jpg", gray[y:y+h,x:x+w])

        cv2.imshow('image', img)

    k = cv2.waitKey(100) & 0xff # Press 'ESC' for exiting video
    if k == 27:
        break
    elif count >= 30: # Take 30 face sample and stop video
         break

# Do a bit of cleanup
print("\n [INFO] Exiting Program and cleanup stuff")
cam.release()
cv2.destroyAllWindows()


2.Face Training:- Trains the already taken 30 images and convert into gray scale. For easy detection

i have applied the code for a Reduction of Noice in image.

Code as Follow:

''''
Training Multiple Faces stored on a DataBase:
   ==> Each face should have a unique numeric integer ID as 1, 2, 3, etc                       
   ==> LBPH computed model will be saved on trainer/ directory. (if it does not exist, pls create one)
   ==> for using PIL, install pillow library with "pip install pillow"



Developed by Ujwal,Yash,adinath,sanket under gidence of prianka ma`am group no.49

'''

import cv2
import numpy as np
from PIL import Image
import os

# Path for face image database
path = 'dataset'

recognizer = cv2.face.LBPHFaceRecognizer_create()
detector = cv2.CascadeClassifier("haarcascade_frontalface_default.xml");

# function to get the images and label data
def getImagesAndLabels(path):

    imagePaths = [os.path.join(path,f) for f in os.listdir(path)]     
    faceSamples=[]
    ids = []

    for imagePath in imagePaths:

        PIL_img = Image.open(imagePath).convert('L') # convert it to grayscale
        img_numpy = np.array(PIL_img,'uint8')

        id = int(os.path.split(imagePath)[-1].split(".")[1])
        faces = detector.detectMultiScale(img_numpy)

        for (x,y,w,h) in faces:
            faceSamples.append(img_numpy[y:y+h,x:x+w])
            ids.append(id)

    return faceSamples,ids

print ("\n [INFO] Training faces. It will take a few seconds. Wait ...")
faces,ids = getImagesAndLabels(path)
recognizer.train(faces, np.array(ids))

# Save the model into trainer/trainer.yml
recognizer.write('trainer/trainer.yml') # recognizer.save() worked on Mac, but not on Pi

# Print the numer of faces trained and end program
print("\n [INFO] {0} faces trained. Exiting Program".format(len(np.unique(ids))))


3.Face Recognition:- Recognise The face if and only if that`s person images are present in a datase.

otherwise it shows unkwon person.If the person is recognisable by system then it

shows the match in persentage.

Code as Follow:

''''
Real Time Face Recogition
   ==> Each face stored on dataset/ dir, should have a unique numeric integer ID as 1, 2, 3, etc                       
   ==> LBPH computed model (trained faces) should be on trainer/ dir


Developed by Ujwal,Yash,adinath,sanket under gidence of prianka ma`am Group no.49

'''

import cv2
import numpy as np
import os 

recognizer = cv2.face.LBPHFaceRecognizer_create()
recognizer.read('trainer/trainer.yml')
cascadePath = "haarcascade_frontalface_default.xml"
faceCascade = cv2.CascadeClassifier(cascadePath);

font = cv2.FONT_HERSHEY_SIMPLEX

#iniciate id counter
id = 0

# names related to ids: example ==> Marcelo: id=1,  etc
names = ['None','Ujwal','Yash','Adinath','Sanket']

# Initialize and start realtime video capture
cam = cv2.VideoCapture(0)
cam.set(3, 640) # set video widht
cam.set(4, 480) # set video height

# Define min window size to be recognized as a face
minW = 0.1*cam.get(3)
minH = 0.1*cam.get(4)

while True:

    ret, img =cam.read()
    # img = cv2.flip(img, -1) # Flip vertically

    gray = cv2.cvtColor(img,cv2.COLOR_BGR2GRAY)

    faces = faceCascade.detectMultiScale( 
        gray,
        scaleFactor = 1.2,
        minNeighbors = 5,
        minSize = (int(minW), int(minH)),
       )

    for(x,y,w,h) in faces:

        cv2.rectangle(img, (x,y), (x+w,y+h), (0,255,0), 2)

        id, confidence = recognizer.predict(gray[y:y+h,x:x+w])

        # Check if confidence is less them 100 ==> "0" is perfect match 
        if (confidence < 100):
            id = names[id]
            confidence = "  {0}%".format(round(100 - confidence))
        else:
            id = "unknown"
            confidence = "  {0}%".format(round(100 - confidence))
        
        cv2.putText(img, str(id), (x+5,y-5), font, 1, (255,255,255), 2)
        cv2.putText(img, str(confidence), (x+5,y+h-5), font, 1, (255,255,0), 1)  
    
    cv2.imshow('camera',img) 

    k = cv2.waitKey(10) & 0xff # Press 'ESC' for exiting video
    if k == 27:
        break

# Do a bit of cleanup
print("\n [INFO] Exiting Program and cleanup stuff")
cam.release()
cv2.destroyAllWindows()


More Details: Face Detection And Recognise

Submitted By


Churn Prediction

Last Updated on May 3, 2021

About

Predicting Customer Churn at a Fictitious Wireless Telecom Company


Churn Management has gotten great attention among the telecommunication Industry because it is proved that instead of going for advertisements to find new customers it’s better to find a technique, solution, and all the available resources in our service to figure out a pattern to make customers stay in the company. Every telecommunication company has huge competition and due to easy access of the plans and services provided by all the companies, a customer can switch the company anytime. For churn Prediction, it is most required to identify the customer who has the highest probability of leaving the service of the company and it will be effective if it’s done at the right time. Through this company can make a decision on what service to provide to make the customer not leave the service.


Here, we can reformulate the given problem as a Classification problem. My goal is to build a Classification model that can predict if Customers will stay with the company or not from the given features. To achieve this, first, I did data analysis and data cleaning, data preparation for training, and then model building. After this, based on the performance I find the best parameters of our model through GridSearchCV which best suits for the given data and gave the expected result.

More Details: Churn Prediction

Submitted By


Permission Management System

Last Updated on May 3, 2021

About

Permission Management System is web project developed for the newly
joined employees to get their resumes validated by the manager and if
manager is impressed or feels that the employee is fit for the job, he
grants permission to access their official site as an employee where
employee can manage his work and gets permission to view all the
details of that job.

The aim of this project is to make the tasks of newly joining employees
and manager of the company easy. Many employees apply for the job
and the manager need to validate all the details of these employees, so
our project aim is to provide a database that can store all the applied
employee resumes and remove all the resumes which are not fit for the
job and validate the selected employee resumes. If he/she is selected for
the job then the manager will be able to give access to the official site,
where the employee can view all the other employees available in 
company and previous employee details and he/she can manage data in
the official site. And even manager can give permission whether the
employee is just an employee for the job or the admin to handle all the
tasks in official site. The main objective of this project is to grant
permissions for the newly joined employees based on his/her resume and
work.

The project is developed as a web-based application which works for a
company to maintain their records and grant permissions for new
employees. But later on, the project can be modified to all the companies
by making partial changes to the site by providing their company details
in the site online. Permission Management System utilitarian scope is
enabled through the concepts of computing mainly Database
management and the user interface aspects enabled through various web
interfaces and technologies.

Who can use this application in real life? 
1. Employees who are willing to apply for a job.
 2. Manager who gives permissions for the employee to give a job.


More Details: Permission Management System

Resistar

Last Updated on May 3, 2021

About

Augmented Reality Circuit Visualizer and Solver.

Categories Won

TartanHacks Grand Prize

Facebook Company Prize

Attempted Prize Categories

Duolingo’s Social Impact Prize (Educational)

GoDaddy’s Social Impact Prize (“Best app that improves STEM education”)

Inspiration

Long hours spent on ECE problem sets and frustration visualizing convoluted circuits caused these four CMU undergrads to create a circuit visualization system that would also help them solve circuits. A member of the team is currently in the intro ECE course: "Well it's not bad, I guess." - Team Member

What it does

ResistAR is an Augmented Reality Circuit Visualizer and Solver. A user can place down circuit elements in parallel and series configurations and ResistAR will solve the current through and voltage across each element of the circuit. It gives the user an easy way to see (sharp) the circuit.

How we built it

We first began with 3D printed chassis for the VuMark targets. These targets are identified and parsed by the program and cross checked against our cloud database on Vuforia. We then created 3D, textured, models in Blender that will hover over the VuMark targets. We then wrote the code in Unity that will calculate voltage and current values using concepts from vector calculus and matrix algebra.

Challenges we ran into

The math was very difficult and attempting to rush a 3D printed design was also difficult but there was a rush because 3D printing would be a very time consuming process. Thus we also had to create a lot of our latter designs around the already 3D printed parts. VuMarks were also difficult to create. VuMarks must be very easily distinguishable from each other and non-symmetric along any axis, and therefore took a while to get finely tuned and calibrated. Finally the math was a very difficult thing to visualize. We had to go from 3D space to 2D space and there were some difficulties with projections. The coders did end up writing relatively bug-free code, but not before a long, arduous thinking process.

Accomplishments that we're proud of

The two logic/algorithm gods that we had on our team solved an extremely complex math problem very quickly. Also our 3D printed parts are actually fire though. Just saying.

What we learned

Two 5 hour energies in 72 hours is actually not as bad an idea as some might think. Math is hard.

What's next for ResistAR

Norton and Thevenin Equivalents. Yikes.

More Details: ResistAR

Submitted By


Fantasy Cricket Game

Last Updated on May 3, 2021

About

It is an online game where you create a virtual team of real cricket players and score points depending on how your chosen players perform in real life matches. To win a tournament, you must try and get the maximum points and the No. 1 rank amongst other participants. Here's how a Fantasy Cricket game may look like. 

 



1 Opening screen of the application. You can see the players of each category by selecting the category. To begin with, the selection is disabled until a new team is created from the Manage Teams menu. A pop up asking the name of the team appears. 





2 The toolbar menu options which allow you to create a new team, open an existing team, save your team and finally evaluate the score of a saved team.  


 

 



3 After clicking create Team, the left box is populated with player names. As you select a different category, the corresponding list of players is displayed.



 



4 On double-clicking each player name, the right box gets populated. Points available and used are displayed accordingly.


 

 



5 Message if the game logic is not followed 






6 Pop-up on clicking Evaluate Score. You can select your team here and the match for which the players' performance is compared. 





7 The final score for your fantasy team based on the match selected.  



More Details: Fantasy Cricket Game

Submitted By