Closed ankurshukla03 closed 6 years ago
@diegocasmo in the final method, we can just manually select the 15 components PCA deems important? Or do we have to run it still on the single row of data we get.
in the final method, we can just manually select the 15 components PCA deems important? Or do we have to run it still on the single row of data we get.
@tristaaan I'm not sure
Great find on the pca.transform
I saved the pca.fit(...
model and we can load it here. All runs well except the prediction.
I suspect (from experience in the other project) preprocessing is the culprit. Normalization specifically.
x = [[-3,-2,0,2,3], [-10, -8, 0, 8, 10]]
x = np.array(x)
normalize(x, axis=1)
#array([[-0.58834841, -0.39223227, 0. , 0.39223227, 0.58834841],
# [-0.55215763, -0.4417261 , 0. , 0.4417261 , 0.55215763]])
normalize(x, axis=0)
#array([[-0.28734789, -0.24253563, 0. , 0.24253563, 0.28734789],
# [-0.95782629, -0.9701425 , 0. , 0.9701425 , 0.95782629]])
axis=1
axis=0
makes quite the difference. We could normalize on the values we've been finding so far in the test set? Or recompute it all with axis=1
(row by row normalization)
In the final notebook with axis=1
SVM retains its crown
kNN with PCA classifier accuracy: 0.53%
SVM with PCA classifier accuracy: 0.80%
MLP with PCA classifier accuracy: 0.69%
Random Forest with PCA classifier accuracy: 0.56%
Of all the silly coding standards out there one I really like is import
ordering for python.
os
, sys
, json
...)numpy
...)constants.py
)Each category should be alphabetically ordered. It makes it a lot easier to read.
I am training SVM model with CalibratedClassifierCV to use predict_proba function while giving output to emotion synthesis group as we need to give them the confidence with each of the labels. Just to make sure can you guys check that the above function i am using is not wrong i read it and it seems fine to me, also it doesn't affect the accuracy of our SVM model.
svm = CalibratedClassifierCV(clf)
What email client are you using? That link goes to some malware for me, click on it as few times as possible.
-Tristan Wright
On Sun, May 27, 2018 at 11:41 AM, Ankur Shukla notifications@github.com wrote:
I am training SVM model with CalibratedClassifierCV ( http://scikitlearn.org/stable/modules/generated/sklearn.calibration. CalibratedClassifierCV.html) to use predict_proba function while giving output to emotion synthesis group as we need to give them the confidence with each of the labels. Just to make sure can you guys check that the above function i am using is not wrong i read it and it seems fine to me, also it doesn't affect the accuracy of our SVM model.
svm = CalibratedClassifierCV(clf)
— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/diegocasmo/iis-project/pull/21#issuecomment-392318327, or mute the thread https://github.com/notifications/unsubscribe-auth/AFN5myT1DBTkR9ydMZ1Bs0FY3ZL52zVoks5t2nTBgaJpZM4UKiIn .
I am using github itself, not any email client for that comment.
What email client are you using? That link goes to some malware for me, click on it as few times as possible.
Lol I'm emailing all of these, that won't be an email client issue. Just check the link, markdown format will make it look nicer. [cool site](http://zombo.com)
Lol, Should have looked for the syntax first. Thanks btw.
Just check the link, markdown format will make it look nicer.
The link itself though. It goes to the wrong scikit...
http://scikitlearn.org/stable/modules/generated/sklearn.calibration.CalibratedClassifierCV.html
vs
http://scikit-learn.org/stable/modules/generated/sklearn.calibration.CalibratedClassifierCV.html
Shitt. Changed the link now.
The link itself though. It goes to the wrong scikit...
Is the PCA model different too since we're normalizing differently?
Oops. Changing it now
Is the PCA model different too since we're normalizing differently?
Cool, I think if the meeting tomorrow goes ok we can make the input changes they're feeding us merge this.
Models generated by exporting the data-analysis notebook to a script and running it from the command line with python 2 explicitly.
Pretty certain this can be merged now.
Let's wait until tomorrow, minor changes may occur during the meeting. The downgrade of all the notebooks to Python 2 can be done in a different PR.
I have no idea what to do with this branch now. Merge away after conflicts resolved?
@tristaaan Don't you need the changes in this branch for the presentation?
That's what it's for. Yes I resolved the merge conflict. Merging away.
Closes #14 Closes #15
I did not receive any mail from kalyan i am planning to send this format as an output to emotion synthesis group and it can be one of the example as its been generated using our MLP classifier model. Check solution notebook in emotion-synthesis branch for the steps.