New answers tagged

0

The error says DataFrame object has no to_frame method. So it's already a DataFrame. As I mentioned in my comment the API of the pandas_datareader was changed after the article you used was written. Try changing the last line to: panel_data.head(9)


1

I know this is offtopic, but this time I have to comment the task. I am commenting the project, in case you really want to apply this for students. I think is it very dangerous to the society in general, if people that are "beginner in data science" create ML models that work on topics that are ethnical critical and highly biased, especially if ML ...


1

Following discussion with Erwan: one of his previous answer partially has answered my question. However I would like to understand the following. One needs to have a corpus, then label news/tweets in fake/not fake, then run the model. But how the algorithm works on texts and takes relevant words or features for detecting fake news? First, let me emphasize ...


1

There are many methods to connect two different kinds of datasets Python Pandas - Merging/Joining left − A DataFrame object. right − Another DataFrame object. on − Columns (names) to join on. ... left_on − Columns from the left DataFrame to use as keys. ... right_on − Columns from the right DataFrame to use as keys. ... left_index − If True, use the index (...


0

for tensorflow 2 import tensorflow as tf model = tf.keras.models.load_model(keras_model_path) tf.saved_model.save(model, "save/folder/path") Other alternative import tensorflow as tf model = tf.keras.models.load_model(keras_model_path) model.save("save/folder/path") These two approaches create a folder and stores the modelfile as ...


1

By definition, if these columns or features contain a constant value and yet the output variables change, then they are not influencing the output and likely can be ignored. A more formal test is to determine how much of the variance between a model that uses that feature is attributable to that feature. A simple example to illustrate this principle is to ...


2

data.loc[ data['age'].isin(range_1) & data['height'].isin(range_2) ]


0

The purpose of training in data mining is finding the patterns. If you want to get a segmentation using kmean, training means iteratively grouping data together in clusters until points no longer change clusters. If you do basket analysis it means looking at item sets and seeing if they exceed your threshold metric and discarding them if they don't. If you ...


0

There is a very important difference in Machine Learning (ML) between supervised methods and unsupervised methods: Supervised learning consists in training a model with some labelled data in order to make the final model able to predict the label on some new (unlabelled) data. This means that the task is designed by choosing exactly what what one wants to ...


1

k-fold CV is meant to evaluate the model. Once the evaluation is done and one is ready to move to deployment, there's no point using CV anymore: the method has been tested and validated, so one can reasonably assume that from now on applying the same method to the same kind of data will lead to the same level of performance. Thus the usual process is: Train ...


Top 50 recent answers are included