diff --git a/app.py b/app.py index 51b80c9..ead5b5e 100644 --- a/app.py +++ b/app.py @@ -3,7 +3,7 @@ import pickle app = Flask(__name__) -model = pickle.load(open('model.pkl', 'rb')) +model = pickle.load(open('model2.pkl', 'rb')) @app.route('/') def home(): diff --git a/model.pkl b/model.pkl index 0ea966b..d5f2357 100644 Binary files a/model.pkl and b/model.pkl differ diff --git a/model.py b/model.py index 9c3e357..247fab9 100644 --- a/model.py +++ b/model.py @@ -8,7 +8,7 @@ dataset['experience'].fillna(0, inplace=True) -dataset['test_score'].fillna(dataset['test_score'].mean(), inplace=True) +dataset['test_score'].fillna(dataset['test_score'].median(), inplace=True) X = dataset.iloc[:, :3] @@ -25,15 +25,20 @@ def convert_to_int(word): #Splitting Training and Test Set #Since we have a very small dataset, we will train our model with all availabe data. -from sklearn.linear_model import LinearRegression -regressor = LinearRegression() +#from sklearn.linear_model import LinearRegression +#regressor = LinearRegression() +from sklearn.pipeline import make_pipeline +from sklearn.preprocessing import StandardScaler +from sklearn.svm import SVC #Fitting model with trainig data -regressor.fit(X, y) - +#regressor.fit(X, y) +#regressor.score(X, y) +clf = make_pipeline(StandardScaler(), SVC(gamma='auto')) +clf.fit(X, y) # Saving model to disk -pickle.dump(regressor, open('model.pkl','wb')) +pickle.dump(clf, open('model2.pkl','wb')) # Loading model to compare the results -model = pickle.load(open('model.pkl','rb')) +model = pickle.load(open('model2.pkl','rb')) print(model.predict([[2, 9, 6]])) \ No newline at end of file diff --git a/model2.pkl b/model2.pkl new file mode 100644 index 0000000..d5f2357 Binary files /dev/null and b/model2.pkl differ diff --git a/static/css/style.css b/static/css/style.css index ac53395..01f9622 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -17,7 +17,7 @@ body { width: 100%; height:100%; font-family: 'Open Sans', sans-serif; - background: #092756; + background: #1d4852; color: #fff; font-size: 18px; text-align:center;