Security News
PyPI Introduces Digital Attestations to Strengthen Python Package Security
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
tensorflow-load-csv
Advanced tools
Create tensors directly from CSV files. Supports operations like standardisation so you can dive right into the fun parts of ML.
A library that aims to remove the overhead of creating tensors from CSV files completely; allowing you to dive right into the fun parts of your ML project.
You can find the docs here.
NPM:
npm install tensorflow-load-csv
Yarn:
yarn add tensorflow-load-csv
Simple usage:
import loadCsv from 'tensorflow-load-csv';
const { features, labels } = loadCsv('./data.csv', {
featureColumns: ['lat', 'lng', 'height'],
labelColumns: ['temperature'],
});
features.print();
labels.print();
Advanced usage:
import loadCsv from 'tensorflow-load-csv';
const { features, labels, testFeatures, testLabels } = loadCsv('./data.csv', {
featureColumns: ['lat', 'lng', 'height'],
labelColumns: ['temperature'],
mappings: {
height: (ft) => ft * 0.3048, // feet to meters
temperature: (f) => (f < 50 ? [1, 0] : [0, 1]), // cold or hot classification
}, // Map values based on which column they are in before they are loaded into tensors.
flatten: ['temperature'], // Flattens the array result of a mapping so that each member is a new column.
shuffle: true, // Pass true to shuffle with a fixed seed, or a string to use as a seed for the shuffling.
splitTest: true, // Splits your data in half. You can also provide a certain row count for the test data, or a percentage string (e.g. '10%').
standardise: ['height'], // Calculates mean and variance for each feature column using data only in features, then standardises the values in features and testFeatures. Does not touch labels.
prependOnes: true, // Prepends a column of 1s to your features and testFeatures tensors, useful for regression problems.
});
features.print();
labels.print();
testFeatures.print();
testLabels.print();
FAQs
Create tensors directly from CSV files. Supports operations like standardisation so you can dive right into the fun parts of ML.
The npm package tensorflow-load-csv receives a total of 0 weekly downloads. As such, tensorflow-load-csv popularity was classified as not popular.
We found that tensorflow-load-csv demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
PyPI now supports digital attestations, enhancing security and trust by allowing package maintainers to verify the authenticity of Python packages.
Security News
GitHub removed 27 malicious pull requests attempting to inject harmful code across multiple open source repositories, in another round of low-effort attacks.
Security News
RubyGems.org has added a new "maintainer" role that allows for publishing new versions of gems. This new permission type is aimed at improving security for gem owners and the service overall.