Commit 0b5f7973 authored by IT18028188_Fernando K.P.P.E's avatar IT18028188_Fernando K.P.P.E

Merge branch 'IT18028188_Praveen' into 'master'

v1.16

See merge request !92
parents 613aba74 a2938f32
......@@ -29,14 +29,14 @@
</div>
<h1 class="mx-auto my-0 text-uppercase" style="text-align: center;">CRIMINAL REGISTRATION</h1>
<form id="myform" style="margin-top: 5px;">
<form id="myform">
<div class="container">
<div class="row">
<div class="col" style="padding-left: 100px;}">
<div class="form-input" style="margin-bottom: 8px;">
<label class="required">Full name</label><br>
<input class="input_f" type="text" name="first_name" id="Name"
onkeypress="return lettersValidate(event)" required/>
required/>
</div>
<div class="form-input" style="margin-bottom: 8px;">
<label for="age" class="required">Age</label><br>
......
import pandas as pd
import seaborn as sns
import statsmodels.formula.api as smf
from sklearn.linear_model import LinearRegression
from sklearn import metrics
import numpy as np
# read data into a DataFrame
data = pd.read_csv('C:\\Users\\Praveen\\Desktop\\test.csv', index_col=0)
data.head()
# # create a fitted model
lm1 = smf.ols(formula='check ~ Robbery', data=data).fit()
# print(lm1.params)
### STATSMODELS ###
# create a fitted model with all three features
lm1 = smf.ols(formula='check ~ Robbery + Aggraveted_Assualt + Weapons_Dealing + Mortor_vehicle_Theft + Kidnapping_Cases + Murder_cases + Fighting_in_public', data=data).fit()
# print the coefficients
print(lm1.params)
# create X and y
feature_cols = ['Robbery', 'Aggraveted Assualt', 'Weapons Dealing', 'Mortor vehicle Theft', 'Kidnapping Cases', 'Murder cases', 'Fighting in public']
X = data[feature_cols]
y = data.check
# instantiate and fit
lm2 = LinearRegression()
lm2.fit(X, y)
# print the coefficients
print(lm2.intercept_)
print(lm2.coef_)
list(zip(feature_cols, lm2.coef_))
### STATSMODELS ###
# print a summary of the fitted model
print(lm1.summary())
\ No newline at end of file
# import cv2
#
# # input video
# cap = cv2.VideoCapture("E:/Research/Criminal investigation management system/Input video/video3.mp4")
# cap = cv2.VideoCapture("C:/Users/Praveen/Desktop/video.mp4")
#
# i = 0
# while cap.isOpened():
# flag, frame = cap.read()
# if flag == False:
# break
# cv2.imwrite('E:/Research/Criminal investigation management system/Output snaps/new' + str(i) + '.jpg', frame)
# cv2.imwrite('C:/Users/Praveen/Desktop/New folder/new' + str(i) + '.jpg', frame)
# i += 1
#
# # #Test Commit
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment