Author Archives: Robins

[How to Solve] Tesorflow: module ‘pandas.core.computation’ has no attribute ‘expressions’

Error Message: Tesorflow:module ‘pandas.core.computation’ has no attribute ‘expressions’

There are totally two methods to solve this error. Let’s check out them.

Method 1:

Just upgrade dask, directly under cmd, pip install –upgrade dask, (Pycharm directly enter it in the terminal), and then prompt Successfully installed after completion.

Insert picture description here

 

Method 2:

This method is a more usable and well-tested.

conda update dask

AttributeError: lower not found (NLP extracted tfidf features)

在这里插入图片描述

The root cause lies in the incorrect use of fit, transform and fit_transform.
First, make it clear that the incoming parameters can be possible causes of series
errors:

When using TfidfVectorizer(), transform after fit_transform

def tfidf(X_train):
    tfidf_vec = TfidfVectorizer()
    X_train_tfidf = tfidf_vec.fit_transform(X_train)
    X_train_tfidf = tfidf_vec.transform(X_train_tfidf)
    return X_train_tfidf

Here the result of fit_transform is passed to transform again, and the transform is repeated

The correct way to use it should be:

def tfidf(X_train,X_test):
tfidf_vec = TfidfVectorizer()
X_train_tfidf = tfidf_vec.fit_transform(X_train)
X_test_tfidf = tfidf_vec.transform(X_test)
return X_train_tfidf,X_test_tfidf

fit_transform into the training set, transform into the test set

Or you can fit first and then transform

def tfidf(data):
tfidf_vec = TfidfVectorizer()
tfidf_model = tfidf_vec.fit(data)
print(tfidf_model.dtype)
X_tfidf = tfidf_model.transform(data)
return X_tfidf

You can also use CountVectorizer() and TfidfTransformer()

def tfidf(data):
vectorizer = CountVectorizer() # This class will transform the words in the text into a word frequency matrix, and the matrix element a[i][j] represents the word frequency of word j under class i text
transformer = TfidfTransformer() # This class will count the tf-idf weights of each word
tfidf_before = vectorizer.fit_transform(data)
tfidf = transformer.fit_transform(tfidf_before)
return tfidf

Note that the first type is divided into training set and test set. It needs to be divided into training set and test set before
inputting parameters. The latter two need to extract tfidf features and then divide training set and test set,
otherwise it may cause training set and test set. The feature dimensions of the set are different, and they are not transformed under the same standard

After the eclipse Android virtual machine starts, an error will be reported: similar to SDK manager devices.xml Solution

Android SDK is updated with Android SDK manager. ADT is installed on eclipse to develop Android. Now, an error is reported every time eclipse is opened, and an error is also reported every time virtual machine is opened. The wrong information is the same.

The error information is as follows:
[2015-05-30-10:14:35 – Android SDK] error when loading the SDK:Error : Error parsing D:/android-sdks/system-images/android-22/android-wear/armeabi-v7a/ devices.xml
CVC complex type. 2.4. D: found invalid content starting with element’d: skin ‘. There should be no child elements here.
Error: Error parsing D:/android-sdks/system-images/android-22/android-wear/x86/ devices.xml
CVC complex type. 2.4. D: found invalid content starting with element’d: skin ‘. There should be no child elements here

——————————————————————————————————————————————————-

Enter the SDK directory and add D/android-sdk/system-images/android-22/android-wear/armeabi-v7a/ devices.xml And D/Android SDK/system images/android-22/Android wear/x86/ devices.xml Delete the file, and then delete the devices.xml Copy it to the folder you deleted, restart eclipse, and solve the problem
then

The solution of transaction check error when installing Gnome with Yum command

Question:

Installing and downloading graphical interface Gnome

Yum groupinstall “desktop”
Yum groupinstall “X window system”
Yum groupinstall “Chinese support” (optional)

The screenshot of the later error is as follows:

resolvent:

Use the command: Yum remove networkmanager-1: 0.8.1-43.el6.x86_ 64 first delete the conflicting package shown in the red box in the above screenshot.

Content rendering error: a solution to the problem of zero Download document cannot be opened

    the version of zero is: 0.6.1 problem: after downloading zero, if HTML documents (CSS and other parts of documents) are installed, the following error will be reported when double clicking to open it
    solution

      view your own document download location and enter the directory
      . You can see the directory with installed documents in my directory
      , Enter the path under the document directory: contents/resources/documents\ developer.mozilla.org \For example: e: software, zero, docsets\ HTML.docset \Contents\Resources\Documents\ developer.mozilla.org \Delete react in static/build/JS- main.ddbbd86b0685 . JS, and then reopen the file, and click the document to find that can be used

Modify grub to solve computer startup error: error 17

Modify grub to solve computer startup error: error 17

The original computer has C, D, e, F, G. C disk, windows system disk and G disk are installed with CentOS. Later, due to the need to compress the volume of the way from the D disk compressed out of an H disk. Then when I started the computer again, I encountered an error: error 17

The reason:
is that windows is installed first and then Linux is installed. In this way, grub is booted by CentOS on disk g. now a new logical partition is divided before the partition, which causes the disk system symbol to move backward by one bit. Therefore, grub fails.
Solution:
1, burn a Linux Installation U disk, enter BIOS, modify boot items, and boot from U disk.
2. I use RedHat 7.0. After the U disk is started, enter the troubleshooting option, and then enter the rescue a @ #% $%. Enter all the way to shell mode.
3. In shell mode, use fdisk – L to view all partitions of the computer, and find that the original CentOS partition is sdb9. Grub command enters grub, root (hd1,8) command specifies partition, setup (HD1) installs grub to corresponding partition, and quit grub.

At this time, boot the hard disk again, and you can already see grub. But only windows can start, CentOS will report error, error 17, cannot mount

4. Start the U disk again and enter the shell mode under rescue. Check the grub configuration file of Linux system to see if there is any problem. I have a look, and there is no problem.

#mkdir linux
#mount /dev/sdb9 linux
#cd linux
#cd grub
#vi grub.conf

5. Start the hard disk, enter grub interface, move the cursor to the startup option of Linux, press e key to modify the startup sequence. Change the root (hd0,7) option to root (hd0,8) and enter. It’s ready to start.

New skills get!

Unity2019.1.02f error cs0104: ‘minattribute’ is an ambiguous reference between

Error importing information downloaded from resource store: postprocessing/Editor/propertydrawers\ MinDrawer.cs (6,34):error CS0104: ‘MinAttribute’ is an ambiguous reference between ‘ UnityEngine.PostProcessing.MinAttribute ‘ and ‘ UnityEngine.MinAttribute ‘。

The solution: to MinDrawer.cs Replace all minattributes in with UnityEngine.PostProcessing.MinAttribute .

 

Error in created hook: “referenceerror:” promise “undefined” Vue cli project Google is right, ie reported an error, “promise” undefined“

resolvent:

1. First, download and install “Babel Polyfill” dependency: NPM install — save Babel Polyfill

2. Project main.js Import ‘Babel Polyfill’

Error Description: both chrome and FF are good at keeping “ie” data out

Error analysis: the IE kernel reports an error. First, locate the browser compatibility problem, and then read the error: error in created hook: “reference error:” promise “is not defined”. That is to say, promise callback is not supported. Promise is a feature of ES6. That is to say, the IE kernel version is not friendly to ES6 compatibility, and it needs to be degraded to be resolved. As for “Babel Polyfill” You can see the explanation on the official website

https://babeljs.io/docs/en/6.26.3/babel-polyfill