Comments (4)
No worries. Thanks! Works great.
from pyss3.
Thanks! If the data won't be saved on disk and only loaded into x_train, y_train
etc. then load_from_url(url, folder=None)
makes perfect sense.
from pyss3.
Hi again @hbaniecki!
Wow, this is an amazing idea 👏👏👏
What do you think if adding a method called load_from_url()
to the Dataset
class, which would do the same thing as the current Dataset.load_from_files()
but instead of loading the dataset from disk, it will do it from an URL, as you suggested.
Perhaps load_from_url()
should take two arguments, load_from_url(url, folder=None)
, first the url
from which to download the zipped dataset and secondly, an optional argument called something like folder
that let the user to specify a particular folder to use from inside the zipped dataset. The example would end up being something like:
from pyss3 import SS3
x_train, y_train = Dataset.load_from_url("https://url/to/movie_review.zip", "train")
x_test, y_test = Dataset.load_from_url("https://url/to/movie_review.zip", "test")
clf = SS3()
clf.fit(x_train, y_train)
y_pred = clf.predict(x_test)
What do you think?
(Again, thank you for this suggestion, I think it is an awesome idea 💪😎👍)
from pyss3.
Hi @hbaniecki! sorry for the delay, I just had to wait for the weekend to get down on this. I've added the suggested methods and also updated the README.md
. Just check it out and let me know if everthing is OK 💪 🤓 👍
Below I'm pasting the commit message that marked this issue as closed:
Now datasets can be directly loaded via a given url, not only from disk.
To achieve this, two methods have been added toDataset
class:
Dataset.load_from_url(...)
Dataset.load_from_url_multilabel(...)
These methods download and extract the zip file (given by the url)
into the system's temporary folder and then call
Dataset.load_from_files()
to load it
(orDataset.load_from_files_multilabel()
, respectively).Note: If the same url is used consecutively, the already downloaded
files will be used as a cache (to avoid downloading and extracting
them again).
from pyss3.
Related Issues (20)
- Divison by 0 HOT 4
- Initialization of sanction function HOT 6
- Custom metrics for evaluation HOT 5
- Use evaluation and explanation as a standalone package? HOT 2
- Partial learn HOT 10
- Data loading issues while train HOT 4
- [joss] update the changelog HOT 1
- [joss] update entry site of the documentation HOT 1
- [joss] software paper comments HOT 1
- [JOSS] comments on the paper
- AttributeError: type object 'Dataset' has no attribute 'load_from_url' HOT 3
- AttributeError: type object 'Dataset' has no attribute 'load_from_url' HOT 3
- PYSS3 support for multi-class classification
- Set custom Confidence Vectors
- Custom preprocessing in Live Test HOT 8
- Multilabel Classification Evaluation HOT 14
- Multilabel Classification Dataset Loading HOT 4
- Change of category name HOT 1
- Multilabel Live Test HOT 3
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 pyss3.