Goals: Add links that are reasonable and good explanations of how stuff works. No hype and no vendor content if possible. Practical first-hand accounts of models in prod eagerly sought.
| from abc import ABC | |
| from typing import List, Optional, Any | |
| import chromadb | |
| from langchain.docstore.document import Document | |
| from langchain.embeddings.base import Embeddings | |
| from langchain.vectorstores import Chroma | |
| class CachedChroma(Chroma, ABC): |
| from metaflow import FlowSpec, step, IncludeFile | |
| def dataset_wine(): | |
| from sklearn import datasets | |
| return datasets.load_wine(return_X_y=True) | |
| def model_knn(train_data, train_labels): | |
| from sklearn.neighbors import KNeighborsClassifier | |
| model = KNeighborsClassifier() | |
| model.fit(train_data, train_labels) |
| # principal amount | |
| p = 10_000 | |
| # annual rate of interest | |
| r = 0.05 | |
| # number of years | |
| t = 5 |