Comments (4)
Could you point out which example you are trying? The versions look correct to me and I just tried one of the examples involving pandas. Also, what's the name of the python script you are executing? Sometimes bad file name or existing pd
variable in the environment could cause this problem. Try using IPython to run it from scratch.
from skflow.
I'm running
import skflow
from sklearn import datasets, metrics
iris = datasets.load_iris()
classifier = skflow.TensorFlowLinearClassifier(n_classes=3)
classifier.fit(iris.data, iris.target)
score = metrics.accuracy_score(classifier.predict(iris.data), iris.target)
print("Accuracy: %f" % score)
with IPython and I get
---------------------------------------------------------------------------
AttributeError Traceback (most recent call last)
/home/chris/Workspace/Playground/test.py in <module>()
4 iris = datasets.load_iris()
5 classifier = skflow.TensorFlowLinearClassifier(n_classes=3)
----> 6 classifier.fit(iris.data, iris.target)
7 score = metrics.accuracy_score(classifier.predict(iris.data), iris.target)
8 print("Accuracy: %f" % score)
/home/chris/anaconda3/lib/python3.4/site-packages/skflow/estimators/base.py in fit(self, X, y, logdir)
182 self._data_feeder = setup_train_data_feeder(X, y,
183 self.n_classes,
--> 184 self.batch_size)
185 if not self.continue_training or not self._initialized:
186 # Sets up model and trainer.
/home/chris/anaconda3/lib/python3.4/site-packages/skflow/io/data_feeder.py in setup_train_data_feeder(X, y, n_classes, batch_size)
71 DataFeeder object that returns training data.
72 """
---> 73 X, y = _data_type_filter(X, y)
74 if HAS_DASK:
75 import dask.dataframe as dd
/home/chris/anaconda3/lib/python3.4/site-packages/skflow/io/data_feeder.py in _data_type_filter(X, y)
49 y = extract_dask_labels(y)
50 if HAS_PANDAS:
---> 51 X = extract_pandas_data(X)
52 y = extract_pandas_labels(y)
53 return X, y
/home/chris/anaconda3/lib/python3.4/site-packages/skflow/io/pandas_io.py in extract_pandas_data(data)
27 def extract_pandas_data(data):
28 """Extract data from pandas.DataFrame for predictors"""
---> 29 if not isinstance(data, pd.DataFrame):
30 return data
31
AttributeError: 'module' object has no attribute 'DataFrame'
I don't think there's a anything wrong with the code. Maybe the issue is related to pands? If I run multioutput_regression.py
I get the same error in pandas_io.py
as above.
from skflow.
Thanks. Could you try reinstall pandas then? The pandas version is the same as the one I am using though. Googled around it seems like this happens a lot. Try some solutions from Google results.
from skflow.
Thanks, after I reinstalled pandas it worked.
from skflow.
Related Issues (20)
- Verbose is not considered during the training. HOT 1
- need more models in skflow.models HOT 2
- seq2seq example doesn't work HOT 1
- IndexError: index 20860 is out of bounds for axis 0 with size 18805 HOT 3
- TypeError inside skflow HOT 1
- text_classification.py giving error HOT 2
- skflow and tensorboard HOT 1
- Conditional RBM and distributed computing HOT 1
- can not run two tensorflow program one by one HOT 1
- Exception in the Custom model example HOT 2
- Scikitflow documentation update requested HOT 1
- getting none values not supported error HOT 3
- neural_translation.py showing error HOT 4
- Exception when restore DNN model HOT 1
- Tensor name "hiddenlayer_2/biases" not found in checkpoint files HOT 1
- checkpoint can't be restored... HOT 1
- DNNClassifier init failed HOT 1
- Why hasn't this repo been archived yet?
- Is this project still working? HOT 1
- .travis.yml: The 'sudo' tag is now deprecated in Travis CI HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from skflow.