These are some loooooong daylight hours here near the 39th parallel.
SBIRs
- Received a notification from the CUI folks to prepare a video presentation if I wasn’t attending of about 5 minutes, which is the same as a poster. So I think the wise move is slides and a poster. Work on that today and maybe some tomorrow. Otherwise while in CA.
- Note: Add content about Softbank’s SoftVoice project
- 9:00 Standup. Go over the layer image maybe and then go for a ride. I’ll need to work on the poster & slides next week. I’ll try to get started on UMAP today and have enough done so I can pick it up in two weeks
- 1:00 Overmatch call – might have gone well. More later?
- Got UMAP working with Plotly! Here’s the code. It’s based on this UMAP example here and the plotly scatterplot examples here:
from dash import Dash, dcc, html, Input, Output, callback
import plotly.express as px
from NNMs.utils.DashBaseClass import DashBaseClass
import numpy as np
from sklearn.preprocessing import StandardScaler
import pandas as pd
import umap
class UmapPenguins(DashBaseClass):
df:pd.DataFrame
def initialize(self) -> None:
penguins = pd.read_csv("https://raw.githubusercontent.com/allisonhorst/palmerpenguins/c19a904462482430170bfe2c718775ddb7dbb885/inst/extdata/penguins.csv")
penguins.head()
penguins = penguins.dropna()
print(penguins.species.value_counts())
print("scaling data")
reducer = umap.UMAP()
penguin_data = penguins[
[
"bill_length_mm",
"bill_depth_mm",
"flipper_length_mm",
"body_mass_g",
]
].values
scaled_penguin_data = StandardScaler().fit_transform(penguin_data)
print("finished scaling data")
print("calculating embedding")
embedding = reducer.fit_transform(scaled_penguin_data)
print("embedding.shape = {}".format(embedding.shape))
self.df = pd.DataFrame(embedding, columns=['x', 'y'])
# nda = np.random.random(size=(333, 3))
# self.df = pd.DataFrame(nda, columns=['x', 'y', 's'])
def setup_layout(self) -> None:
self.add_div(html.H2("UMAP scatterplot", style={'textAlign': 'center'}))
fig = px.scatter(self.df, x='x', y='y')
self.add_div(dcc.Graph(figure=fig))
self.app.layout = html.Div(self.div_list)
if __name__ == "__main__":
ump = UmapPenguins(True)
- And here’s the result.

