Coder Social home page Coder Social logo

nexosis / nexosisclient-ps Goto Github PK

View Code? Open in Web Editor NEW
0.0 3.0 2.0 234 KB

PowerShell client for the Nexosis API

Home Page: http://docs.nexosis.com/clients/powershell

License: Other

PowerShell 100.00%
powershell-module machine-learning api-client machine-learning-api powershell nexosis-api

nexosisclient-ps's Introduction

PSNexosisClient

Nexosis API Client for PowerShell

This software is provided as a way to include Nexosis API functionality from your PowerShell command line.

You can read about the Nexosis API at https://developers.nexosis.com

Pull requests are welcome

Build status

Examples of library usage

List of all commands

PS C:\> ((Get-Module PSNexosisClient).ExportedCommands).Keys

Get-NexosisAccountQuotas
Get-NexosisConfig
Get-NexosisContest
Get-NexosisContestant
Get-NexosisContestChampion
Get-NexosisContestSelection
Get-NexosisDataSet
Get-NexosisDataSetData
Get-NexosisImport
Get-NexosisModel
Get-NexosisModelDetail
Get-NexosisSession
Get-NexosisSessionAnomalyScore
Get-NexosisSessionClassScore
Get-NexosisSessionConfusionMatrix
Get-NexosisSessionResult
Get-NexosisSessionStatus
Get-NexosisSessionStatusDetail
Get-NexosisView
Get-NexosisViewData
Get-NexosisVocabulary
Get-NexosisVocabularySummary
Import-NexosisDataSetFromAzure
Import-NexosisDataSetFromCsv
Import-NexosisDataSetFromJson
Import-NexosisDataSetFromS3
Import-NexosisDataSetFromUrl
Invoke-NexosisPredictTarget
New-NexosisDataSet
New-NexosisView
Remove-NexosisDataSet
Remove-NexosisModel
Remove-NexosisSession
Remove-NexosisView
Set-NexosisConfig
Start-NexosisForecastSession
Start-NexosisImpactSession
Start-NexosisModelSession

To get basic help on commands in the PSNexosisClient, type:

PS C:\> get-help Get-NexosisDataSet

and that will return

NAME
    Get-NexosisDataSet
    
SYNOPSIS
    Gets the list of all datasets that have been saved to the system.
    
    
SYNTAX
    Get-NexosisDataSet [[-partialName] <String>] [[-page] <Int32>] [[-pageSize] <Int32>] [<CommonParameters>]
    
    
DESCRIPTION
    Returns a list of all the stored datasets and related data.
    

RELATED LINKS
    http://docs.nexosis.com/clients/powershell

REMARKS
    To see the examples, type: "get-help Get-NexosisDataSet -examples".
    For more information, type: "get-help Get-NexosisDataSet -detailed".
    For technical information, type: "get-help Get-NexosisDataSet -full".
    For online help, type: "get-help Get-NexosisDataSet -online"

To just get examples, run:

PS C:\> get-help Get-NexosisDataSet -Examples

which will return all the examples only:

NAME
    Get-NexosisDataSet
    
SYNOPSIS
    Gets the list of all datasets that have been saved to the system.
    
    -------------------------- EXAMPLE 1 --------------------------
    
    PS C:\> Get-NexosisDataSet -partialName 'sales'

    -------------------------- EXAMPLE 2 --------------------------
    
    PS C:\> Get-NexosisDataSet -page 0 -pageSize 2 | ConvertTo-Json -Depth 4
    
    -------------------------- EXAMPLE 3 --------------------------
    
    PS C:\> Get-NexosisDataSet -partialName 'sales' -page 0 -pageSize 20

To get the full details of Help documents on a particular Module in the PSNexosisClient module, type:

PS C:\> help New-NexosisDataSet

Help Documentation contains more detailed explanation:

NAME
    New-NexosisDataSet
    
SYNOPSIS
    This operation creates a new dataset or updates an existing dataset using data from a PSCustomObject.
    
    
