Posts

Showing posts with the label data-science

In a SVM model, will results be viable when I decrease the test size to 0.06

In a SVM model, will results be viable when I decrease the test size to 0.06 I used support vector machine model for classification using iris data set. I used train test split function to split the data-set into training and testing subsets. when test_size was 0.3 the accuracy was low and then I decreased the size of testing subset to 0.06 and now the accuracy is 1 ie. 100%. obviously, the reason is clear, its because with testing data the amount of noise and fluctuations as decreases. My question is- we want our model to be efficient but what value of test_size is acceptable for that. at what value of test_size will the result be viable. here is some line of code from my program- from sklearn import datasets from sklearn import svm import numpy as np from sklearn import metrics iris = datasets.load_iris() X = iris.data[:, :2] y = iris.target C=1.0 from sklearn.cross_validation import train_test_split x_train, x_test, y_train ,y_test = train_tes...