![]() ![]() ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in (.0) ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in _call_(self) ![]() ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\_parallel_backends.py in _init_(self, batch)ģ30 # Don't delay the application, to avoid keeping the input ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\_parallel_backends.py in apply_async(self, func, callback)ġ09 def apply_async(self, func, callback=None): > 588 job = self._backend.apply_async(batch, callback=cb) ![]() ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in _dispatch(self, batch)ĥ87 cb = BatchCompletionCallBack(dispatch_timestamp, len(batch), self) ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in dispatch_one_batch(self, iterator) > 779 while self.dispatch_one_batch(iterator): In particular this covers the edgeħ78 # case of Parallel used with an exhausted iterator. ~\Anaconda3\lib\site-packages\sklearn\externals\joblib\parallel.py in _call_(self, iterable)ħ77 # was dispatched. ~\Anaconda3\lib\site-packages\sklearn\cross_validation.py in cross_val_score(estimator, X, y, scoring, cv, n_jobs, verbose, fit_params, pre_dispatch) > 3 scores = cross_val_score(dt, x, y, scoring='accuracy', cv=10)ĥ print ("Accuracy: %2.10f" % np.mean(scores)) ValueError Traceback (most recent call last)ġ from ee import DecisionTreeClassifier Print ("Accuracy: %2.10f" % np.mean(scores)) Scores = cross_val_score(dt, x, y, scoring='accuracy', cv=10) 'proto_icmp', 'proto_tcp', 'proto_udp']Ĭode and Error from ee import DecisionTreeClassifier 'dst_host_rerror_rate', 'dst_host_srv_rerror_rate', 'label', ![]() 'dst_host_serror_rate', 'dst_host_srv_serror_rate', 'dst_host_same_src_port_rate', 'dst_host_srv_diff_host_rate', 'dst_host_same_srv_rate', 'dst_host_diff_srv_rate', 'srv_diff_host_rate', 'dst_host_count', 'dst_host_srv_count', 'srv_rerror_rate', 'same_srv_rate', 'diff_srv_rate', 'srv_count', 'serror_rate', 'srv_serror_rate', 'rerror_rate', 'num_outbound_cmds', 'is_host_login', 'is_guest_login', 'count', 'num_file_creations', 'num_shells', 'num_access_files', 'num_compromised', 'root_shell', 'su_attempted', 'num_root', 'wrong_fragment', 'urgent', 'hot', 'num_failed_logins', 'logged_in', feature_cols =['duration','src_bytes','dst_bytes','land', the y feature set has 23 labels when I test the algorithm to only predict against 3 y features (normal, smurf and neptune) it works perfectly fine but as soon as I try and get it to predict against all the labels I get the error.Īny guidance would be appreciated as I have been working on this for 2 days now. when running the code below I get an error saying "could not convert string to float 'normal'".'normal' is one the labels that is found in the Y feature set shown below. I am currently following a video on using machine learning algorithms against the KDD 99 cup dataset. TensorFlow: Convert GRUCell weights from compat.v1 to tensorflow 2.Neural network XOR backpropagation info needed.How to find dynamically the depth of a network in Convolutional Neural Network.A typical tech stack using vowpal wabbit?.How to debug Tensorflow Network weights/outputs/cost per input sample?.Restricted Boltzmann Machine - reconstruction.Getting the distribution of values at the leaf node for a DecisionTreeRegressor in scikit-learn.NA/NaN/Inf error when fitting HMM using depmixS4 in R.Python 3.x: alternative pprint implementation.Catching specific error messages in try / except.pytorch collate_fn reject sample and yield another.Why use lambdas vs 1-line function declarations?.BeautifulSoup: Can't convert NavigableString to string.non-destructive version of pop() for a dictionary.python3: bind method to class instance with.Python Bloomberg API request does not return result.Multiprocessing python within frozen script.Train_test_split(My_data,My_target, test_size = 0.3)ĭT_Model_Mushroom = tree.DecisionTreeClassifier()ĭT_Model_Mushroom_Fitted = DT_Model_Mushroom. Mushroom_train,mushroom_test,mushroomtarget_train,mushroomtarget_test = \ #Dividing the datasets into Indicator and Predictor Variables My_dataset = pd.read_csv('mushrooms.csv') import numpy as npįrom sklearn.neighbors import KNeighborsClassifierįrom sklearn.model_selection import train_test_splitįrom trics import accuracy_scoreįrom trics import confusion_matrix But getting some error as ValueError: could not convert string to float: 'f'. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |