-
Notifications
You must be signed in to change notification settings - Fork 266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems running enamplecode on Apple Silicon (M1) #44
Problems running enamplecode on Apple Silicon (M1) #44
Comments
Hello, Code for example 4.1.5 follows so you can understand and hopefully help. The code is on Page 108, Ch. 4: import pandas as pd pd.options.display.width = 120 sms = pd.DataFrame(sms.values, columns=sms.columns, index=index) print(len(sms))print(sms.head(6))P. 108 - Now let's do our tokenization and TF-IDF vector transformation on all these SMS messages:tfidf_model = TfidfVectorizer(tokenizer=casual_tokenize) print(tfidf_docs.shape, sms.spam.sum())P. 109mask = sms.spam.astype(bool).values print(spam_centeroid.round(2)) spamminess_score = tfidf_docs.dot(spam_centeroid - ham_centeroid) P 110sms['lda_score'] = MinMaxScaler().fit_transform(spamminess_score.reshape(-1, 1)) print(sms['spam lda_predict lda_score'.split()].round(2).head(6)) Page 114 Listing 4.2print(word_topic_vectors.T.round(1)) |
Working with python3.9.5 and tensorflow-metal optimized for the M1 arm architecture, including the integrated GPU. Fix totalgood#44 .
Problem related to the use of nlpia on the new Apple Silicon M1 environment, using conda - installation is successful but there are many files that do not work
The text was updated successfully, but these errors were encountered: