cmnemoi / owrestimator Goto Github PK
View Code? Open in Web Editor NEWAn app allowing you to predict the best possible time possible for a game speedrun.
License: MIT License
An app allowing you to predict the best possible time possible for a game speedrun.
License: MIT License
In model_pipeline.py
, we are trying to build a ML pipeline using all features in our dataset. The dataset contains categorical feature such as 'main_platform'. We use pd.get_dummies to transform this feature into a dummy one. However some values of 'main_platform' presents in training set are not in the test set, resulting into an error.
Download the repo and run model_pipeline.py
.
We should get a MAE score printed in the terminal at the very end. Instead, we get an error.
We get the following error :
File "C:\Users\charl\miniconda3\lib\site-packages\pandas\core\indexes\base.py", line 3080, in get_loc
return self._engine.get_loc(casted_key)
File "pandas\_libs\index.pyx", line 70, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\index.pyx", line 101, in pandas._libs.index.IndexEngine.get_loc
File "pandas\_libs\hashtable_class_helper.pxi", line 4554, in pandas._libs.hashtable.PyObjectHashTable.get_item
File "pandas\_libs\hashtable_class_helper.pxi", line 4562, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: 'main_platform'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\utils\__init__.py", line 396, in _get_column_indices
col_idx = all_columns.get_loc(col)
File "C:\Users\charl\miniconda3\lib\site-packages\pandas\core\indexes\base.py", line 3082, in get_loc
raise KeyError(key) from err
KeyError: 'main_platform'
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "c:\Users\charl\OneDrive\Documents\Projects\OWREstimator\src\model_pipeline.py", line 80, in <module>
model_pipeline.fit(X_train,y_train)
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\pipeline.py", line 341, in fit
Xt = self._fit(X, y, **fit_params_steps)
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\pipeline.py", line 303, in _fit
X, fitted_transformer = fit_transform_one_cached(
File "C:\Users\charl\miniconda3\lib\site-packages\joblib\memory.py", line 352, in __call__
return self.func(*args, **kwargs)
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\pipeline.py", line 754, in _fit_transform_one
res = transformer.fit_transform(X, y, **fit_params)
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\compose\_column_transformer.py", line 505, in fit_transform
self._validate_remainder(X)
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\compose\_column_transformer.py", line 332, in _validate_remainder
cols.extend(_get_column_indices(X, columns))
File "C:\Users\charl\miniconda3\lib\site-packages\sklearn\utils\__init__.py", line 403, in _get_column_indices
raise ValueError(
ValueError: A given column is not a column of the dataframe```
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.