lenguyenthedat / kaggle-for-fun Goto Github PK
View Code? Open in Web Editor NEWAll my submissions for Kaggle contests that I have been, and going to be participating.
All my submissions for Kaggle contests that I have been, and going to be participating.
Stop being lazy ๐ญ
Suggestion:
data/
folderHave fun!
Note: Please state which one you are working on so we don't duplicate efforts ๐
Running LabelEncoder on the Cabins feature gives an error:
Pclass
Name
Sex
Age
SibSp
Parch
Ticket
Cabin
---------------------------------------------------------------------------
TypeError Traceback (most recent call last)
<ipython-input-121-48f3aad5f78e> in <module>()
4 print(col)
5 le.fit(list(train[col]) + list(cv[col]))
----> 6 train[col] = le.transform(train[col])
7 cv[col] = le.transform(cv[col])
/opt/conda/lib/python3.6/site-packages/sklearn/preprocessing/label.py in transform(self, y)
128 y = column_or_1d(y, warn=True)
129
--> 130 classes = np.unique(y)
131 if len(np.intersect1d(classes, self.classes_)) < len(classes):
132 diff = np.setdiff1d(classes, self.classes_)
/opt/conda/lib/python3.6/site-packages/numpy/lib/arraysetops.py in unique(ar, return_index, return_inverse, return_counts, axis)
208 ar = np.asanyarray(ar)
209 if axis is None:
--> 210 return _unique1d(ar, return_index, return_inverse, return_counts)
211 if not (-ar.ndim <= axis < ar.ndim):
212 raise ValueError('Invalid axis kwarg specified for unique')
/opt/conda/lib/python3.6/site-packages/numpy/lib/arraysetops.py in _unique1d(ar, return_index, return_inverse, return_counts)
275 aux = ar[perm]
276 else:
--> 277 ar.sort()
278 aux = ar
279 flag = np.concatenate(([True], aux[1:] != aux[:-1]))
TypeError: '>' not supported between instances of 'float' and 'str'
It looks like the reason is because there are missing values in the Cabins feature. How did you overcome this?
Seems fun, why not?
https://github.com/JohnLangford/vowpal_wabbit
This is a super simple one ๐
Suggestion:
Why are age and fare in that list? It doesn't seem necessary to put those features through the label encoding function.
Would be nice to compare GridSearchCV and RandomizedSearchCV in some challenges.
Since we are reusing a lot of stuffs, might as well have some utility functions in place.
Suggestion:
utils.py
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.