@@ -1360,8 +1360,8 @@ Existing deepnets can also be cloned:
13601360.. code-block :: python
13611361 from bigml.api import BigML
13621362 api = BigML()
1363- deepnets = " deepnets /526fc344035d071ea3031d76"
1364- cloned_deepnets = api.clone_deepnets(deepnets )
1363+ deepnet = " deepnet /526fc344035d071ea3031d76"
1364+ cloned_deepnet = api.clone_deepnet(deepnet )
13651365
13661366
13671367 Creating PCAs
@@ -1508,3 +1508,45 @@ PCA to compute the projection that corresponds to each input data instance:
15081508 pca, dataset, {
15091509 " name" : " my batch pca" , " all_fields" : True ,
15101510 " header" : True })
1511+
1512+ Cloning Resources
1513+ ~~~~~~~~~~~~~~~~~
1514+
1515+ In the previous sections, you've been able to see that sources,
1516+ datasets and models can be cloned using the corresponding
1517+ ``clone_[resource_type]` method.
1518+
1519+ .. code-block:: python
1520+ from bigml.api import BigML
1521+ api = BigML()
1522+ logistic_regression = "logisticregression/526fc344035d071ea3031d76"
1523+ cloned_logistic_regression = api.clone_logistic_regression(
1524+ logistic_regression)
1525+
1526+ Usually, cloning is applied when someone
1527+ shares a resources with us and we need to use it in our account. In that case
1528+ the link to the shared resource contains a shared hash, which is at the end
1529+ of the URL. That shared ID can be used as input to clone it.
1530+
1531+ .. code-block:: python
1532+ from bigml.api import BigML
1533+ api = BigML()
1534+ shared_deepnets = "shared/deepnet/s2KQBFQHMeIrbaTF5uncNsM8HKB"
1535+ cloned_deepnet = api.clone_deepnet(shared_deepnet)
1536+
1537+ Sharing and cloning can be especially useful to useres that belong to
1538+ one ``Organization ``. For privacy reasons, the projects created inside the
1539+ ``Organization `` are not visible from the private user account environment and
1540+ vice versa. If those users create a resource in their private account and then
1541+ want to share it in a project that belongs to the organization, they can
1542+ create the corresponding secret link and use it to clone it in the
1543+ organization's project. That will, of course, need the connection to be
1544+ pointing to that specific project.
1545+
1546+ .. code-block :: python
1547+ from bigml.api import BigML
1548+ org_project = " project/526fc344035d071ea3031436"
1549+ # Creating a connection to the organization's project
1550+ api = BigML(project = org_project)
1551+ shared_model = " shared/model/s2KQBFQHMeIrbaTF5uncNsM8HKB"
1552+ cloned_model = api.clone_model(model)
0 commit comments