Comments (3)
Hi @knight-fzq ,
I used sklearn TSNE to generate the results. Here is the sample code for your reference, where features
is the feature representations array and targets
is the labels array of the input data.
from sklearn.manifold import TSNE
import matplotlib.pyplot as plt
import pandas as pd
import seaborn as sns
df = pd.DataFrame()
tsne = TSNE(n_components=2, verbose=1, perplexity=40, n_iter=300)
tsne_results = tsne.fit_transform(features)
df['y'] = targets
df['tsne-2d-one'] = tsne_results[:,0]
df['tsne-2d-two'] = tsne_results[:,1]
fig = plt.figure()
ax = fig.add_subplot(111)
sns.scatterplot(
x="tsne-2d-one", y="tsne-2d-two",
hue="y",
palette=sns.color_palette("tab10", 10),
data=df,
legend="full",
alpha=0.8,
s=5,
ax=ax
)
ax.legend(title='class ID', loc='upper left')
plt.axis('off')
plt.show()
from moon.
Thank you very much.
from moon.
I would like to ask you if you have succeeded in reproduction? I also recently read this article to try to reproduce it, but it has been unsuccessful.
from moon.
Related Issues (20)
- Quesiton for code HOT 1
- Questions about SCAFFOLD code HOT 2
- The code seems inconsistent with the algoritm in paper HOT 1
- Questions about settings of negative samples HOT 2
- question of compute_accuracy HOT 4
- About the contrastive loss HOT 1
- About the model Resnet50 HOT 3
- About w_i^t in paper. HOT 1
- Why does the program keep showing“Files already downloaded and verified” HOT 6
- Question about dirichlet non-iid HOT 2
- Processing of Datasets HOT 2
- Question about FedAvg code HOT 2
- Questions about the reported test accuracy. HOT 2
- For tinyimagenet, the test acc is very low, 0.009 HOT 4
- Some questions about the metrics. HOT 5
- why we need to requires_grad=True for batch input, which (not sure) may lead to out of memory error. HOT 1
- Time for Training on CIFAR-100 and Tiny-ImageNet HOT 2
- Same label for positive and negative cases HOT 1
- L2 norm code issue HOT 2
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 moon.