SYNTAX
    New-NexosisDataSet [-dataSetName] <String> [-data] <Object> [[-columnMetaData] <Object>] [-WhatIf] [-Confirm] [<CommonParameters>]
    
    
DESCRIPTION
    This operation creates a new dataset using data provided in an object formatted as an Array of HashTables, like so:
    
    $data = @(
    	@{
    		timestamp = "2013-01-01T00:00:00+00:00"
    		sales = "1500.56"
    		transactions = "195.0"
    	},
    	@{
    		timestamp = "2013-01-02T00:00:00+00:00"
    		sales = "4078.52"
    		transactions = "696.0"
    	},
    	@{
    		timestamp = "2013-01-03T00:00:00+00:00"
    		sales = "4545.69"
    		transactions = "743.0"
    	},
    	@{
    		timestamp = "2013-01-04T00:00:00+00:00"
    		sales = "4872.63"
    		transactions = "797.0"
    	},
    	@{
    		timestamp = "2013-01-05T00:00:00+00:00"
    		sales = "2420.81"
    		transactions = "367.0"
    	}
    ) 
    
    Optionally, metadata for the columns can be submitted to help describe the data being uploaded as a hashtable, for example:
    
    $columns = @{
    	timestamp = @{
    		dataType = "date"
    		role = "timestamp"
    		imputation = "zeroes"
    		aggregation = "sum"
    	}
    	sales = @{
    		dataType = "numeric"
    		role = "target"
    		imputation = $null
    		aggregation = $null
    	}
    	transactions = @{
    		dataType = "numeric"
    		role = "none"
    		imputation = "zeroes"
    		aggregation = "sum"
    	}
    }
    
If the dataset already exists, adds rows to the dataset. If the specified data contains records with timestamps that already exist in the dataset, those records will be overwritten.
    

RELATED LINKS

REMARKS
    To see the examples, type: "get-help New-NexosisDataSet -examples".
    For more information, type: "get-help New-NexosisDataSet -detailed".
    For technical information, type: "get-help New-NexosisDataSet -full".

Some Examples

Get all datasets

PS C:\> Get-NexosisDataSet -partialName 'salesdata'

Commands can be chained together. The following example will retrieve all datasets whose data set name matches 'Location' - and will return the status of all the S3 imports:

 PS C:\> ((Get-NexosisDataSet -partialName 'Location') | Foreach { $_.DataSetName } | Get-NexosisImport) | Where type -eq 's3' | Format-Table -Property @('datasetname', 'requestedDate', 'status')

Here's example output:

dataSetName requestedDate                    status   
----------- -------------                    ------   
Location-A  2017-07-25T14:11:24.072413+00:00 completed
Location-A  2017-07-31T19:55:54.77986+00:00  completed
Location-A  2017-07-31T20:48:59.757254+00:00 completed
Location-A  2017-07-31T20:49:49.834596+00:00 completed
Location-A  2017-07-31T21:13:01.534355+00:00 completed
Location-A  2017-07-31T21:29:10.492391+00:00 completed
Location-A  2017-07-31T21:30:46.964879+00:00 completed
Location-A  2017-07-31T21:31:58.940308+00:00 completed
Location-A  2017-07-31T21:33:01.357326+00:00 completed
Location-A  2017-07-31T21:39:43.500755+00:00 completed
Location-A  2017-07-31T21:48:28.43288+00:00  completed
Location-A  2017-07-31T21:50:08.738356+00:00 completed
Location-A  2017-07-31T21:59:29.412464+00:00 completed
Location-A  2017-07-31T22:00:02.808693+00:00 completed
Location-A  2017-07-31T22:17:33.119814+00:00 completed
Location-A  2017-07-31T22:19:04.318954+00:00 completed
Location-A  2017-07-31T22:22:06.416325+00:00 completed

nexosisclient-ps's People

Contributors

jeffgabriel avatar jm0nty avatar timfalls avatar

Watchers

 avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.